Common Commands Modeler Commands Commands Table of Contents

Layout Commands

Layout commands are case-sensitive. Layout's native command mechanism is the evaluate function, with the command name and its arguments passed as a single, space-delimited string. Commands issued using the lookup and execute functions will be translated into evaluate strings before being processed, and the command arguments passed to execute must all be DynaValues of type DY_STRING.

Layout doesn't strip quote marks from arguments. They're treated literally, so they should only be included when they're actually part of the argument. (There aren't any commands whose argument lists require anything other than spaces to delimit the arguments.)

Most Layout command arguments are optional. If the argument isn't supplied, Layout will prompt the user for the argument. In the command list that follows, the data types of the arguments are denoted by the initial letter. (The same letters are used in C printf formatting.)

number
An integer.
gfloat
A floating-point number.
string
A string, such as a filename or channel name.
hex
A hexadecimal number. The value should be preceeded by "0x" or "0X". If it does not, some hexadecimal values may be confused with decimal values. Some data arguments can be 32bits or 64bits depending on the OS platform in use. Channel IDs and Channel Group IDs fall into this category. Although an item identifier (LWItemID) may appear to be 64bit value on some platforms, only the lower 32bits is ever used. Be mindful of how the '%p' printf type (useful for outputting 64bit hexidecimal values) functions on various platforms; some will prefix "0x" and some will not. It is essential that 64bit arguments be specified in hexidecimal format with the prefixed "0x" or "0X".

The commands are divided into 15 categories, roughly according to what they do and which globals provide the current values of the parameters they set.

Selection
Objects
Bones
Lights
Global Illumination
Cameras
Items
Motion
Effects
Scenes
Navigation
Display
Tools
Panels
Compositing Miscellaneous

Selection

Most item-specific commands operate on the currently selected item. The Interface Info global returns a list of the currently selected items.

SelectItem xID
SelectByName sname
AddToSelection xID
RemoveFromSelection xID
Select an item by item ID or by name, or add and remove an item from the list of selected items.

SelectByPartialName sname
Select an item by partial matching. The text in name would cause a match if it existed anywhere within the text of the object's name.

SelectAllObjects
SelectAllBones
SelectAllLights
SelectAllCameras
Select all items of a given type.

EditObjects
EditBones
EditLights
EditCameras
Set the edit mode. This may affect the scope of some commands that depend on the contents of the scene or the item selection.

PreviousItem
NextItem
FirstItem
LastItem
Select items by traversing the item list.

SelectParent
SelectChild
PreviousSibling
NextSibling
Select items by traversing the parenting tree.

Objects

Commands that set object parameters operate on the currently selected object. You can use the functions returned by the Object Info global to get the current values of these parameters.

LoadObject sfilename
LoadObjectLayer nlayer sfilename
Load an object, or an object layer, and add it to the scene.

ReplaceWithObject sfilename
ReplaceObjectLayer nlayer sfilename
Replace the selected object or object layer.

AddNull sname
ReplaceWithNull sname
Add a null object to the scene, or replace the selected object with a null.

AddPartigon sfilename
Add a partigon (a particle object) to the scene. The filename is used to save the object.

SaveAllObjects
Save all objects in the scene. This updates (overwrites) the object files and is useful primarily for saving any surface changes that may have been made in Layout.

SaveObject sfilename
Save the selected object to a different file. Later references to the object in the scene will use the new filename.

SaveTransformed sfilename
Save a copy of the selected object in its current state, generally after patching, deformations and motions have been applied in the current frame.

SaveEndomorph sfilename
Save an endomorph of the selected object. This is the geometry of the object after transforming the points using a vertex map of type MORF or SPOT.

SaveObjectCopy sfilename
Save a copy of the selected object.

ClearAllObjects
Remove all objects from the scene.

SubdivisionOrder norder
Set the subdivision order for subpatches in the selected object. The argument can be any of the values returned by the Object Info subdivOrder function.

SubPatchLevel ndisplay nrender
MetaballResolution ndisplay nrender
Set the patch resolution for subpatches and metaballs.

MorphTarget xID
Set the selected object's morph target. The argument is the item ID of the target object.

MorphAmount gamount
Set the selected object's morph amount, usually a value between 0.0 and 1.0.

MorphMTSE
MorphSurfaces
Toggle the selected object's MTSE (Multiple Target Single Envelope) and Morph Surfaces options.

ObjectDissolve gdissolve
Set the selected object's dissolve, usually a value between 0.0 and 1.0.

PolygonSize gsize
Set the selected object's polygon size. The default size is 1.0.

UnseenByRays
UnseenByCamera
UnaffectedByFog
Toggle options affecting the participation of the object in certain rendering components.

SelfShadow
CastShadow
ReceiveShadow
Toggle the selected object's raytraced shadow options.

IncludeLight xID
ExcludeLight xID
Include or exclude a light. The argument is the item ID of the light.

ShadowExclusion
A toggle that's on by default and applies to the whole scene. When turned off, shadow calculations will ignore light exclusion.

PolygonEdgeFlags nflags
PolygonEdgeColor gred ggreen gblue
Set the flags and color of the object's polygon edges. See the Object Info edgeOpts function for a list of possible flags.

