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

 

 


SAA_fcurveGetOwners

SAA_fcurveGetNbOwners

Retrieves the element that owns a given function curve.

SAA_fcurveGetNbOwners scn fcurve nb
SAA_fcurveGetOwners scn fcurve nb element

fcurve

A function curve. Use SAA_AllocElem to allocate an fcurve.

nb

Number of owners. This value is always 1.

element

Returns the element that owns the function curve. Use SAA_AllocElem to allocate an element.

Possible Errors

  • SAA_FcurveGetOwners() returns SI_ERR_WRONG_COUNT if nb is not 1. This return value is a warning, not an error.

See Also

Example

This code fragment prints out the string "element.trackname" for each selected function curve in the Fcurve window.

proc SAA_fcurveGetOwnersExample {} {

    global SAA)Constants
   
    set scene [SAA_AllocScene]

    SAA_sceneGetCurrent $scene

# Get selected fcurves.

    SAA_fcurvelistGetNbSelectedElements $scene nb

    if { $nb == 0 } {
        set err "No selected fcurves in Fcurve window"
        SAA_statusBarSet err $SAA_Constants(SAA_WARNING_CODE)
        return $err
    }

    set selfcurves [SAA_AllocElem $nb]

    SAA_fcurvelistGetSelectedElements $scene $nb $selfcurves

# Get owners and tracknames of selected function curves.
# Then dump out the name of the owner elements and the
# tracknames in the format:
# <element name of owner>.<trackname>

    set owner [SAA_AllocElem]

    for { set i 0 } { $i < $nb } { incr i } {
   
        SAA_fcurveGetNbOwners $scene [access $selfcurves $i] nbown
        SAA_fcurveGetOwners $scene [access $selfcurves $i] $nbown $owner
        SAA_fcurveGetTracknameLength $scene [access $selfcurves $i ] len
        SAA_fcurveGetTrackname $scene [ access $selfcurves $i ] [ incr len ] trackname
        SAA_elementGetNameLength $scene $owner len
        SAA_elementGetName $scene $owner [ incr len ] name
        puts "$name\.${trackname}"
    }
   
}


SAA Index ] Examples SAA calls index ]

copyright Video-Collage Inc.