Data Structure

Objects contains various parameters (constant and time dependant) and attributes, and attributes have various parameters themselves.

Time dependent parameters with n-dimensions are called ParamGroup (Parameter Group).
For example, Object "Camera" have 3-dimensional ParamGroup "Position". The command to set position at time 0 is,
Data.ParamGroup("Camera", "Position").SetValueAt(0, 1, 1, 1)
Time-independent parameter is called ConfItem (It is named after ITEMs in CONFfigure dialog...) You can get the list of confitem by commands such as
print(Data.Object("Camera").GetConfList())
Type Visible Shy
Objects have attributes according to its type. For example, camera object has three attributes (properties for camera setting, focal blur and strerograph.)
print(Data.Object("Camera").GetAttribList())
CameraProp FocalBlurProp StereoProp
Each attribute has its own ParamGroups and ConfItems. Modifiers and Processors are stored as attributes.

List of API

Table I.
CommandEffectreturn value
Ops.ActiveObject.Delete()Delete active object.
Rename("name")Rename active object
GetVisibility()Get visibility of active object.bool
SetVisibility(bool visibility)Set visibility of active object.Success or not
GetValidity()Get validity of active object.bool
SetValidity(bool validity)Set validity of active object.Success or not
GetShy()Get shy state of active object.bool
SetShy(bool shy)Set shy state of active object.Success or not
GetParameterLink("param")Get link state of parameter group of active object.bool
SetParameterLink("param", bool link)Set link state of paramer group of active object.Success or not
AddCamera("name")Add a cameraname of new camera.
AddPrimitive("type", "name")Add a primitivename of new primitive
AddLight("name")Add a light sourcename of new light
AddEmpty("name")Add an emptyname of new empty
AddWorld("name")Add a worldname of new world
AddVolumeBox("name")Add a volume boxname of new empty
AddParticle("name")Add a particle systemname of new empty
AddStreamline("name")Add a streamlinename of new streamline
AddHeightField("name")Add a height fieldname of new empty
DeleteObject("name")Delete object
DeselectObject("name")Deselect object
SelectObject("name", bool additive)Select an object(set additive=1 to select additively)
SelectedObject.MoveTo("name", bool under)Move selected object(s) above/under target object
SetChildTo("name")Set selected object(s) to be child of target object *
Delete()Delete selected objects
SetVisible(bool visibility)set visibility of selected object(s)
Data.GetName("name")Get namename
GetActiveObject()Get Active objectname
GetParent("name")*1Get parent object of target objectname
GetChild("name", int n)Get n-th child of targetname
GetChildList("name")Get a list of children of targetlist of name
GetPosition("name")Get position of targetvalue (3-dimension)
GetRotationEuler("name")Get rotation of targetvalue (3-dimension)
GetScale("name")Get scale of targetvalue (3-dimension)
Object("name").GetVisibility()Get visibilitybool
SetVisibility(bool visiblity)Set visiblitySuccess or not
GetValidity()Get validitybool
SetValidity(bool validity)Set validitySuccess or not
GetShy()Get shy statebool
SetShy(bool shy)Set shy stateSuccess or not
GetConfList()Get list of conf itemlist of name
GetConfItem("item")Get conf itemstring
GetAttribList()Get list of attributelist of name
GetAttrib("attrib")Get Attribute (Use command In Table II.)
ParamGroup("name", "param").GetDimension()Get dimension of parameter group.integer
GetValueAt(nt)Get values at normalized time ntvalue (multi-dimensional)
SetValueAt(nt, ...)Set value at normalized timevalue (multi-dimensional)
GetLink()Is parameters in group are linked.bool
SetLink(bool link)Set parameters in group to be linked.Success or not
GetShy()Is parameter group in shy state.bool
SetShy(bool shy)Set parameter group to be shy.Success or not
GetUseExpression()Is parameter group use expression.bool
SetUseExpression(bool use)Set parameter group to use expression.Success or not
GetExpression()Get expression.string
SetExpression(string expr)Set expression.Success or not
GetTimeDependency()Are parameters in group time dependentbool(multi-dimensional)
SetTimeDependency(...)Set each parameters in group to be time dependent.Success or not
This. *2GetValueAt(nt)Get value at normalized time nt (non-expression)value (multi-dimensional)
GetKeyNum(i)Get key number of i-th parameternumber

*1 Object that is not children of other object is defined as a child of "ROOT"
*2 Valid only in the expression of parameter group.

Table II.
TargetCommandEffectreturn value
AttributeGetConfList()Get list of conf itemlist of string
GetConfItem("conf")Get conf itemstring

Example

Following is a sample of one line script in Lua Console.
for nt=0,1,0.1 do Data.ParamGroup("Box", "Position").SetValueAt(nt, math.cos(nt*6.283), math.sin(nt*6.283), 0) end

This script makes 10 key frames in position parameter group of a object "Box" that rotate around the origin.
Note that position parameter must be set time-dependent at first. inserted by FC2 system