EnableDeformations
Enable or disable deformations for all objects in the scene.
FogLevel glevel
Set the fog-level percentage of the selected object.
ShrinkEdgesNominalDistance glength
When an object's 'shrink edges with distance' option is enabled, this sets the nominal distance value.
RenameLayer nlayer sname
Renames the layer of selected object to the provided name.
ObjGIUseGlobal nenable
Sets the location from where the selected object will retrieve certain GI settings (see the following values). Enabling this (1) will cause the Global Illumination values to come from the Render Globals settings. Disabling (0) will cause the object's localized settings to be used.
ObjGIRaysPerEvaluation nrays
Sets the ray evaluation limit for the object's localized Global Illumination settings.
ObjGISecondaryBounceRays nrays
Sets the secondary bounce ray amount for the object's localized Global Illumination settings.
ObjGIRadiosityTolerance gangle
Sets the radiosity tolerance angle (in degrees) for the object's localized Global Illumination settings.
ObjGIMinPixelSpacing gamount
Sets the miniumum pixel spacing amount for the object's localized Global Illumination settings.
ObjGIMaxPixelSpacing gamount
Sets the maxiumum pixel spacing amount for the object's localized Global Illumination settings.
LayerNameInstancing nenabled
Enables or Disables the layer name instancing of duplicate layer names.

Bones

Commands that set bone parameters operate on the currently selected bone. You can use the functions returned by the Bone Info global to get the current values of these parameters.

AddBone sname
AddChildBone sname
AddJoint sname
AddChildJoint sname
Add a bone or joint to the scene. The currently selected bone becomes the parent of new child bones.

DrawBones
DrawChildBones
DrawJoints
DrawChildJoints
Activates a mode in which bones or joints can be added by clicking and dragging in the interface.

ClearAllBones
Remove all bones from the scene.

SkelegonsToBones
Convert skelegons in the object to scene bones.

BoneActive
Make the bone active or inactive. An inactive bone is ignored during deformation calculations.

BoneType ntype
Sets the type of the bone.

BoneFalloffType ntype
Set the falloff function for the bone. The falloff is proportional to the distance raised to the power -2type. A type of 0 is inverse distance, 1 is inverse distance squared, 2 is inverse distance to the fourth power, and so on.

BoneRestPosition gX gY gZ
BoneRestRotation gH gP gB
BoneRestLength glength
BoneStrength gstrength
Set bone parameters.

BoneStrengthMultiply
When set, the strength will be multiplied by the rest length.

RecordRestPosition
Take the bone's current position to be its rest position.

BoneWeightMapName sname
BoneWeightMapOnly
BoneNormalization
Set a weight map for a bone. If the Weight Map Only option is toggled on, the normalization toggle is also turned on by default. With normalization on, the displacement of a point is divided by the sum of the weights.

BoneLimitedRange
BoneMinRange gdistance
BoneMaxRange gdistance
Toggle limited range, and set the minimum and maximum extents of the range.

BoneJointComp
BoneJointCompParent
BoneJointCompAmounts gself gparent
Toggle joint compensation and the inclusion of the parent in the calculations, and set the compensation amounts. Both joint compensation and muscle flexing are deformation adjustments designed to preserve volume, and they can optionally take the parent into account when the adjustment is calculated.

BoneMuscleFlex
BoneMuscleFlexParent
BoneMuscleFlexAmounts gself gparent
Toggle muscle flexing and the inclusion of the parent in the calculations, and set the flex amounts.

Lights

Commands that set light parameters operate on the currently selected light. You can use the functions returned by the Light Info global to get the current values of these parameters.

AddLight stype_name sname
AddDistantLight sname (deprecated)
AddPointLight sname (deprecated)
AddSpotlight sname (deprecated)
AddLinearLight sname (deprecated)
AddAreaLight sname (deprecated)
Add a light of the given type_name to the scene. The type name is the name of the light plugin server to use. The server names for the standard lights are: "AreaLight", "DistantLight", "DomeLight", "LinearLight", "PhotometricLight", "PointLight", "SphericalLight", and "SpotLight". Use double-quotes around type_name or name if spaces are part of the name. If the name is not provided, it will be requested. Although still available at present, the deprecated commands should not be used anymore.

ClearAllLights
Remove all lights from the scene.

SaveLight
Save the light's parameters to a file. The user is prompted for the filename. The light information is stored in the format used for scene files.

DistantLight
PointLight
Spotlight
LinearLight
AreaLight
Set the type of the light.

DoubleSidedAreaLight nenabled

LightColor gred ggreen gblue
LightIntensity gintensity
Set the color and intensity of the selected light.

LightFalloffType ntype
LightRange gdistance
Set the falloff type and range (or nominal distance) for the light. The falloff type affects the interpretation of the range value. These parameters aren't valid for distant lights.

AffectDiffuse
AffectSpecular
AffectCaustics
AffectOpenGL
Toggle these effects for the light.

LightConeAngle gangle
LightEdgeAngle gangle
Set the cone angle and soft edge angle for a spotlight.

LightQuality nquality
Set the quality level for a linear or area light.

ShadowType ntype
Set the light's shadow type.

