AnimControl¶
from acron.core import AnimControl
- class AnimControl¶
Bases:
Bases:
TypedReferenceCount,AnimInterface,NamableControls the timing of a character animation. An AnimControl object is created for each character/bundle binding and manages the state of the animation: whether started, stopped, or looping, and the current frame number and play rate.
Inheritance diagram
digraph inheritance9018944825 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "AnimControl" [URL="acron.core.AnimControl.html#acron.core.AnimControl",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "AnimControl" [arrowsize=0.75,style=""]; "AnimInterface" -> "AnimControl" [arrowsize=0.75,style=""]; "Namable" -> "AnimControl" [arrowsize=0.75,style=""]; "AnimInterface" [URL="acron.core.AnimInterface.html#acron.core.AnimInterface",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "AnimInterface" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "Namable" [URL="acron.core.Namable.html#acron.core.Namable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Namable" [arrowsize=0.75,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }- get_anim()¶
Returns the
AnimBundlebound in with thisAnimControl.
- get_anim_model()¶
Retrieves the pointer set via
set_anim_model(). Seeset_anim_model().
- get_bound_joints()¶
Returns the subset of joints controlled by this
AnimControl. Most of the time, this will beBitArray.all_on(), for a normal full-body animation. For a subset animation, however, this will be just a subset of those bits, corresponding to the set of joints and sliders actually bound (as enumerated by bind_hierarchy() in depth-first LIFO order).
- get_channel_index()¶
Returns the particular channel index associated with this
AnimControl. This channel index is the slot on which eachAnimGroupis bound to its associatedPartGroup, for each joint in the animation.It will be true that get_part()->find_child(“n”)->get_bound(get_channel_index()) == get_anim()->find_child(“n”), for each joint “n”.
- static get_class_type()¶
- get_part()¶
Returns the
PartBundlebound in with thisAnimControl.
- get_pending_done_event()¶
Returns the event name that will be thrown when the
AnimControlis finished binding asynchronously.
- has_anim()¶
Returns true if the
AnimControlwas successfully loaded, or false if there was a problem. This may return false whileis_pending()is true.
- is_pending()¶
Returns true if the
AnimControlis being bound asynchronously, and has not yet finished. If this is true, the AnimControl’s interface is still available and will be perfectly useful (thoughget_anim()might return NULL), but nothing visible will happen immediately.
- output()¶
- set_anim_model()¶
Associates the indicated
AcronNodewith theAnimControl. By convention, this node represents the root node of the model file that corresponds to this AnimControl’s animation file, though nothing in this code makes this assumption or indeed does anything with this node.The purpose of this is simply to allow the
AnimControlto keep a reference count on theModelRootnode that generated it, so that the model will not disappear from the model pool until it is no longer referenced.
- set_pending_done_event()¶
Specifies an event name that will be thrown when the
AnimControlis finished binding asynchronously. If theAnimControlhas already finished binding, the event will be thrown immediately.
- wait_pending()¶
Blocks the current thread until the
AnimControlhas finished loading and is fully bound.