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

 

 


SAA_cusOperatorAddFcurveCallback

Registers a callback for the function curve of an operator attribute (OAT).

set scene [SAA_AllocScene]

set icon [SAA_AllocElem]

.

.

.


set OATname "symbol_name_from_cus_file"

set command tcl_command_line_to_eval

SAA_cusOperatorAddFcurveCallback  $scene $icon $OATname CustomContext1 $command handleName 
scene
Scene containing the effect.
icon
Icon for the effect.
Note:
scene and icon are required only if you register a callback on an OAT of another effect. Otherwise, both arguments can be NULL. If the callback function needs to know which effect owns the OAT, you can include the scene and icon as user data.
OATname
Symbol name declared in the .cus file for the operator attribute.
context
Custom context of the effect adding the callback. This should allways be CustomContext1 (a tag recognixed by SoftWish)
command
A tcl command which is evaluated at global level.
handleName
A variable name. This varibales value will be set to a handle which identifies the callbacks. It used when removing callbacks.

Return Value

Return correct usage if incorrect parameters are passed
SI_ERR_BAD_ARGUMENT if a pointer argument is NULL, there is no such OAT, or the OAT is not animated. Note that scene and icon must be both NULL or both non-NULL.

SI_ERR_NOTSUPPORTED if you try to:

  • Remove a callback from an effect in another scene.
  • Remove a callback from an immediate effect.

 

Notes

The SoftWish procedure SAA_cusOperatorAddFcurveCallback differs from the corresponding SAAPHIRE C language routine in the defintion of the callback, and the callback functions themselves are different too. In Tcl both the callback function and it's data are registered directly as a single parameter, a string of code. C can't do this, so it needs to registers 2 parameters, a pointer to a function (func), and a pointer some data to pass to this function (cbd). Also SoftWish tracks callbacks by handles and requires a parameter for the handle. SAAPHIRE C code doesnt do this. Here are the signatures of the SoftWish and SAAPHIRE versions of SAA_cusOperatorAddFcurveCallback:

SoftWish - Tcl:

SAA_cusOperatorAddFcurveCallback

{
const SAA_Scene *scene
const SAA_Elem *icon
const char *OATname
const SAA_CustomContext context
const char * lineToEva
const char handleNamel
}


SAAPHIRE - C:

SI_Error SAA_cusOperatorAddFcurveCallback

(
const SAA_Scene *scene,
const SAA_Elem *icon,
const char *OATname,
const SAA_CustomContext context,
SAA_CusOperatorCallback func,
void *cbd
);

 SoftWish custom operator callbacks example


SAA Index ] Examples SAA calls index ]

copyright Video-Collage Inc.