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

 

 


SWC_fcurveGet

Get fcurves

SWC_fcurveGet is a library procedure allows users to get fcurves for particular attribute of the element presenting in context passed to the procedure. Input data is a context array name and attribute's name.

package require SWC

SWC_fcurveGet  context attribute
context
specifies the element for whose attribute fcurves are to be gotten.
attribute
the name of the attribute whose fcurves are to be gotten. This must be a valid attribute for the type of object in the context.

Return Value

If SWC_fcurveCreate succeeds, it returns the ID of the fcurve of the specified attribute or a list of fcurves ID if there is more then one fcurve for the specified attribute. The fcurves of the list are in the same order as they appear in the attributes tables. Fcurve ID can be passed to any SAA function which takes a pointer to fcurve (SAA_Elem) as a parameter. If this procedure encounters an error it will return an error string message in the TK console window.

Examples

SWC_elementGet MyContext
Elem4
set fcurvesID [SWC_fcurveGet MyContext Position]
ElemArray5.0 ElemArray5.1 ElemArray5.2
SAA_fcurveGetNbKeys $MyContext(sceneID) [lindex $fcurvesID 0] nb_keys
set nb_keys
23

brings up SWC widgets to select allocate and load an element and corresponding information, such as database resource file name, database and scene. Call the SWC_fcurveGet function to get fcurves of the attribute Position for the element presenting in MyContext. Call the SAA_fcurveGetNbKeys to get the number of keys for the first fcurve, which describes the x coordinate of the element's position.

See Also

Element Attributes
Camera Attributes
Light Attributes
Material Attributes
Model Attributes
Texture 2D Attributes

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.