vcanim.gif (8357 bytes)SW_fcurveKeySet
Home ] Sales ] Products ] Services ] Support ] Downloads ]

 

 


SW_fcurveKeySet

A library function which lets you set fcurve keys. If the procedure succeeds then attribute values for fcurve key points are set.

package require SW_library

SW_fcurveKeySet sceneID fcurveID numberOfKeys AttributeValues

sceneID
A scene's ID, as returned by SAA_AllocScene.
fcurveID
A function curve's ID, as returned by SAA_AllocElem.
numberOfKeys
The number of key points.
AttributeValues
this parameter is a pair, consisting of an attribute identifier (preceded by a dash) and a list of values. The identifier must a valid fcurve key attribute.

Return Value

There is no return value if function succeeds. If an error condition occurs, the return value will be a descriptive string message giving information about the error.

Example

set curSceneID [SAA_AllocScene]
Scene1
SAA_sceneGetCurrent $curSceneID
set elementID [SW_name2Element sphere1 $curSceneID]
Elem2
set translXID [SAA_AllocElem]
Elem3
set translYID [SAA_AllocElem]
Elem4
set translZID [SAA_AllocElem]
Elem5
SAA_modelFcurveCreateTranslation $curSceneID $elementID $translXID $translYID $translZID
SW_fcurveKeySet $curSceneID $translXID 10 -Time [list 0 1 2 3 4 5 6 7 8 9 ] -Value [list 1 2 3 4 5 6 7 8 9 10]

This example allocates and retrieves the current scene, retrieves the element ID corresponding to the name "sphere1", allocates and then creates (empty) translation fcurves for this element and then sets the x translation fcurve to contain 10 key points. We specify the time at which the key points occur and the corresponding value (i.e the first key point occurs at time 0 and has a value of 1).


Behaviors Overview ] Behavior Evaluate ] Behavior Edit ] Debugger ] Console ] Find ] SAA Library ] SW library ] SWC library ] SWN library index ] SWU library ] Attributes Index ] Scripting Examples ]

copyright Video-Collage Inc.