As well as the standard Python data types MotionBuilder has its own types, a few of which are:
- pyfbsdk::FBColor and pyfbsdk::FBColorAndAlpha, pyfbsdk::FBMatrix: which create fixed-length list-like object.
- pyfbsdk::FBModelList: a list that can only contain instances of FBModel objects.
- pyfbsdk::FBMatrix: a list-like object fixed to 16 floating point values.
- FBPickInfosList: an FBArrayTemplate that only contains FBPickInfos structures, giving the position (pyfbsdk::FBVector3d) and the model (FBModel) that was picked on screen.
- FBComponentList: an FBArrayTemplate that only contains FBComponent 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.