Python Reference Guide
FBConstraint Class Reference

Base class for constraints. More...

#include <pyfbsdk_generated.h>

Inheritance diagram for FBConstraint:

Public Member Functions

 FBConstraint (str pName)
 Constructor. More...
 
FBAnimationNode AnimationNodeInCreate (kReference pUserId, FBModel pModel, str pAttribute)
 
FBAnimationNode AnimationNodeInCreate (kReference pUserId, FBProperty pProperty)
 Animation Node Creations (IN). More...
 
FBAnimationNode AnimationNodeOutCreate (kReference pUserId, FBModel pModel, str pAttribute)
 Animation Node Creations (IN/OUT). More...
 
FBConstraint Clone ()
 Clone the constraint. More...
 
bool DeformerBind (FBModel pModel)
 Bind/Unbind pModel to deformation constraint. More...
 
bool DeformerUnBind (FBModel pModel)
 
bool Disable (FBModel pModel)
 Disable constraint on pModel. More...
 
 FreezeSRT (FBModel pModel, bool pS, bool pR, bool pT)
 Freeze current model state. More...
 
 FreezeSuggested ()
 Suggest 'freeze'. More...
 
bool ReferenceAdd (int pGroupIndex, FBModel pModel)
 Add a reference to a specified group. More...
 
FBModel ReferenceGet (int pGroupIndex, int pItemIndex=0)
 Get a reference. More...
 
int ReferenceGetCount (int pGroupIndex)
 Get number of references in a specified group. More...
 
int ReferenceGroupAdd (str pGroupName, int pMaxItemCount)
 Add a group of references. More...
 
int ReferenceGroupGetCount ()
 Return the number of reference groups. More...
 
int ReferenceGroupGetMaxCount (int pGroupIndex)
 Get the maximum number of items that can exist in the reference group in question. More...
 
str ReferenceGroupGetName (int pGroupIndex)
 Get the name of the reference group. More...
 
bool ReferenceRemove (int pGroupIndex, FBModel pModel)
 Remove a reference to pModel from the group at pGroupIndex. More...
 
 RemoveAllAnimationNodes ()
 Remove animation nodes. More...
 
 RestoreModelState (FBModel pModel)
 Restore the saved model state onto pModel. More...
 
 SaveModelState (FBModel pModel, bool pS, bool pR, bool pT)
 Save current state of pModel. More...
 
 SetupAllAnimationNodes ()
 Setup animation nodes. More...
 
 SnapSuggested ()
 Suggest 'snap'. More...
 
- Public Member Functions inherited from FBBox
 FBBox (str pName)
 Constructor. More...
 
bool AnimationNodeDestroy (FBAnimationNode pAnimationNode)
 Destroy an animation node. More...
 
FBAnimationNode AnimationNodeInGet ()
 Get the (IN/OUT) animation node for this box. More...
 
bool AnimationNodeIsUserData (FBAnimationNode pAnimationNode)
 Is the animation node user data? More...
 
FBAnimationNode AnimationNodeOutGet ()
 
str FbxGetObjectSubType ()
 Returns the class sub type inherited by the class of an object, for example: 'Relations', 'Parent-Child', 'Number to Vector', 'Shot'. More...
 
str FbxGetObjectType ()
 Returns the class type inherited by the class of an object, for example: 'Box', 'Constraint', 'TimelineXTrack'. More...
 
FBAnimationNode GetInConnector (int pIndex)
 Get the animation node input associated with the given index. More...
 
int GetInConnectorCount ()
 Get the number of animation node inputs for this box. More...
 
FBAnimationNode GetOutConnector (int pIndex)
 Get the animation node output associated with the given index. More...
 
int GetOutConnectorCount ()
 Get the number of animation node outputs for this box. More...
 
- Public Member Functions inherited from FBComponent
 FBComponent ()
 Constructor. More...
 
str ClassName ()
 Get the class name. More...
 
 DisableObjectFlags (FBObjectFlag pFlags)
 Disable a specific Object Flags. More...
 
 EnableObjectFlags (FBObjectFlag pFlags)
 Enable a specific Object Flags. More...
 
bool FBCreate ()
 Open Reality Creation function. More...
 
 FBDelete ()
 Open Reality deletion function. More...
 
 FBDestroy ()
 Open Reality destruction function. More...
 
FBObjectFlag GetObjectFlags ()
 Get all Object Flags (concatenated). More...
 
