Data types & properties
As well as the standard Python data types MotionBuilder has its own types, a few of which are:
pyfbsdk::FBColor
andpyfbsdk::FBColorAndAlpha
,pyfbsdk::FBMatrix
: which create fixed-length list-like object.pyfbsdk::FBModelList
: a list that can only contain instances ofFBModel
objects.pyfbsdk::FBMatrix
: a list-like object fixed to 16 floating point values.FBPickInfosList
: anFBArrayTemplate
that only containsFBPickInfos
structures, giving the position (pyfbsdk::FBVector3d
) and the model (FBModel
) that was picked on screen.FBComponentList
: anFBArrayTemplate
that only containsFBComponent
objects. It is not possible to add new objects to the list.
You can create custom properties with FBComponent::PropertyCreate
. See the sample script CustomProperty.py.
Some properties can be written, others are read-only. Their control over this is currently run-time, and if you write to a non-editable property, the plugin ceases its execution due to an invalid function call.