GremlinScript

Gremlin Script is a simple scripting plugin for Animation Master. It uses a C/C++ type language to allow the creation of objects within animation master.

Installation

  • Download gremlimscript_beta2.zip (120kb)
  • Unzip the file to a temporary folder
  • Follow the installation instructions in readme.txt

Notes

  • Tested with AM v10.5o
  • The plugin uses AngelScript scripting engine
  • Send any feedback to gremlinscript at rabidgremlin.com

Examples - The 3 Primitives

3 Primitivesvoid main()
{
Cube* cube = createCube(1);
cube->setPosition(-2,2,0);
cube->draw();

Cylinder* cylinder = createCylinder(1,1);
cylinder->setPosition(2,2,0);
cylinder->draw();

Grid* grid = createGrid(1,5,5);

grid->setHeight(1,1,1);
grid->setHeight(2,1,1);
grid->setHeight(3,1,1);

grid->setHeight(1,2,1);
grid->setHeight(2,2,2);
grid->setHeight(3,2,1);

grid->setHeight(1,3,1);
grid->setHeight(2,3,1);
grid->setHeight(3,3,1);

grid->draw();
}

Examples - Cube of Cubes

Cube of Cubesvoid main()
{
Cube* cube = createCube(0.5);

double xLoop=-2;
while (xLoop < 3)
{
double yLoop=-2;
while (yLoop < 3)
{
double zLoop=-2;
while (zLoop < 3)
{
cube->setPosition(xLoop,yLoop,zLoop);
cube->setColor(0.2*xLoop,0.2*yLoop,0.2*zLoop);
cube->draw();
zLoop++;
}
yLoop++;
}
xLoop++;
}
}

Examples - Ring of Cylinders

Ring of Cylindersvoid main()
{
Cylinder *cylinder = createCylinder(1,1);

double degree = 0;

while (degree < 360)
{
double xPos = cos(degree) * 15;
double yPos = sin(degree) * 15;
double height = degree/36+1;

cylinder->setScale(1,height,1);
cylinder->setPosition(xPos,height/2,yPos);

cylinder->draw();
degree = degree + 10;
}
}

Examples - Wave Grid

Wave Gridvoid main()
{
Grid* grid = createGrid(1,20,20);

int xLoop=0;
while (xLoop < 20)
{
int yLoop=0;
while (yLoop < 20)
{
double height = 10*sin(toDouble(xLoop*yLoop));

grid->setHeight(xLoop,yLoop,height);

yLoop++;
}
xLoop++;
}

grid->draw();

}

Examples - Spiral Staircase

Stairsvoid main()
{
Cube* step = createCube(1);
step->setScale(5,1,2);
step->setRotationPoint(5,0,0);
step->setXPosition(-5);

double yRot = 0;
double yPos = 0.5;

while (yRot < 360)
{
step->setYPosition(yPos);
step->setYRotation(yRot);
step->draw();
yPos+=1;
yRot+=15;
}

Cylinder* column = createCylinder(5.5,yPos);
column->setYPosition(yPos/2);
column->draw();
}

Size

Colors