bool GetObjectStatus (FBObjectStatus pStatus)
 Check to see if an object status is enabled. More...
 
FBFileReference GetOwnerFileReference (p0)
 Get the owner FileReference object. More...
 
 HardSelect ()
 HardSelect. More...
 
bool HasObjectFlags (FBObjectFlag pFlags)
 Check whether a specific object flag is enabled. More...
 
bool Is (int pTypeId)
 Returns true if object is of type TypeId. More...
 
bool ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessNamespaceHierarchy. More...
 
bool ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessObjectNamespace. More...
 
int PropertyAdd (FBProperty pProperty)
 Add a property to the component's property manager. More...
 
bool PropertyAddReferenceProperty (FBProperty pReferenceProperty)
 Add a reference property to the component's property manager. More...
 
FBProperty PropertyCreate (str pName, FBType pType, str pDataType, bool pAnimatable, bool pIsUser=False, FBProperty pReferenceSource=None)
 Create user or dynamic property. More...
 
 PropertyGetModifiedList (FBArrayTemplate< FB > pPropList, FBPlugModificationFlag pModificationFlags)
 Get list of properties which have been modified since last loading. More...
 
 PropertyRemove (FBProperty pProperty)
 Remove a Property from the component's Property manager. More...
 
 SetObjectFlags (FBObjectFlag pFlags)
 SetObjectFlags. More...
 
 SetObjectStatus (FBObjectStatus pStatus, bool pValue)
 Enable/Disable a specific Object Status. More...
 

Public Attributes

bool Active
 Read Write Property: Active state.
More...
 
bool Deformer
 Read Write Property: Is a deformer constraint?
More...
 
str Description
 Read Write Property: Long description of constraint.
More...
 
bool HasLayout
 Read Write Property: Does the constraint have a layout?
More...
 
bool Lock
 Read Write Property: Lock state.
More...
 
FBAction Snap
 Function Property: Snap constraint.
More...
 
FBAnimatableDouble Weight
 Read Write Property: Weight of constraint.
More...
 
- Public Attributes inherited from FBBox
bool Animatable
 Read Write Property: Is the box animatable.
More...
 
bool Live
 Read Write Property: Is live?
More...
 
bool RecordMode
 Read Write Property: Is recording?
More...
 
str UniqueName
 internal Unique name.
More...
 
- Public Attributes inherited from FBComponent
FBListComponent Components
 List: List of components.
More...
 
str LongName
 Read Write Property: Name and namespace for object.
More...
 
str Name
 Read Write Property: Unique name of object. See sample: RemoveSuffixFromNameOfSceneElements.py. More...
 
FBListComponent Parents
 List: Parents.
More...
 
FBManager PropertyList
 Read Only Property: Manages all of the properties for the component.
More...
 
bool Selected
 Read Write Property: Selected property.
More...
 
int TypeInfo
 Contains the Type information of the object.
More...
 
- Public Attributes inherited from FBPlug
str ClassGroupName
 ClassGroupName of the object.
More...
 
int TypeInfo
 TypeInfo.
More...
 

Detailed Description

Base class for constraints.


Constructor & Destructor Documentation

◆ FBConstraint()

FBConstraint ( str  pName)

Constructor.

Parameters
pNameName of constraint.

Member Function Documentation

◆ AnimationNodeInCreate() [1/2]

FBAnimationNode AnimationNodeInCreate ( kReference  pUserId,
FBModel  pModel,
str  pAttribute 
)

◆ AnimationNodeInCreate() [2/2]

FBAnimationNode AnimationNodeInCreate ( kReference  pUserId,
FBProperty  pProperty 
)

Animation Node Creations (IN).

Used to create the In connectors on an animation node. This function will return a newly created animation node, connected to the model specified by pProperty.

Parameters
pUserIdUser specified reference number.
pPropertyProperty of model to animate (must be animatable)
Returns
Newly created IN animation node.

◆ AnimationNodeOutCreate()

FBAnimationNode AnimationNodeOutCreate ( kReference  pUserId,
FBModel  pModel,
str  pAttribute 
)

Animation Node Creations (IN/OUT).

Used to create the connectors (in or out) on an animation node. This function will return a newly created animation node, connected to the model specified by pModel.

Parameters
pUserIdUser specified reference number.
pModelModel to associate with animation node.
pAttributeAttribute of model to animate (i.e. Translation, Lcl Translation, etc.)
Returns
Newly created IN/OUT animation node.

◆ Clone()

FBConstraint Clone ( )