CacheShadowMap
Toggle the Cache Shadow Map option for a shadow-mapped light.

ShadowMapSize nsize
Set the dimension of the shadow map for a light. A shadow map is a 2D array of pixels. The amount of memory it uses is proportional to the square of the size.

ShadowMapFuzziness gfuzziness
Set the amount of blur or softness for the shadow map.

ShadowMapFitCone
ShadowMapAngle gangle
Set the "field of view" for a shadow map. This is the angle subtended by the shadow map at the position of the light. The FitCone toggle sets this angle equal to the cone angle of a spotlight.

LensFlare
Toggle a lens flare effect for the light.

FlareIntensity gintensity
Set the lens flare intensity.

VolumetricLighting
Toggle volumetrics for the light.

Global Illumination

EnableLensFlares nenabled
EnableShadowMaps nenabled
EnableVolumetricLights nenabled
EnableRadiosity nenabled
EnableCaustics nenabled
Toggle these features for the whole scene.

AmbientColor gred ggreen gblue
AmbientIntensity gintensity
Set the ambient light color and intensity.

NoiseReduction nenabled
Toggle the Shader Noise Reduction feature.

RadiosityType VolumetricRadiositytype
Set the radiosity type, which can be one of the following.

0 - Backdrop Only
1 - Monte Carlo
2 - Interpolated

CacheRadiosity
CacheCaustics
Toggle caching of the solutions for radiosity and caustics.

RadiosityIntensity gintensity
RadiosityTolerance gtolerance
CausticIntensity gintensity
Set the radiosity intensity and tolerance and the caustic intensity.

VolumetricRadiosity nenabled
A toggle that's on by default, this controls whether volumetrics are taken into account by radiosity.

BlurBackgroundRadiosity
Toggles the blurring of background radiosity in the scene.

Cameras

Commands that set camera parameters operate on the currently selected camera. You can use the functions returned by the Camera Info global to get the current values of these parameters.

AddCamera sname
Add a camera to the scene.

ClearAllCameras
Remove all cameras from the scene and restore the default camera.

FrameSize nwidth nheight
ResolutionMultiplier gmultiplier
Set the size of the output image. The resolution multiplier makes it easier to scale the image up or down without affecting (or knowing) the base frame size. (The global versions of these commands can be found in the Scenes section.)

PixelAspect gaspect
Set the ratio of width to height for a pixel. Aspects less than 1.0 produce pixels that are taller than they are wide. (The global version of this command can be found in the Scenes section.)

CameraMask
MaskPosition nleft ntop nwidth nheight
MaskColor gred ggreen gblue
Enabling the camera mask causes the mask color to be drawn into the image outside the mask rectangle. (The global version of th MaskPosition command can be found in the Scenes section.)

LimitedRegion
Toggle limited region rendering. When this is enabled, only the part of the image inside the limited region rectangle will be rendered.

ZoomFactor gfactor
Set the camera zoom. This is the distance of the camera from the plane of projection. The image on this plane always has a half-height of 1.0.

ApertureHeight gheight
Set the aperture height of the camera. The focal length is zoom * ApertureHeight / 2. (The global version of this command can be found in the Scenes section.)

Antialiasing nlevel
Set the antialiasing level.

0 - Off
1 - Low (5 passes)
2 - Medium (9 passes)
3 - High (17 passes)
4 - Extreme (33 passes)

EnhancedAA
Toggles Enhanced antialiasing.

ReconstructionFilter nfilter
Sets the reconstruction filter.

NoiseSampler nsampler
Sets the noise sampler.

AdaptiveSampling
Toggles adaptive sampling.

AdaptiveThreshold gthreshold
Sets the threshold at which adjacent pixels are sufficiently different to receive antialiasing attention. Pixels with luminosity differences smaller than this will be skipped during antialiasing when adaptive sampling is enabled.

ParticleBlur
Toggle particle blur.
(The global version of this command can be found in the Scenes section.)

MotionBlur ntype
Set the motion blur option.

0 - Off
1 - Normal
2 - Dithered

(The global version of this command can be found in the Scenes section.)

BlurLength glength
Set the blur length as a fraction of the time between successive frames.
(The global version of this command can be found in the Scenes section.)

MotionBlurPasses npasses
Set the number of motion blur passes.
(The global version of this command can be found in the Scenes section.)

ShutterEfficiency gefficiency
Sets the shutter efficiency as a fraction.
(The global version of this command can be found in the Scenes section.)

Stereoscopic
EyeSeparation gseparation
Toggle stereoscopic rendering and set the interoccular distance.

DepthOfField
FocalDistance gdistance
LensFStop gfstop
Toggle depth of field rendering and set the focus distance and f-stop.

UseGlobalResolution nstate
Set the state of the camera's global-redirection flag for resolution settings. Turning the state on causes the camera's resolution settings to be taken from a global camera, while turning it off causes the camera's own settings to be in effect.

0 - Off
1 - On


UseGlobalBlur nstate
Set the state of the camera's global-redirection flag for motion blur settings. Turning the state on causes the camera's motion blur settings to be taken from a global camera, while turning it off causes the camera's own settings to be in effect.

0 - Off
1 - On


