There are several properties and methods accessible on scene nodes that correspond to the Bone parameters and functions in the node properties dialog.
These properties and methods are exposed by the INode Node Interface - Interface : INode
See <node>.setBoneEnable for the set method.
When turned off, the bone's pivot point will not align to its child object.
The translation of a child bone will not be converted into rotation of the parent.
Instead the child will be allowed to move away from the parent's X-axis.
When turned on, the bone maintains its length.
When turned off, the bone's length is based on the translation of its child bone.
This option is available only if Auto-Align is on.
one of #scale, #squash, or #none
#None - No stretch takes place.
#Scale - Lets the bone scale. The stretch happens along one axis.
#Squash - Lets the bone squash. The bone gets fatter as it gets shorter, and thinner as it gets longer.
Normally, matrix concatenation occurs in the following manner:
objectTM = objectOffsetTM * stretchTM * nodeTM
So code that uses the objectTM will transparently inherit the effects of the stretchTM.
However if you want the stretchTM included but not the object offset, this property will return the stretchTM alone.
If the node is not a bone or has no stretching, this property will return the identity matrix.
Sets the Bone enable on or off.
When turned on, the bone or object behaves as a bone. Turning this option off causes the node to stop behaving like a bone. There is no auto alignment or stretching. Note that turning this option on will not cause the object to immediately align or stretch. However future translations of children may cause rotation and stretching. Default=on for bone objects, off for other objects.
Specifies the time at which to calculate and store initial child position.
This is usually used with the current time slider position.
The time associated with the time slider can be queried and set using the sliderTime global variable.Time Control
Rotates the node such that its X axis points at the average position of all children with the bone property turned on.
Resets the initial child position used to compute the stretch factor to the current child position.
This will cause the stretch factor to become equal to one.
If it was previously not equal to one then the object would snap to its original unstretched state.