Clone the constraint.

Returns
Newly created (and copied) constraint.

◆ DeformerBind()

bool DeformerBind ( FBModel  pModel)

Bind/Unbind pModel to deformation constraint.

These functions are used for adding/removing a deformation binding to/from pModel if the constraint is a deformation constraint.

Parameters
pModelModel to bind/unbind.
Returns
true if successful.

◆ DeformerUnBind()

bool DeformerUnBind ( FBModel  pModel)

◆ Disable()

bool Disable ( FBModel  pModel)

Disable constraint on pModel.

Parameters
pModelModel on which constraint should be disabled.
Returns
true if successful.

◆ FreezeSRT()

FreezeSRT ( FBModel  pModel,
bool  pS,
bool  pR,
bool  pT 
)

Freeze current model state.

Parameters
pModelModel to freeze constraint on.
pSScaling freeze?
pRRotation freeze?
pTTranslation freeze?

◆ FreezeSuggested()

FreezeSuggested ( )

Suggest 'freeze'.

◆ ReferenceAdd()

bool ReferenceAdd ( int  pGroupIndex,
FBModel  pModel 
)

Add a reference to a specified group.

Parameters
pGroupIndexGroup to add reference to.
pModelModel to place at new reference.
Returns
true if successful.
Warning
If you try to add a model to a group that is already full, the success of the operation will be false and the reference will not be added.

◆ ReferenceGet()

FBModel ReferenceGet ( int  pGroupIndex,
int  pItemIndex = 0 
)

Get a reference.

Parameters
pGroupIndexIndex of reference group containing desired reference.
pItemIndexIndex of reference in group to get (default is 0).
Returns
Model at specified reference.

◆ ReferenceGetCount()

int ReferenceGetCount ( int  pGroupIndex)

Get number of references in a specified group.

Parameters
pGroupIndexIndex of group to query the number of references.
Returns
Number of references in specified group.

◆ ReferenceGroupAdd()

int ReferenceGroupAdd ( str  pGroupName,
int  pMaxItemCount 
)

Add a group of references.

Parameters
pGroupNameName of reference group to add.
pMaxItemCountMaximum number of items in pGroupName.
Returns
Index of new reference group.

◆ ReferenceGroupGetCount()

int ReferenceGroupGetCount ( )

Return the number of reference groups.

Returns
Number of reference groups.

◆ ReferenceGroupGetMaxCount()

int ReferenceGroupGetMaxCount ( int  pGroupIndex)

Get the maximum number of items that can exist in the reference group in question.

Parameters
pGroupIndexIndex of reference group.
Returns
Maximum number of items that can be added to the reference group.

◆ ReferenceGroupGetName()

str ReferenceGroupGetName ( int  pGroupIndex)

Get the name of the reference group.

Parameters
pGroupIndexIndex of the reference group to get the name for.
Returns
The name of the reference group pGroupIndex.

◆ ReferenceRemove()

bool ReferenceRemove ( int  pGroupIndex,
FBModel  pModel 
)

Remove a reference to pModel from the group at pGroupIndex.

Parameters
pGroupIndexIndex to remove reference from.
pModelModel to remove reference from.
Returns
true if successful.

◆ RemoveAllAnimationNodes()

RemoveAllAnimationNodes ( )

Remove animation nodes.

◆ RestoreModelState()

RestoreModelState ( FBModel  pModel)

Restore the saved model state onto pModel.

Parameters
pModelModel to affect with previous state.

◆ SaveModelState()

SaveModelState ( FBModel  pModel,
bool  pS,
bool  pR,
bool  pT 
)

Save current state of pModel.

Parameters
pModelModel to save.
pSScaling information?
pRRotation information?
pTTranslation information?

◆ SetupAllAnimationNodes()

SetupAllAnimationNodes ( )

Setup animation nodes.

◆ SnapSuggested()

SnapSuggested ( )

Suggest 'snap'.

Member Data Documentation

◆ Active

bool Active

Read Write Property: Active state.

◆ Deformer

bool Deformer

Read Write Property: Is a deformer constraint?

◆ Description

str Description

Read Write Property: Long description of constraint.

◆ HasLayout

bool HasLayout

Read Write Property: Does the constraint have a layout?

◆ Lock

bool Lock

Read Write Property: Lock state.

◆ Snap

FBAction Snap

Function Property: Snap constraint.

◆ Weight

FBAnimatableDouble Weight

Read Write Property: Weight of constraint.