Home / Docs / Animation Lab 6.0 / Animation Lab 6.0 – Command Reference

Animation Lab 6.0 – Command Reference

Animation Lab 6.0 – Command Reference

Estimated reading: 9 minutes 31 views

Companion to the Animation Lab 6.0 guide. That page covers installing,
finding and using Animation Lab; this one is the lookup reference for every scenario command.


Syntax

Every command follows the same shape:

From  To  CommandName  Parameter1  Parameter2  …
  • From, To — the range of frame indices over which the command executes
  • CommandName — Move, Rotate, Scale and so on
  • Parameters — numbers, variables, or expressions (functions, arrays)

Three things that catch people out, before you start:

  1. Commands work in the graphic’s own coordinate system, relative to the graphic’s reference
    point. To see that coordinate system, use the Selector in 3D mode with Extents CS = Entity CS
    turned on. If commands behave unexpectedly, check this first.
  2. Key frames and commands conflict. If a property is driven by both, the command silently
    fails. Un-tick that property in Key Frame Properties.
  3. Single-switch commands want one frame, not a range — From 7 To 7.

Applicability — what works on what

An actor can be a graphic, a camera, or a light, and most commands only apply to one of
them. Check here before writing a command; a command applied to the wrong actor type is one of the
easier ways to get silence instead of motion.

Command Graphic Camera Light
Move ✓ ✓ ✓
MoveAbs ✓ ✓
Rotate ✓ ✓
Scale ✓
SlideByNodes ✓ ✓ ✓
SlideByPath ✓ ✓ ✓
FollowByNodes ✓ ✓ ✓
FollowByPath ✓ ✓ ✓
AttachToGroup ✓
DetachFromGroup ✓
Layer ✓ ✓
LayerSwitch ✓ ✓ ✓
PenColor ✓
PenColorIncr ✓
Thickness ✓
ThicknessIncr ✓
Material ✓
Luminance ✓
Morphing ✓
Duplicate ✓
AddNode ✓
DeleteNode ✓
CameraPos ✓
CameraLookAt ✓
CameraUp ✓
CameraPosByPath ✓
CameraLookByPath ✓
CameraPosByNodes ✓
CameraLookByNodes ✓
CameraUpByNodes ✓
LightSwitch ✓
LightColor ✓
LightColorInc ✓
LightCone ✓
LightPower ✓
Environment ✓ ✓ ✓
ChangeEnvironment ✓ ✓ ✓
ChangeMaterial ✓
ChangeLuminance ✓
ExtractFrameFromAvi ✓
MakeLoftList ✓
AddImageToManager ✓
ChangeActorImage ✓

Two things worth pulling out of that table:

  • Move is the only positional command that works on all three actor types. For a camera use
    CameraPos rather than MoveAbs, and note that Rotate does not apply to cameras at all —
    aim a camera with CameraLookAt or CameraUp instead.
  • Lights can be moved and rotated like objects. Move, MoveAbs, Rotate and all four path
    commands work on lights, so a light can travel a path just as an object can.

Move, rotate, scale

Move

Shifts the object by a delta from its current position.

Move  dX, dY, dZ
  • dX / dY / dZ — distance to move relative to the current position, per axis

Used on a Camera actor, this moves the camera.

MoveAbs

Moves the object to an absolute position.

MoveAbs  X, Y, Z
  • X / Y / Z — coordinates of the destination point

Rotate

Rotates the object about its axes.

Rotate  AngleX, AngleY, AngleZ
  • AngleX / AngleY / AngleZ — angle of rotation about each axis

Scale

Scales the object along its axes.

Scale  ScaleX, ScaleY, ScaleZ
  • ScaleX / ScaleY / ScaleZ — scale factor per axis

ACIS objects must be scaled equally on all three axes. To scale an ACIS solid along one axis
only, convert it to a Surface first (using Explode).


Movement by path

Any of these graphics can act as a path: Line, Polyline, Arc, Circle, Curve, Double line,
Extrusion, Wall, 3D Mesh, Loft graphic, Surface.

The distinction is slide versus follow: Slide moves the actor along the path without
reorienting it; Follow also turns the actor to face along the path — "train mode".

SlideByNodes

SlideByNodes  PathName, StartNode, Step
  • PathName — name of the actor being used as the path
  • StartNode — node of the path to start from
  • Step — 1 = every node, 2 = every second node, and so on. A negative Step reverses direction.

SlideByPath

Moves along the path with interpolation, so position is not restricted to nodes.

