SaveKeyOnPath

Introduced

v1.0

Categories

animation constraint

Description

Adds a key on the path that constrains the given object.

A path ( an interpolated nurbs curve ) is created if one does not already exist. Then a path constraint is applied between the given objects and the new curve.

If a path constraint already exists, a position is added onto the existing curve and a key is added on the path percentage property ( ObjectName.kine.PathCns.Percentage ) of the constraint at the given time.

Scripting Syntax

SaveKeyOnPath( [InputObj], [Time], [X], [Y], [Z], [Locked] );

Parameters

Parameter Type Description
InputObj String List of objects.

Default Value: Current selection

Time Real Number Frame at which the object is at new position on the curve

Default Value: Current frame

X Real Number X Position ( Global ) where the path will pass by

Default Value: current position

Y Real Number Y Position ( Global ) where the path will pass by

Default Value: current position

Z Real Number Z Position ( Global ) where the path will pass by

Default Value: current position

Locked Boolean True to position the key at an absolute length along the curve. False to position the key a relative percentage along the curve.

Default Value: False

Examples

VBScript Example

set a = sigetprim("null", "a")
SaveKeyOnPath "a", 1, -3.093, 0.000, -0.773 
SaveKeyOnPath "a", 25, 0.080, 0.000, -3.841, True  
SaveKeyOnPath "a", 50 ,0.162, 3.680, -0.368
'As a result, the object "a" will be constrained and animated on a path with three positions. 
'The object will pass through those points at the given time. Animation key are added to the path 
'percentage paramater of the path constraint.