UseGlobalMask nstate
Set the state of the camera's global-redirection flag for mask boundary settings. Turning the state on causes the camera's mask boundary settings to be taken from a global camera, while turning it off causes the camera's own settings to be in effect.

0 - Off
1 - On

Items

These commands operate on the currently selected item and work with items of all types. Use the Item Info or Interface Info globals to get the current values of the parameters set by many of these commands.

ClearSelected [nsilent]
Remove the selected items from the scene. The optional argument can be set to supress the "Are you sure" confirmation dialog. 0 to ask, 1 to clear items but ask about descendants, 2 to clear descendants but as about item, 3 to clear items and descendants without asking.

Rename sname
Rename the item. This works for all item types except objects, which derive their names from their filenames.

Clone nclones
Create one or more clones of the item.

ItemActive nactive
Make the item active or inactive. An inactive item doesn't participate in rendering calculations. Inactive objects are 100% dissolved, and inactive lights have an intensity of 0. For bones, the command is a synonym for the BoneActive command. It currently has no effect on cameras.

ApplyServer sclass sserver
Apply a plug-in. The arguments are the first and second fields of the ServerRecord for the plug-in.

ApplyServerByItemID xID sclass sserver
Apply a plug-in. The first argument is the id of a valid item, the following two arguments are the first and second fields of the ServerRecord for the plug-in.

PositionServerByItemID xID sclass sserver nindex
Set the evaluation position of a plug-in. The first argument is the id of a valid item, with the next two arguments being the first and second fields of the ServerRecord for the plug-in. The last argument is the position in the list, with 1 indicating the head of the list, and -1 indicating the tail. If the index value exceeds the current number of elements in the list (less the server in question), then the behavior will be equivalent to passing -1 for the index -- i.e., the server will be moved to the end of the list.

NOTE: As of build 1303, this command supports only ItemMotionHandler and DisplacementHandler classes of plug-in.

RemoveServer sclass nindex
Remove a plug-in. The index refers to the list of applied servers of a given class. The first server in each list has an index of 1.

EnableServer sclass nindex nenable
Enable or disable a plug-in. The index refers to the list of applied servers of a given class. The first server in each list has an index of 1.

AddEnvelope schannel
RemoveEnvelope schannel
Create or remove the envelope associated with a parameter in Layout. These commands "press the E button" for envelopes Layout itself maintains. Use them for envelopes not created by your plug-in through either the Variant Parameters or Animation Envelopes globals. The channel argument is the same as the channel name displayed in the Scene Editor when an item's channel list is expanded.

SchematicPosition nX nY
Set the position of the current item within schematic views. The coordinates are relative to the upper left corner of the view pane.

ItemLock nlocked
Lock or unlock the selected item. A locked item can't be selected by clicking on it in the view.

ItemVisibility nvisibility
Set the visibility of the selected item. The argument can be any of the values returned by the Interface Info global's itemVis function.

ItemColor ncolor
Set the wireframe color of the selected item. The argument is an index into a color table.
 
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

ItemIconScale gscale
Scales the icon representing the selected items in the layout viewports. For example, the light icons, camera icons, and bone icons.

Motion

Motion commands operate on the current item. Use the param function of the Item Info global, as well as the Animation Envelopes and Channel Info globals, to read motion-related settings.

CreateKey gtime
Create a key for all nine motion channels (position, rotation and scale). If a key already exists, this changes its settings.

DeleteKey gtime
Delete all of an item's motion keys at a given time.

AutoKey
Toggle the Auto Key setting. When on, changes in the position, rotation or scale of an item are automatically recorded to a key. When off, a key must be created explicitly.

Position gX gY gZ
Rotation gH gP gB
Scale gX gY gZ
Position, rotate or scale the item. This has no effect on keys at the current time unless Auto Key has been turned on.

AddPosition gX gY gZ
AddRotation gH gP gB
AddScale gX gY gZ
Increment the motion. Like Position, Rotation and Scale, but the values are relative rather than absolute.