SlideByPath  PathName, Start%, End%, Spline
  • Start% / End% — 0–100, as a percentage of the path’s total length (0 = beginning, 50 = middle,
    100 = end)
  • Spline — 1 follows a smoothed curve, 0 follows the path graphic strictly

FollowByNodes

As SlideByNodes, but the actor turns to face its direction of travel.

FollowByNodes  PathName, StartNode, Step

On a camera, this moves the camera’s position and aims its point of view along the direction of
movement.

FollowByPath

As SlideByPath, with the same reorientation.

FollowByPath  PathName, Start%, End%, Spline

Object properties

PenColor

PenColor  Red, Green, Blue

Each component 0–255.

PenColorIncr

Changes the pen colour by a delta each frame — this is how you fade a colour over time.

PenColorIncr  dRed, dGreen, dBlue

Thickness / ThicknessIncr

Thickness  H
ThicknessIncr  dH

Thickness sets an absolute value; ThicknessIncr changes it by a delta each frame.

Layer

Moves the actor onto a layer.

Layer  LayerName

Material

Material  MaterialCategory\MaterialName

Both the category and the material name are required — e.g. Wood\Varnished Redwood.

Luminance

Equivalent to the Properties ▸ Luminance page, or the Luminance palette.

Luminance  LuminanceCategory\LuminanceName

SetAttribute

Writes text into the Attribute field on Format ▸ Properties ▸ General.

SetAttribute  Attribute

SetPropertyValue

Changes any named property of the actor. Needs TurboCAD v17.2 or later, and reaches parametric
symbol properties — PPM symbols, Part Tree symbols, and Dynamic components imported from SketchUp.

SetPropertyValue  "PropertyName"  PropertyValue

Worked example — a line whose pen width grows over 7 frames:

  1. Draw a line and make it an actor.
  2. Add a SetPropertyValue command with PropertyName "PenWidth" and PropertyValue
    0.1*StepNum.
  3. Set From 0, To 7.
  4. Play Scenario.

Group operations

AttachToGroup

AttachToGroup  GroupName

GroupName must name an actor that is itself a group.

DetachFromGroup

Removes the actor from its group and attaches it to the drawing.

DetachFromGroup

The actor must currently belong to a group graphic.

Takes a parameter? The Commands Description page shows no parameters, as above. The Commands
Reference table lists an ActorName parameter. If the bare command does not work, try naming the
group.


Geometry

Duplicate

Copies the actor’s graphic.

Duplicate

A copy always belongs to the actor’s parent, even when the original was inside a group.

Combined with the movement commands (SlideByNodes, SlideByPath, FollowByNodes, FollowByPath,
Move, MoveAbs, Rotate, Scale), Duplicate lets you copy an object along an arbitrary
trajectory
— a powerful pattern for arrays, stairs, fencing and similar repeated geometry.

Morphing

Transforms the actor’s graphic to match a template graphic.

Morphing  TemplateGraphic, StartNode
  • TemplateGraphic — name of the actor whose graphic is the target shape
  • StartNode — node of the modified graphic where the transformation begins

Supported types:

Graphic type As actor As template
GRAPHIC ✓ ✓
TCW50IntProp ✓ ✓
SURFACE ✓
3DMESH ✓ ✓
TC_MULTILINE ✓ ✓
TCW25DblLine ✓ ✓
TCW40EXTRUDE ✓ ✓
TCW30CURVE ✓ ✓
TCW50Polyline ✓ ✓

AddNode / DeleteNode

AddNode  X, Y, Z
DeleteNode  NodeIndex

DeleteNode with NodeIndex = -1 deletes the last node.

Both are supported for: GRAPHIC, TCW50IntProp, TCW25DblLine, TCW30CURVE, TCW60WALL,
TC_MULTILINE, TCW40EXTRUDE.


Camera management

CameraPos / CameraLookAt / CameraUp

CameraPos     X, Y, Z     ' move the camera itself
CameraLookAt  X, Y, Z     ' move the point the camera looks at
CameraUp      X, Y, Z     ' set the camera's up-vector

Camera along paths

CameraPosByNodes   PathName, StartNode, Step
CameraLookByNodes  PathName, StartNode, Step
CameraUpByNodes    PathName, StartNode, Step
CameraPosByPath    PathName, Start%, End%, Spline
CameraLookByPath   PathName, Start%, End%, Spline

The …ByNodes forms step node to node and follow every winding of the path; the …ByPath forms
interpolate along it by percentage. Parameters behave exactly as in
Movement by path.

Driving position and look-at along two separate paths is the standard way to build a
cinematic camera move.


Light management

