|
SAA_fcurvelistAddElements
SAA_fcurvelistRemoveElements
Adds and removes function curves in the Fcurve window.
SAA_fcurvelistAddElements scn nb fcurves
SAA_fcurvelistRemoveElements scn nb fcurves
nb
Number of function curves in the fcurves array.
fcurves
Array of function curves to add or remove. To get the function curves in the Fcurve
window, you can use either SAA_fcurvelistGetElements
or SAA_fcurvelistGetSelectedElements.
Possible Errors
SI_ERR_NO_FCV_EDITOR if SOFTIMAGE 3D is running in standalone mode.
Notes
- The Fcurve window does not have to be open for you to use these functions.
- In SOFTIMAGE 3D, users load function curves into the Fcurve window via the FcrvSelect
command. To programmatically load function curves, you can use
SAA_fcurvelistAddElements.
Example
This code fragment creates position function curves for the camera and then loads them
into the Fcurve window. Before loading the camera position function curves, this
code first removes any function curves already in the Fcurve window.
proc SAA_fcurvelistAddElementsExample {} {
global SAA_Constants
set scene [SAA_AllocScene]
SAA_sceneGetCurrent $scene
# Clear fcurvelist by removing all fcurves.
SAA_fcurvelistGetNbElements $scene nb
if { $nb != 0 } {
set fcurves [SAA_AllocElem $nb]
SAA_fcurvelistGetElements $scene $nb $fcurves
SAA_fcurvelistRemoveElements $scene $nb $fcurves
SAA_free $fcurves
}
# Create camera position fcurves.
set camera [SAA_AllocElem]
set cmetn [SAA_AllocElem 3]
SAA_sceneGetCameras $scene 1 $camera
SAA_cameraFcurveCreatePosition $scene $camera [access $cmetn 0] \
[access $cmetn 1] [access $cmetn 2]
# Add key points to the camera position fcurves...
SAA_fcurvelistAddElements $scene 3 $cmetn
# Select the camera position fcurves.
SAA_selectlistSetMode $scene $SAA_Constants(SAA_SELECT_MULTI)
SAA_fcurvelistSetSelectedElements $scene 3 $cmetn 1
# Open the Fcurve window.
SAA_viewportSetView $scene NULL $SAA_Constants(SAA_FCURVE_VIEW)
SAA_Free $scene
SAA_Free $camera
SAA_Free $cmetn
}
|