Constraint

Object Hierarchy | Related C++ Class: Constraint

Inheritance

SIObject

ProjectItem

Property

Constraint

Introduced

v1.0

Description

The Constraint object represents a constraint in the scene graph. Constraints allow you to constrain objects to other object's animation. For example, you can constrain an object to always point in the direction of another object using the direction constraint. You apply constraints on objects using the Kinematics.AddConstraint method. You can find the constraints that are being applied to an object using the Kinematics.Constraints property or find which constraint is driving a particular parameter using the Parameter.Source property. You can get the Constraint's type with SIObject.Type property.

Methods

AddCustomOp AddICEAttribute AddScriptedOp AddScriptedOpFromFile
AnimatedParameters2 BelongsTo operator EvaluateAt GetICEAttributeFromName
IsA IsAnimated2 IsClassOf operator IsEqualTo operator
IsKindOf IsLocked operator IsSelected operator LockOwners
RemoveICEAttribute SetAsSelected operator SetCapabilityFlag operator SetLock
TaggedParameters UnSetLock    
       

Properties

Application Branch operator BranchFlag operator Capabilities operator
Categories Constrained Constraining EvaluationID
Families operator FullName operator Help HierarchicalEvaluationID
ICEAttributes LockLevel operator LockMasters operator LockType operator
Model Name operator NestedObjects ObjectID
Origin OriginPath Owners PPGLayout operator
Parameters operator Parent Parent3DObject Selected operator
Singleton operator Type operator UpVectorReference  
       

Examples

VBScript Example

' 
' This example illustrates how to apply a direction constraint to a sphere so that it always
' points in the direction of the null. We then enumerate all the constraints on the sphere
' using the kinematics.contraints property.
' 
Dim oRoot, oNull, oSphere 
set oRoot = Application.ActiveProject.ActiveScene.Root
set oNull = oRoot.AddNull
set oSphere = oRoot.AddGeometry("Sphere","MeshSurface")
oSphere.Kinematics.AddConstraint "Direction", oNull 
set oConstraints = oSphere.Kinematics.Constraints
for each oCns in oConstraints
	LogMessage oCns.FullName
next

See Also

ConstraintCollection Kinematics Kinematics.AddConstraint Parameter.Source ApplyCns