PivotPosition gX gY gZ
PivotRotation gH gP gB
Set the position and rotation of the pivot (the origin of the item's rotation).

RecordPivotRotation
Add the current item rotation angles to the pivot rotation, and reset the item rotation angles to (0, 0, 0).

Numeric
Prepare for numeric entry. The specific behavior depends on which tool is active. For the Move, Rotate and Size tools, this activates the vector edit fields, and values typed after this will be entered there.

EnableXH
EnableYP
EnableZB
Unlock or lock a channel against changes caused by mouse dragging. Which channel is affected depends on which tool is active. If the Move tool is active, for example, EnableXH toggles the enable state of the X channel, and when it's disabled, moving an item by dragging the mouse may affect the Y and Z components of its position, but not the X component.

LockAxis naxis nonoff
Locks on unlocks a channel against changed caused by mouse dragging. Channel 0 is the X channel, 1 the Y channel, and so on to Z, Heading, Pitch, Bank, X Scale, Y Scale, and Z Scale. The lock is enabled if onoff is 1, disabled if 0.

WorldCoordinateSystem
ParentCoordinateSystem
LocalCoordinateSystem
These affect the coordinate system in which mouse movement is interpreted for the motion tools. Moving the mouse can move an item along the world, parent or local (item) axes.

LoadMotion sfilename
SaveMotion sfilename
Load or save an item's keyframes in a motion file. The format of the file is similar to the format of the key data in scene files.

Undo
Undo the most recent motion change.

Reset
Set an item's animation channels to the values they had when the object was created or loaded. Which channels are affected depends on which tool is currently active. Channels disabled by EnableXH, EnableYP or EnableZB are not reset.

ParentItem xID
Set the parent of the current item to the item given by the ID. The item's motion is relative to that of its parent.

ParentInPlace [nstate]
A global setting. When turned off, setting a parent relationship causes the child item to jump to a new (world coordinate) position, since the child's position setting suddenly becomes relative to that of its parent. When turned on, parenting in place prevents the jump, adjusting the child's position relative to its parent so that its world position doesn't change. The state input is optional. If not given, the setting is toggled. This setting can be read as a flag using the Interface Info global.

TargetItem xID
Set the target of the current item to the item given by the ID. The item will rotate so that it points toward the target.

PoleItem xID
Set the pole of the current item to the item given by the ID.

PositionItem xID
Set the position item for the "Same As Item" motion of the current item to the item given by the ID.

PositionItemWorld nstate
Sets the "World" flag for the position item for the "Same As Item" motion of the current item.

PositionItemBlendMethod nmethod
Set the position item blend method for the "Same As Item" motion of the current item.

0 - Interpolate
1 - Compensate


PositionItemBlend gblend
Set the position item blend factor for the "Same As Item" motion of the current item.

RotationItem xID
Set the rotation item for the "Same As Item" motion of the current item to the item given by the ID.

RotationItemWorld nstate
Sets the "World" flag for the position item for the "Same As Item" motion of the current item.

RotationItemBlendMethod nmethod
Set the rotation item blend method for the "Same As Item" motion of the current item.

0 - Interpolate
1 - Compensate


RotationItemBlend gblend
Set the rotation item blend factor for the "Same As Item" motion of the current item.

ScaleItem xID
Set the scale item for the "Same As Item" motion of the current item to the item given by the ID.

ScaleItemWorld nstate
Sets the "World" flag for the scale item for the "Same As Item" motion of the current item. This flag currently does nothing.

ScaleItemBlendMethod nmethod
Set the scale item blend method for the "Same As Item" motion of the current item.

0 - Interpolate
1 - Compensate


ScaleItemBlend gblend
Set the scale item blend factor for the "Same As Item" motion of the current item.

PathAlignLookAhead gtime
Set the look-ahead interval, in seconds, for motion channels controlled by Align to Path and Align to Velocity. This is the amount of time by which changes in orientation of the item anticipate changes in the path direction.

PathAlignMaxLookSteps nsteps
Set the maximum number of steps used by Align to Path to find a reliable distance traveled to compute the path direction.

PathAlignReliableDist gdistance
Set the distance traveled which is considered to be reliable to compute the path direction for motion channels controlled by Align to Path.

EnableIK
A global toggle that enables or disables inverse kinematics calculations for all items.

UnaffectedByIK
Toggle the Unaffected by IK of Descendents option. When on, the item is isolated from the motion effects of inverse kinematics applied to the item's children. The item becomes the base of the IK chain containing its children.

EnableMC
A global toggle that enables or disables motion controllers for all items. This includes targeting, pole vectors, position/rotation/scale "Same As Item", and align to path and velocity, but not IK.

GoalItem xID
Set the IK goal of the current item to the item given by the ID.

GoalObjective nobjective
Set the IK goal objective of the current item.

0 - Go to Goal
1 - Point at Goal


IKFKBlending gblend
Sets the blending between IK and FK. A value of 0 means fully IK, while 1 gives fully FK.

UseIKChainVals nstate
Sets whether or not to use chain values or per-item values. This currently only affects IK/FK blending. The state is 1 to turn on, or 0 to turn off.

IKInitialState nstate
Sets how the IK solver determines the initial state to start solving from.

0 - Use values from the first keyframe
1 - Use most recent keyframe
2 - Use values from current time
3 - Use values from custom frame


IKInitialStateFrame nframe
Sets the frame number to use when the initial IK state is set to use the custom frame number.

SoftIK ntype
Sets the soft IK type for the item.

SoftIKDistanceType ntype
Sets soft IK distance type:

0 - Use the soft IK min and max values as a fraction of the straight-line distance between chain root and goal
1 - Use the soft IK min and max values as a fraction of the distance along chain from root to goal
2 - Use the soft IK min and max values as distances directly


SoftIKMin gmin
SoftIKMax gmax
Sets the min and max values for soft IK.

FullTimeIK
Toggle Full-time IK for the item. This determines whether IK is recalculated each time the item's goal is moved.

GoalStrength gstrength
Set the strength, or amount of influence, of an item's IK goal. The goal strength is relative to that of the other goals associated with an IK chain.

MatchGoalOrientation
When on, this toggle causes the item's rotation and scale to match that of its goal.

KeepGoalWithinReach
When on, this toggle constrains the motion of the goal so that it's always "attached" to the item.

XController ncontroller
YController ncontroller
ZController ncontroller
HController ncontroller
PController ncontroller
BController ncontroller
SXController ncontroller
SYController ncontroller
SZController ncontroller
Set the controller for each position, rotation, and scale channel. The argument can be any of the values returned by the Item Info controller function.

XLimits gmin gmax
YLimits gmin gmax
ZLimits gmin gmax
HLimits gmin gmax
PLimits gmin gmax
BLimits gmin gmax
SXLimits gmin gmax
SYLimits gmin gmax
SZLimits gmin gmax
Set minimum and maximum limits for each position, rotation, and scale channel.
 
RecordMinPosition
RecordMaxPosition
Use the current position of the item as the minimum or maximum limit for all three position channels.
RecordMinAngles
RecordMaxAngles
Use the current rotation of the item as the minimum or maximum limit for all three rotation channels.
RecordMinScale
RecordMaxScale
Use the current scale of the item as the minimum or maximum limit for all three scale channels.

LimitX
LimitY
LimitZ
LimitH
LimitP
LimitB
LimitSX
LimitSY
LimitSZ
Enable or disable position, rotation, scale limits.

XStiffness gstiffness
YStiffness gstiffness
ZStiffness gstiffness
HStiffness gstiffness
PStiffness gstiffness
BStiffness gstiffness
SXStiffness gstiffness
SYStiffness gstiffness
SZStiffness gstiffness
Set the stiffness (resistance to position, rotation, and scale via IK).

UpdateMotion
Forces any deferred motion calculations to occur. When changing motion parameters such as position, any effects on the item or other items in the scene may be deferred until there is some spare time. This is done for improved interactivity. However, sometimes a script needs to have the motion fully updated before executing some other commands (for example, parenting in place after changing the position of an item). This command forces the motion to be updated before returning.

DirtyMotion
Marks the motion of the currently selected item as dirty. This forces Layout to re-evaluate the motion parameters of the item when needed.

Effects

These commands affect settings on the Effects panel. Use the Backdrop Info and Fog Info globals to read these settings.

GradientBackdrop
ZenithColor gred ggreen gblue
SkyColor gred ggreen gblue
GroundColor gred ggreen gblue
NadirColor gred ggreen gblue
SkySqueezeColor gred ggreen gblue GroundSqueezeColor gred ggreen gblue
Enable or disable the gradient backdrop, and set its key colors.

FogType ntype
Set the fog type. The type can be any of the values that are valid for the Fog Info type field.

FogMinDistance gdistance
FogMaxDistance gdistance
Set the distance extents of the fog.

FogMinAmount gamount
FogMaxAmount gamount
Set the fog amounts at the minimum and maximum distances.

FogColor gred ggreen gblue
Set the fog color.

Scenes

These commands involve render options and scene loading and saving. You can read many of the parameters using the Scene Info global.

ClearScene
Clear the scene. All items are removed and all scene parameters are reset to their default values.

LoadScene sfilename
Load a scene file.

LoadFromScene sfilename
Load the objects, lights, or other elements from a scene file.

LoadElementsFromScene nelements sfilename
Load the the given elements from a scene file. This is like LoadFromScene but the options dialog is skipped, using the elements value to select what elements to load from the scene. The elements value is the sum of one or more of:
  •    1: Objects
  •    2: Lights
  •    4: Cameras
  •    8: Graph editor data
  •   16: Master plugins
  •   32: Environment plugins
  •   64: Volumetric plugins
  •  128: Pixel filters
  •  256: Image filters
  •  512: Merge only motion envelopes
  • 1024: Bones

SaveScene
SaveSceneAs sfilename
Save the scene.

SaveLWSC1 sfilename
Save the scene in version 1 format. This is the scene file format used by versions of LightWave® prior to 6.0. Some information may be lost, since the old format doesn't support many of the newer features.

SaveSceneCopy sfilename
Save a copy of the scene. Unlike SaveSceneAs, SaveSceneCopy doesn't rename the scene.

ContentDirectory sdirname
Set the content directory (a file system path). Objects and other files referenced in the scene are listed relative to this path.

FirstFrame nframe
LastFrame nframe
FrameStep nframes
Set the frame range and step size for rendering.

FramesPerSecond gfps
Set the playback speed of the animation. This is used to convert between frame numbers and elapsed time in seconds.

AutoFrameAdvance
Toggle the Auto Frame Advance feature. During rendering with this turned off, the user must confirm before each frame is rendered.

EnableVIPER
Enable or disable the VIPER (Virtual Interactive Preview Render) system. Enabling VIPER allows it to store buffers from the most recently rendered frame, but doesn't open the VIPER window.

RayTraceShadows nenabled
RayTraceReflection nenabled
RayTraceRefraction nenabled
RayTraceTransparency nenabled
RayTraceOcclusion nenabled
Toggle raytracing of shadows, reflection, refraction and transparency.

LimitDynamicRange nenabled
Clamps the dynamic range.

RenderFrame
RenderSelected
RenderScene
Render the current frame, render only the currently selected objects in the frame, or render all frames.

GlobalFrameSize nwidth nheight
GlobalResolutionMultiplier gmultiplier
GlobalPixelAspect gaspect
GlobalApertureHeight gheight
GlobalMotionBlur ntype
GlobalParticleBlur
GlobalBlurLength glength
GlobalMotionBlurPasses npasses
GlobalShutterEfficiency gefficiency
GlobalMaskPosition nleft ntop nwidth nheight
Global forms of the camera-specific commands. Using these commands will cause the settings in the scene's "global" camera to be altered, not those of a selected camera.

Navigation

These commands are concerned with the user's navigation within Layout's interface, but being able to set the current frame and animate the display is also useful to plug-ins. The current frame is available from the Interface Info global as the current time. Use the framesPerSecond field from the Scene Info global to convert this to a frame number.

Some of these commands operate on a single view pane, the one that currently contains the mouse cursor.

GoToFrame nframe
PreviousFrame
NextFrame
PreviousKey
NextKey
Shuttle the display to a specific frame, an adjacent frame, or the next or previous frame containing a motion key.

Refresh
RefreshNow
Tell Layout to recompute motions and geometry. After changing the current frame, plug-ins that bake geometry can issue the RefreshNow command so that vertex positions are updated immediately. By default, Refresh runs during idle time, which won't occur while a plug-in's code is executing.

Redraw
RedrawNow
Redraw the display. Like RefreshNow, RedrawNow executes immediately rather than waiting for idle time. But the draw commands by themselves don't cause motions and geometry to be recomputed.

InteractiveMode nonoff
Switches the interactive viewport redraw(respecting the bounding box threshold) flag on/off.
Switch on(1) for starting interactive mode redraws, off(0) to switch back to full redraws.
Set this flag for the duration of mouse dragging in plugin panels when interactive viewport updates are desired.

PlayForward
PlayBackward
Pause
Animate the display, or make it stop animating.

PreviewFirstFrame nframe
PreviewLastFrame nframe
PreviewFrameStep nframes
Set the range of frames and the frame step for animating the display. The frame range also affects the range of frames that are accessible to the user through the frame shuttle control.

MakePreview
PlayPreview
FreePreview
LoadPreview
SavePreview
Manage pre-rendered previews. These store the animated display as an image sequence.

ClearAudio
LoadAudio
PlayAudio
Manage Layout's audio track.

FractionalFrames
When this toggle is set, Layout allows the user to move the frame shuttle to non-integer frame numbers.

CenterMouse
Center a view over the current mouse position.

CenterItem
Center a view over the position of the selected item. This is a toggle that causes the view to remain centered on the item while it's being moved.

FitAll
FitSelected
Scale and move a view so that it contains all items or all selected items.

ZoomIn
ZoomOut
ZoomInX2
ZoomOutX2
Scale a view. The X2 versions scale the view by a factor twice as large.

Display

These commands set display options. Many of these can be read from the Interface Info global. As with some navigation commands, many of these commands operate on the view pane that contains the mouse cursor.

GridSize gsize
IncreaseGrid
DecreaseGrid
Set the grid size, or scale it in approximately logarithmic steps: 1, 2, 5, 10, 20, 50, and so on. The grid size is the interval in meters between grid lines in the display. The scale of the view is relative to this size, so the entire scene (but not the grid) will appear to grow or shrink in the view panes as this number is changed.

DynamicUpdate nlevel
Set the amount of display interactivity. The level can be any of the values that are valid for the Interface Info dynaUpdate field.

ShowMotionPaths
ShowHandles
ShowIKChains
ShowCages
ShowSafeAreas
ShowFieldChart
ShowTargetLines
Toggle the drawing of these display components.

BoundingBoxThreshold nthreshold
Set the minimum number of points at which an object will be drawn initially as a bounding box. Lower numbers improve interactivity, but plug-ins that bake geometry transformations may need to set this above the number of points in the object they're baking. Otherwise only the bounding box vertex positions will be computed by Layout.

TopView
BottomView
BackView
FrontView
RightView
LeftView
XYView
XZView
ZYView
PerspectiveView
LightView
CameraView
SchematicView
Set the type of view in a view pane. The first six are orthographic views in the direction of the world -Y, +Y, -Z, +Z, -X and +X axes, respectively. XYView (X increasing to the right on the display, Y increasing upwards) is a synonym for BackView. XZView (X right, Y up) is a synonym for TopView, and ZYView (Z right, Y up) is a synonym for RightView. The light and camera views look through the selected light and camera. The schematic view is a diagram of the parenting hierarchy.

ViewLayout nlayout
PreviousViewLayout
NextViewLayout
SingleView
Select a view layout, the arrangement of up to four view panes. The layout indexes are
 
0 1 2 3 4 5 6 7 8 9 10 11

SingleView is a synonym for ViewLayout 0.

SaveViewLayout
Make the current view layout the default.


HardwareShadingMethod sshading_method
Setting the hardware shading method to be used in the viewports.
Currently available shading methods:
  • MultitextureShaders
  • GLSLShaders

HardwareGeometryAccelerationMethod sgeometry_acceleration_method
Setting the hardware geometry acceleration method to be used in the viewports.
Currently available acceleration methods:
  • Streaming
  • Buffered(VBO)

Layout_SetWindowPos nX nY
Scene_SetWindowPos nX nY
Item_SetWindowPos nX nY
Set the position of Layout's main window and the Scene Editor and Item Properties panels. The arguments are the screen coordinates of the upper left corner.

Layout_SetWindowSize nwidth nheight
Scene_SetWindowSize nwidth nheight
Set the dimensions of Layout's main window and the Scene Editor panel.

HideToolbar
Toggle the visibility of the toolbar (the vertical strip of buttons next to the view area).

AddButton scommand sgroup
Add a button to the toolbar or one of the other menu areas. The group is the name of the menu group in which the button will be added.

AlertLevel nlevel
Set the alert level. This controls the method used to display warning, error and informational messages. The level can be any of the values returned by the Interface Info alertLevel function.

AutoConfirm non_off
Set the auto-confirm switch. When this is turned on, confirmation dialogs that would otherwise be displayed to the user are suppressed. Plug-ins can use this to issue a large number of commands without inundating the user with requests to confirm each operation. Remember to turn it off again when you no longer need it.

Tools

These enable specific tools. Once a tool is active, the user's mouse movements and button clicking are interpreted as operations of the tool. These are available as commands primarily so that the user can map them to shortcut keys, but a few of the commands (Reset, for example) use the active tool as a context.

MoveTool
RotateTool
SizeTool
StretchTool
SquashTool
MovePivotTool
RotatePivotTool
MovePathTool
MorphAmountTool
RestLengthTool
ConeAngleTool
CameraZoomTool
AdjustRegionTool
LightIntensityTool
ChangeTool

Panels

These commands open or close panels.

EditServer sclass nindex
LastPluginInterface
Display a plug-in's interface. The class is the first field of the plug-in's ServerRecord, and the index refers to the list of applied servers of a given class. The first server in each list has an index of 1. Use the Item Info global to examine each item's server lists.

HideWindows
Toggle the visibility of open panels.

About
Display the About dialog.

SceneEditor
GraphEditor
SurfaceEditor
ImageEditor
ItemProperties
DisplayOptions
GeneralOptions
FlareOptions
VolumetricLightingOptions
MotionOptions
PreviewOptions
RenderOptions
NetRender
Backdrop
Volumetrics
Compositing
ImageProcessing
AboutOpenGL
VIPER
Presets
Statistics
EditMenus
EditKeys
EditPlugins
MasterPlugins
Generics
CommandHistory
CommandInput scommand
Open one of the panels, or close the panel if it's open.

Compositing

These commands affect the settings for scene Compositing.

SetBackgroundImage sname
Set the background image to the named image. The image must already be loaded into the scene. You should use the image name "(none)" to clear an existing image from the slot.

SetForegroundImage sname
Set the foreground image to the named image. The image must already be loaded into the scene. You should use the image name "(none)" to clear an existing image from the slot.

SetForegroundAlphaImage sname
Set the foreground alpha image to the named image. The image must already be loaded into the scene. You should use the image name "(none)" to clear an existing image from the slot.

SyncImageToFrame nframe
Sets the frame to which the first image in a sequence should synchronize. Can only be 0 or 1.

EnableForegroundFaderAlpha nenable
Enables or disables the foreground fader alpha mechanism. Should be 0 (off) or 1 (on).

SetForegroundDissolve gpercent
Sets the dissolve amount of the fader alpha, usually a value between 0.0 and 1.0.

EnableForegroundKey nenable
Enables or disables the foreground key mechanism. Should be 0 (off) or 1 (on).

SetLowClipColor gred ggreen gblue
Sets the value for the low clip color.

SetHighClipColor gred ggreen gblue
Sets the value for the high clip color.

Miscellaneous

These commands don't easily fit into any of the other categories.

Model
Switch to Modeler. If Modeler isn't running, it will be started. If the Hub isn't running, the command has no effect.

Synchronize
Synchronize objects in the scene with Modeler (reload objects that have been modified in Modeler).

AddPlugins sfilename
Install the plug-ins found in the file.

SaveCommandList
Save a list of these commands as a text file. The list will also contain all of the installed LayoutGeneric class plug-ins, as well as commands for some of the editors.

StatusMsg
Displays a text message in the "tooltip" area of the main Layout interface. This function also recognizes a meta-character sequence that prefaces the text string. A floating point value between 0.0 and 1.0, enclosed within curly braces, will cause the message displayed to have a background progress bar drawn as well. For example:

"{.25}Loading object..."

Would be displayed with 25% of the text background in a different color. By repeatedly calling StatusMsg with an increasing value in this area, your plug-in can animate a progress status bar along with the message.

Quit
Quit Layout.

ActivateMaster sname
Causes the Master class plug-in with the given name to be activated in the Master plug-ins panel

ActivateMasterUnique sname
Identical to ActivateMaster except that it will not create a new instance of the named plug-in if another instance is already is active.

RemoveMaster sname
Removes the first instance of the named Master plug-in.

CalculateAllNormals non/off
Forces the calculation of normals, in layout or while rendering. The state of this command can be read from the scene info structure. This command when enabled will slow down layout. It should only be used by plugins that need the extra normal information, and then turned off when returning to layout.