r3keyfr2
real/code/r3keyfr2.h
r3code
Keyframe2 Class.
r3Choreography
R3CLID_CHOREOGRAPHY
r3Keyframe2
R3CLID_KEYFRAME2 - 221
ADDTAG, TAGISANIMATED, TAGCHANGED, NEWTIME, NEWCHOREOGRAPHYTIME, SETTIMEOVERRIDE, UNSETTIMEOVERRIDE, REMOVETAG, GETCURVE, RECALCTAG, TIMEOVERRIDE, CHANGENUMVALSFORTAG, ENUMCURVES, CHANGETAGID, SETORIGVAL, GETORIGVAL, MAKECHOROBJECTS, GETCHOROBJ, INSERT, GETCURVEFORCHOREOGRA, SETINPUT, DELSELECTEDPOINTSFOR, DELPOINTBYINDEXFORTA, INSERTPOINTBYINDEXFO, ASSIGNPOINTBYINDEXFO, SETTAGPERPOINT, ADJUSTBEGINEND, SCALECURVESX, ASSIGNINDEXFORTAG, ASSIGNTAGFORINDEX, WEIGHTCHANGED, TAGISANIMATEDINCHORE, ADDTAGINCHOREOGRAPHY, BREAK, UPDATETAG, FINDCHOR, NEWCHOROBJ, TAGOBJCHANGED, ENUMTIMELINES, GETTAG, REGISTERATTRHANDLER, TRANSLATESELECTEDTIM, SETSELECTEDKEYS, UPDATETAGSIZE, NEXTTIMEKEY, PREVTIMEKEY, ISTIMEBASED, INVALIDATEINPUT, HASINPUT, COPYANIMATEDATTRS, NEWKEY, SELECTTAG, ENUMATTRS, TAGISSELECTED, TAGENABLEKEYFR, TAGISKEYFRENABLED, FLUSH, REMOVE, ISWEIGHTANIMATEABLE, DELSELECTEDKNOTS, DELCHOROBJ, GETINPUTOBJ, SETINPUTOBJ, SELECTRANGE, SHIFTTOORIGINY, SHARPENSELECTEDKNOTS, MIRROR,
R3KFRMM_ADDTAG
ADDTAG
R3KFRMM_ADDTAG
R3BOOL, if true, no curves are created (caller will create anim curves later)
obj.ADDTAG(p1, 0);
Add new tag to be animated
R3KFRMM_TAGISANIMATED
TAGISANIMATED
R3KFRMM_TAGISANIMATED
R3OBJ*, animated attribute
R3INT, attribute identifier
R3INT, attribute index, or -1 for regular attributes
rc = obj.TAGISANIMATED(p1, p3);
See if the given attribute is animated.
R3KFRMM_TAGCHANGED
TAGCHANGED
R3KFRMM_TAGCHANGED
R3INT, attribute id
R3INT, attribute index for indexed attrs, -1 for regular attrs
void*, new value of the attribute
obj.TAGCHANGED(p1, p2, p3);
Update the attribute value of the current choreography.
R3KFRMM_NEWTIME
NEWTIME
R3KFRMM_NEWTIME
R3BOOL, disable recalc (only set time).
R3FLOAT, new time
obj.NEWTIME(p1, p3);
Set new time
R3KFRMM_NEWCHOREOGRAPHYTIME
NEWCHOREOGRAPHYTIME
R3KFRMM_NEWCHOREOGRAPHYTIME
R3BOOL, true if succeeded
R3INT, chor index
R3FLOAT, new time value
rc = obj.NEWCHOREOGRAPHYTIME(p1, p3);
Set new time for the given choreography.
R3KFRMM_SETTIMEOVERRIDE
SETTIMEOVERRIDE
R3KFRMM_SETTIMEOVERRIDE
R3BOOL, true if chor index was valid
R3INT, chor index
rc = obj.SETTIMEOVERRIDE(p3);
Make the choreography not time dependent. See also R3KFRMM_SETINPUT method, * for seting input to desired object/attribute.
R3KFRMM_UNSETTIMEOVERRIDE
UNSETTIMEOVERRIDE
R3KFRMM_UNSETTIMEOVERRIDE
R3BOOL, true if chor index was valid
R3INT, chor index
rc = obj.UNSETTIMEOVERRIDE(p3);
Make the choreography time dependent.
R3KFRMM_REMOVETAG
REMOVETAG
R3KFRMM_REMOVETAG
R3BOOL, true if attribute was animated.
R3INT, attribute indentifier
R3INT, attribute index or -1 for regular attributes
rc = obj.REMOVETAG(p1, p3);
Delete animated attribute object and associated choreographs.
R3KFRMM_GETCURVE
GETCURVE
R3KFRMM_GETCURVE
R3OBJ*, curve object
R3INT, chor index
R3INT, attribute id
R3INT, attribute index, or -1 for regular attrs.
rc = obj.GETCURVE(p1, p2, p3);
Fetch the keyframe curve object. Note: returns NULL if * the choreography is not a key framer, or if the attribute * is not key framed.
R3KFRMM_RECALCTAG
RECALCTAG
R3KFRMM_RECALCTAG
R3BOOL, restore all origvals
R3INT, tag to be recalculated
obj.RECALCTAG(p1, p3);
Recalculate animated tag.
R3KFRMM_TIMEOVERRIDE
TIMEOVERRIDE
R3KFRMM_TIMEOVERRIDE
R3BOOL, TRUE if overridden (that is, input is not time).
R3INT, chor index
rc = obj.TIMEOVERRIDE(p3);
See if the default choreography input (time) has been overridden
R3KFRMM_CHANGENUMVALSFORTAG
CHANGENUMVALSFORTAG
R3KFRMM_CHANGENUMVALSFORTAG
R3INT, attribute id
R3INT, attribute index, or -1 for regular attrs
R3INT, new array size.
obj.CHANGENUMVALSFORTAG(p1, p2, p3);
Change the size of the array attribute.
R3KFRMM_ENUMCURVES
ENUMCURVES
R3KFRMM_ENUMCURVES
obj.ENUMCURVES();
Enumerate animation curves for a given choreography.
R3KFRMM_CHANGETAGID
CHANGETAGID
R3KFRMM_CHANGETAGID
R3INT, tag
R3INT, index,
R3TAG*, R3KFRMA_Tag, R3KFRMA_Index: New tag id and new index.
obj.CHANGETAGID(p1, p2, p3);
Change the tag id and index of given choreography.
R3KFRMM_SETORIGVAL
SETORIGVAL
R3KFRMM_SETORIGVAL
R3INT, tag
R3INT, index
void*, new origvals.
obj.SETORIGVAL(p1, p2, p3);
Set origvals for the attribute specified by 'tag' and 'index'.
R3KFRMM_GETORIGVAL
GETORIGVAL
R3KFRMM_GETORIGVAL
obj.GETORIGVAL();
Fetch the orig val.
R3KFRMM_MAKECHOROBJECTS
MAKECHOROBJECTS
R3KFRMM_MAKECHOROBJECTS
obj.MAKECHOROBJECTS();
Create choreography objects for all the animated tags.
R3KFRMM_GETCHOROBJ
GETCHOROBJ
R3KFRMM_GETCHOROBJ
R3OBJ*, chor object or NULL if not found
R3OBJ*, animated tag if attr specific chor, otherwise NULL
R3INT, ordnum of the choreography
rc = obj.GETCHOROBJ(p1, p3);
Find chor object corresponding the given ordnum
R3KFRMM_INSERT
INSERT
R3KFRMM_INSERT
R3INT, choreograhy index
R3OBJ*, animated attribute
R3OBJ*, chor object to be inserted
obj.INSERT(p1, p2, p3);
Insert chor object with the given choreography index and attribute.
R3KFRMM_GETCURVEFORCHOREOGRA
GETCURVEFORCHOREOGRA
R3KFRMM_GETCURVEFORCHOREOGRA
R3OBJ*, curve or null if the chor is not a key framer or the attribute is not animated
R3INT, attribute id
R3INT, attribute index or -1 for regular attrs
R3TAG*, R3CHRYA_Active (chor index), R3KFRMA_Index (array index for array attributes)
rc = obj.GETCURVEFORCHOREOGRA(p1, p2, p3);
Fetch the animation curve for the given choreography and attribute
R3KFRMM_SETINPUT
SETINPUT
R3KFRMM_SETINPUT
R3BOOL, true if succeeded.
R3INT, choreography
R3TAG*, R3KFRMA_InputTag, R3KFRMA_InputMth, R3KFRMA_InputIndex, R3KFRMA_InputSub, R3KFRMA_InputObj
rc = obj.SETINPUT(p1, p3);
Set input object for the given choreography.
R3KFRMM_DELSELECTEDPOINTSFOR
DELSELECTEDPOINTSFOR
R3KFRMM_DELSELECTEDPOINTSFOR
char*, selected array
obj.DELSELECTEDPOINTSFOR(p3);
Delete given points from array attribute.
R3KFRMM_DELPOINTBYINDEXFORTA
DELPOINTBYINDEXFORTA
R3KFRMM_DELPOINTBYINDEXFORTA
R3BOOL, true if succeeded.
R3INT, index of the point to be deleted.
rc = obj.DELPOINTBYINDEXFORTA(p3);
Delete point from array variable.
R3KFRMM_INSERTPOINTBYINDEXFO
INSERTPOINTBYINDEXFO
R3KFRMM_INSERTPOINTBYINDEXFO
R3BOOL, true if succeeded
R3INT, index for the new point.
rc = obj.INSERTPOINTBYINDEXFO(p3);
Insert new point to array variable.
R3KFRMM_ASSIGNPOINTBYINDEXFO
ASSIGNPOINTBYINDEXFO
R3KFRMM_ASSIGNPOINTBYINDEXFO
R3INT, index of the source point
R3INT, index of the target point
R3TAG*, tag list containing R3KRMA_Tag (default -1) and R3KFRMA_Index (default -1).
obj.ASSIGNPOINTBYINDEXFO(p1, p2, p3);
Assign point 'from' to point 'to'
R3KFRMM_SETTAGPERPOINT
SETTAGPERPOINT
R3KFRMM_SETTAGPERPOINT
R3INT, tag
R3INT, perpoint flag
obj.SETTAGPERPOINT(p1, p3);
R3KFRMM_ADJUSTBEGINEND
ADJUSTBEGINEND
R3KFRMM_ADJUSTBEGINEND
obj.ADJUSTBEGINEND();
Expand the time line to cover the all key frames.
R3KFRMM_SCALECURVESX
SCALECURVESX
R3KFRMM_SCALECURVESX
R3FLOAT, origin
R3FLOAT, scale factor
obj.SCALECURVESX(p1, p3);
Scale animation curves in X direction.
R3KFRMM_ASSIGNINDEXFORTAG
ASSIGNINDEXFORTAG
R3KFRMM_ASSIGNINDEXFORTAG
R3INT, tag
R3INT, index 'from'
R3INT, index 'to'
obj.ASSIGNINDEXFORTAG(p1, p2, p3);
Assign index from 'from' to 'to'
R3KFRMM_ASSIGNTAGFORINDEX
ASSIGNTAGFORINDEX
R3KFRMM_ASSIGNTAGFORINDEX
R3INT, tag 'from'
R3INT, tag 'to'
R3INT, index
obj.ASSIGNTAGFORINDEX(p1, p2, p3);
Assign tag from 'from' to 'to'
R3KFRMM_WEIGHTCHANGED
WEIGHTCHANGED
R3KFRMM_WEIGHTCHANGED
obj.WEIGHTCHANGED();
Weight changed, full recalc.
R3KFRMM_TAGISANIMATEDINCHORE
TAGISANIMATEDINCHORE
R3KFRMM_TAGISANIMATEDINCHORE
R3BOOL, TRUE if the tag is animated in the given choreography
R3INT, choreography index, -1 for the currently active choreography
R3INT, animated tag
R3INT, animated tag index
rc = obj.TAGISANIMATEDINCHORE(p1, p2, p3);
R3KFRMM_ADDTAGINCHOREOGRAPHY
ADDTAGINCHOREOGRAPHY
R3KFRMM_ADDTAGINCHOREOGRAPHY
R3BOOL, if true, no curves are created (caller will create anim curves later)
obj.ADDTAGINCHOREOGRAPHY(p1, 0);
Add new tag to be animated in a single choreography
R3KFRMM_BREAK
BREAK
R3KFRMM_BREAK
R3INT, tag
R3INT, index or -1 for regular attrs
obj.BREAK(p1, p3);
For constr. implementors. Can be called to break the constr. pipeline for * an attribute. The current value is flushed and the data is freed.
R3KFRMM_UPDATETAG
UPDATETAG
R3KFRMM_UPDATETAG
obj.UPDATETAG();
Private, don't call from the user code
R3KFRMM_FINDCHOR
FINDCHOR
R3KFRMM_FINDCHOR
R3OBJ*, chor object
R3OBJ*, attribute object
char*, name
rc = obj.FINDCHOR(p1, p3);
Find choreography by name
R3KFRMM_NEWCHOROBJ
NEWCHOROBJ
R3KFRMM_NEWCHOROBJ
R3OBJ*, chor object
R3OBJ*, animated attribute
R3INT, choreography index
rc = obj.NEWCHOROBJ(p1, p3);
Create choreography object for the given choreography index
R3KFRMM_TAGOBJCHANGED
TAGOBJCHANGED
R3KFRMM_TAGOBJCHANGED
R3BOOL, true if succeeded
R3OBJ*, attribute object
void*, new value, the actual type is the type of the attribute
R3FLOAT, current time
rc = obj.TAGOBJCHANGED(p1, p2, p3);
Update value of the given attribute object
R3KFRMM_ENUMTIMELINES
ENUMTIMELINES
R3KFRMM_ENUMTIMELINES
R3OBJ*, callback object
R3INT, callback method
R3TAG*, R3CHRYA_Active - if -1, all chors are enumerated
obj.ENUMTIMELINES(p1, p2, p3);
Enumerate timelines
R3KFRMM_GETTAG
GETTAG
R3KFRMM_GETTAG
R3OBJ*, animated attribute object or NULL if the tag is not animated
R3INT, tag
R3INT, tag index for indexed attributes (-1 for regular attributes)
R3TAG*, see tags for ADDTAG
rc = obj.GETTAG(p1, p2, p3);
Fetch attributes of attribute specified by tag + index.
R3KFRMCM_REGISTERATTRHANDLER
REGISTERATTRHANDLER
R3KFRMCM_REGISTERATTRHANDLER
R3BOOL, true if succeeded
R3INT, priority
R3INT*, null terminated array of attribute ids which should trigger the handler.
rc = obj.REGISTERATTRHANDLER(0, p2, p3);
For class implementers. A new type of attribute * may need a special treatement. Attr handler may trigger * several attributes and handle them in one pass. For example, Matrix transformation components can be animated independently. However, the animation system needs the entire matrix in order to interpolate the transformation.
R3KFRMM_TRANSLATESELECTEDTIM
TRANSLATESELECTEDTIM
R3KFRMM_TRANSLATESELECTEDTIM
R3INT, tag
R3INT, tag index (-1 for regular tags)
R3TAG*, R3CHRYA_Active, R3KFRMA_SnapToKey, R3KFRMA_Translation
obj.TRANSLATESELECTEDTIM(p1, p2, p3);
Translate selected keys in time.
R3KFRMM_SETSELECTEDKEYS
SETSELECTEDKEYS
R3KFRMM_SETSELECTEDKEYS
R3BOOL, true if succeeded
R3INT, tag
R3INT, tag index (-1 for regular tags)
R3TAG*, R3CHRYA_Active, R3KFRMA_Translation
rc = obj.SETSELECTEDKEYS(p1, p2, p3);
Set time value for the selected keys.
R3KFRMM_UPDATETAGSIZE
UPDATETAGSIZE
R3KFRMM_UPDATETAGSIZE
R3INT, tag
R3INT, index,
R3INT, new size
obj.UPDATETAGSIZE(p1, p2, p3);
R3ACOA_PointSize for all choreographs assiciated with the given attr.
R3KFRMM_NEXTTIMEKEY
NEXTTIMEKEY
R3KFRMM_NEXTTIMEKEY
R3BOOL, true if found
R3INT, tag
R3INT, tag index
R3TAG*, R3CHRYA_Active specifying the chor and R3KFRMA_Translation specifying the current time value
rc = obj.NEXTTIMEKEY(p1, p2, p3);
Given a time, find the next key frame time value
R3KFRMM_PREVTIMEKEY
PREVTIMEKEY
R3KFRMM_PREVTIMEKEY
R3BOOL, true if found
R3INT, tag
R3INT, tag index
R3TAG*, R3CHRYA_Active specifying the chor and R3KFRMA_Translation specifying the current time value
rc = obj.PREVTIMEKEY(p1, p2, p3);
Given a time, find the previous key frame time value
R3KFRMM_ISTIMEBASED
ISTIMEBASED
R3KFRMM_ISTIMEBASED
R3BOOL, true if time sensitive choreographs found.
rc = obj.ISTIMEBASED();
See if the object has time sensitive choreographs.
R3KFRMM_INVALIDATEINPUT
INVALIDATEINPUT
R3KFRMM_INVALIDATEINPUT
R3OBJ*, input
obj.INVALIDATEINPUT(p3);
Detach choreographs from their input objects.
R3KFRMM_HASINPUT
HASINPUT
R3KFRMM_HASINPUT
R3BOOL, true if input
R3INT, chor index
rc = obj.HASINPUT(p3);
See if the choreography has input object
R3KFRMM_COPYANIMATEDATTRS
COPYANIMATEDATTRS
R3KFRMM_COPYANIMATEDATTRS
R3OBJ*, from object
R3INT, from choreography
R3INT, to choreography
obj.COPYANIMATEDATTRS(p1, p2, p3);
Copy animated attributes associated with the given source object and choreography to given target object and choreography.
R3KFRMM_NEWKEY
NEWKEY
R3KFRMM_NEWKEY
R3INT, attribute
R3INT, attribute index or -1 for regular attributes
obj.NEWKEY(p1, p3);
Create a new key frame .
R3KFRMM_SELECTTAG
SELECTTAG
R3KFRMM_SELECTTAG
R3BOOL, true if attribute was found
R3INT, tag id
R3INT, tag index, or -1 for regular attrs.
R3BOOL, TRUE selects, FALSE deselects
rc = obj.SELECTTAG(p1, p2, p3);
Select / deselect the given attribute
R3KFRMM_ENUMATTRS
ENUMATTRS
R3KFRMM_ENUMATTRS
R3INT, callback method
R3TAG*, R3KFRMA_Tag, R3KFRMA_Index, R3KFRMA_Type, R3KFRMA_Selected
obj.ENUMATTRS(0, p2, p3);
Enumerate animated attributes
R3KFRMM_TAGISSELECTED
TAGISSELECTED
R3KFRMM_TAGISSELECTED
R3BOOL, true if selected
R3INT, tag
R3INT, tag index or -1 for regular attrs.
rc = obj.TAGISSELECTED(p1, p3);
See if the given attribute is selected
R3KFRMM_TAGENABLEKEYFR
TAGENABLEKEYFR
R3KFRMM_TAGENABLEKEYFR
R3BOOL, true if succeeded
R3INT, tag
R3INT, index
R3BOOL, true to enable, false to disable
rc = obj.TAGENABLEKEYFR(p1, p2, p3);
Enable keyframing for the tag.
R3KFRMM_TAGISKEYFRENABLED
TAGISKEYFRENABLED
R3KFRMM_TAGISKEYFRENABLED
R3BOOL, true if enabled
R3INT, attribute id
R3INT, attr index
rc = obj.TAGISKEYFRENABLED(p1, p3);
See if the given attribute is enabled for keyframing
R3KFRMM_FLUSH
FLUSH
R3KFRMM_FLUSH
R3BOOL, true if attribute was managed
R3INT, attribute id
R3INT, index or -1 for regular attrs
rc = obj.FLUSH(p1, p3);
Constructors call this to flush attribute they depend on. *
R3KFRMM_REMOVE
REMOVE
R3KFRMM_REMOVE
R3OBJ*, attribute object
R3OBJ*, object to be removed
obj.REMOVE(p1, p3);
Remove constructor
R3KFRMM_ISWEIGHTANIMATEABLE
ISWEIGHTANIMATEABLE
R3KFRMM_ISWEIGHTANIMATEABLE
obj.ISWEIGHTANIMATEABLE();
R3KFRMM_DELSELECTEDKNOTS
DELSELECTEDKNOTS
R3KFRMM_DELSELECTEDKNOTS
R3INT, attribute
R3INT, attribute index, or -1 for regular attrs
R3INT, choreography index
obj.DELSELECTEDKNOTS(p1, p2, p3);
Delete the currently selected time keys.
R3KFRMM_DELCHOROBJ
DELCHOROBJ
R3KFRMM_DELCHOROBJ
R3OBJ*, animated attribute
R3INT, choreography index
obj.DELCHOROBJ(p1, p3);
Delete the choreography object associated * with the given animated attribute and the choreography index.
R3KFRMM_GETINPUTOBJ
GETINPUTOBJ
R3KFRMM_GETINPUTOBJ
R3OBJ*, input object
R3INT, chor index
rc = obj.GETINPUTOBJ(p3);
Fetch the input object of a choreography
R3KFRMM_SETINPUTOBJ
SETINPUTOBJ
R3KFRMM_SETINPUTOBJ
R3BOOL, true if chor index is valid
R3INT, chor index
R3OBJ*, input object
rc = obj.SETINPUTOBJ(p1, p3);
Set input object for the choreography
R3KFRMM_SELECTRANGE
SELECTRANGE
R3KFRMM_SELECTRANGE
R3INT, number of points selected
R3INT, disabled mask (1 corresponds to x curve etc.)
R3FLOAT, start
R3FLOAT, end
rc = obj.SELECTRANGE(p1, p2, p3);
Select keyframes between the given range
R3KFRMM_SHIFTTOORIGINY
SHIFTTOORIGINY
R3KFRMM_SHIFTTOORIGINY
R3INT, attribute
R3INT, index or -1 for regular attributes
R3INT, choregraphy
obj.SHIFTTOORIGINY(p1, p2, p3);
Shift keyframe curves to start from origin so that they define * identity transformation there.
R3KFRMM_SHARPENSELECTEDKNOTS
SHARPENSELECTEDKNOTS
R3KFRMM_SHARPENSELECTEDKNOTS
R3INT, attribute
R3INT, attribute index, or -1 for regular attrs
R3INT, choreography index
obj.SHARPENSELECTEDKNOTS(p1, p2, p3);
Set selected time keys to polygonal
R3KFRMM_MIRROR
MIRROR
R3KFRMM_MIRROR
R3INT, attribute
R3INT, attribute index, or -1 for regular attrs
R3INT, choreography index
obj.MIRROR(p1, p2, p3);
Mirror the animation curves. Works only
UserObject
UserObject
R3KFRMA_UserObject
Object
R3OBJ*
object to be animated
jsobj.SetUserObject(value);
value = jsobj.GetUserObject();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3KFRMA_UserObject, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3KFRMA_UserObject, &value, R3TAG_END);
Time
Time
R3KFRMA_Time
Number
R3FLOAT
current time
jsobj.SetTime(value);
value = jsobj.GetTime();
R3FLOAT value = ...;
R3SetAttrs(r3obj, R3KFRMA_Time, value, R3TAG_END);
R3FLOAT value;
R3GetAttrs(r3obj, R3KFRMA_Time, &value, R3TAG_END);
NewKeyTolerance
NewKeyTolerance
R3KFRMA_NewKeyTolerance
Number
R3FLOAT
modify existing/creating new key tolerance
jsobj.SetNewKeyTolerance(value);
R3FLOAT value = ...;
R3SetAttrs(r3obj, R3KFRMA_NewKeyTolerance, value, R3TAG_END);
AnimatedAttrs
AnimatedAttrs
R3KFRMA_AnimatedAttrs
r3List
R3LIST*
list of animated attributes
value = jsobj.GetAnimatedAttrs();
R3LIST* value;
R3GetAttrs(r3obj, R3KFRMA_AnimatedAttrs, &value, R3TAG_END);
Tags