LightSwitch    On\Off              ' 0 or 1
LightColor     Red, Green, Blue    ' each 0-255
LightColorInc  dRed, dGreen, dBlue ' per-frame delta
LightCone      Degree              ' cone angle
LightPower     Watts               ' light power

Rendering

RenderStyle

Sets the current Advanced Rendering Style.

RenderStyle  RenderStyleCategory\RenderStyleName

ChangeRenderStyle

Changes a property in the Rendering Style Editor.

ChangeRenderStyle  ShaderIndex, PropertyName, PropertyValue
  • ShaderIndex — the page number in the editor

Globals

These act on the drawing rather than on a single actor.

LayerSwitch

Shows or hides a layer.

LayerSwitch  LayerName, On\Off
  • On\Off — 0 or 1

Parameter order is uncertain. The Commands Description page gives LayerName, On\Off as
above; the Commands Reference table gives the opposite order, On(Off), LayerName. If the
command does not take effect, try swapping the two.

Environment

Sets the drawing’s environment — equivalent to the Environment palette.

Environment  EnvironmentCategory\EnvironmentName

ChangeMaterial / ChangeLuminance / ChangeEnvironment

Change an individual property inside the respective editor. All three share a signature:

ChangeMaterial     ShaderIndex, PropertyName, PropertyValue
ChangeLuminance    ShaderIndex, PropertyName, PropertyValue
ChangeEnvironment  ShaderIndex, PropertyName, PropertyValue
  • ShaderIndex — the page number in the Material / Luminance / Render Scene Environment Editor

These are what make shader-level animation possible — animating RedSDK Transparency, for
instance, rather than swapping a whole material.

ExtractFrameFromAvi

Pulls a single frame out of an AVI and writes it to disk as a BMP.

ExtractFrameFromAvi  AVIFilePath, FrameIndex, BMPFilePath

PutToWorkPlane

Places the actor on the current work plane. Takes no parameters.

PutToWorkPlane

Image

AddImageToManager

Adds an image to the Image Manager (Tools ▸ Raster Image ▸ Image Manager).

AddImageToManager  ImageFileName, ImageName, Embedded
  • Embedded — 0 loaded, 1 embedded

ChangeActorImage

Replaces the file displayed by an actor that is an image.

ChangeActorImage  ImageName

ImageName is the name as it appears in the Image Manager dialog.

To use this, the image must have been brought in as an actor first:

  1. Tools ▸ Raster Image ▸ Image Manager — add the file.
  2. Insert ▸ Picture ▸ From Image List — insert it in the drawing.
  3. Create an actor from the image.

Lofting

MakeLoft2     Profile-1  Profile-2
MakeLoft3     Profile-1  Profile-2  Profile-3
MakeLoft4     Profile-1  Profile-2  Profile-3  Profile-4
MakeLoftList  ProfilesListFile

Each Profile-n is the name of an actor acting as a 2D profile. The commands build a 3D object
by connecting those profiles — and because the profiles are actors, they can themselves be
animated
, so the lofted solid changes shape over the animation.

MakeLoftList takes a path to a text file listing actor names, one per line, for more than four
profiles. The order of names in the file determines the order the loft is built in.

Typical use: insert two or more 2D elements, make actors of them, animate each (by transformation or
in the Key Frames Editor), then create one more actor and give it the MakeLoft… command naming
those profiles.


3D Boolean

3DAdd        ActorName  RestoreGeometry
3DSubtract   ActorName  RestoreGeometry
3DIntersect  ActorName
  • ActorName — the other actor in the operation
  • RestoreGeometry — 0 or 1; restores the actor’s geometry before the next frame

3DIntersect takes no RestoreGeometry parameter — it always restores geometry before the next
frame.


Constraints

SetVariable

Changes a Constraint Manager variable — the ones listed in the Calculator palette.

SetVariable  "VariableName"  Value

Worked example — driving a dimensioned line from a constraint:

  1. Draw a horizontal line and make it an actor.
  2. Ensure AutoAdd Constraints is on (check the Inspector Bar, or Options ▸ Constraints).
  3. Dimension the line with an orthogonal dimension (ByEntity).
  4. Confirm a Constraint Manager variable was created (View ▸ Calculator Palette).
  5. Add a SetVariable command with VariableName "Var1" and Value 0.1*StepNum.
  6. Set From 0, To 7, and play.

This is the route to animating parametric, constraint-driven geometry rather than moving objects
around — the model rebuilds itself each frame.


Leave a Comment

Share this Doc

Animation Lab 6.0 – Command Reference

Or copy link

CONTENTS