PartGroup

from acron.core import PartGroup
class PartGroup

Bases:

Bases: TypedWritableReferenceCount, Namable

This is the base class for PartRoot and MovingPart. It defines a hierarchy of MovingParts.

Inheritance diagram

digraph inheritance6813b8f2b1 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "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=""]; "PartGroup" [URL="acron.core.PartGroup.html#acron.core.PartGroup",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "PartGroup" [arrowsize=0.75,style=""]; "Namable" -> "PartGroup" [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=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }
enum HierarchyMatchFlags

This enum defines bits which may be passed into check_hierarchy() and PartBundle.bind_anim() to allow an inexact match of channel hierarchies. This specifies conditions that we don’t care about enforcing.

enumerator HMF_ok_part_extra = 1
enumerator HMF_ok_anim_extra = 2
enumerator HMF_ok_wrong_root_name = 4
__init__()

This is the normal PartGroup constructor.

This constructor is only intended for interal use and for derived classes. You should normally use the non-default constructor, below.

This constructor is only intended for interal use and for derived classes. You should normally use the make_copy() interface to make copies..

Creates the PartGroup, and adds it to the indicated parent. The only way to delete it subsequently is to delete the entire hierarchy.

apply_control()

Specifies a node to influence this particular joint so that it will always hold the node’s transform. Returns true if this is a joint that can be so controlled, false otherwise.

This is normally only called internally by PartBundle.control_joint(), but you may also call it directly.

apply_freeze()

Freezes this particular joint so that it will always hold the specified transform. Returns true if this is a joint that can be so frozen, false otherwise.

This is normally only called internally by PartBundle.freeze_joint(), but you may also call it directly.

apply_freeze_matrix()

Freezes this particular joint so that it will always hold the specified transform. Returns true if this is a joint that can be so frozen, false otherwise.

This is normally only called internally by PartBundle.freeze_joint(), but you may also call it directly.

apply_freeze_scalar()

Freezes this particular joint so that it will always hold the specified transform. Returns true if this is a joint that can be so frozen, false otherwise.

This is normally only called internally by PartBundle.freeze_joint(), but you may also call it directly.

property children → Sequence[PartGroup]

Returns the nth child of the group.

clear_forced_channel()

Undoes the effect of a previous call to apply_freeze() or apply_control(). Returns true if the joint was modified, false otherwise.

This is normally only called internally by PartBundle.release_joint(), but you may also call it directly.

copy_subgraph()

Allocates and returns a new copy of this node and of all of its children.

find_child()

Returns the first descendant found with the indicated name, or NULL if no such descendant exists. This method searches the entire graph beginning at this PartGroup; see also get_child_named().

get_child()

Returns the nth child of the group.

get_child_named()

Returns the first child found with the indicated name, or NULL if no such child exists. This method searches only the children of this particular PartGroup; it does not recursively search the entire graph. See also find_child().

get_children() → list
static get_class_type()
get_forced_channel()

Returns the AnimChannelBase that has been forced to this joint by a previous call to apply_freeze() or apply_control(), or NULL if no such channel has been applied.

get_num_children()

Returns the number of child nodes of the group.

is_character_joint()

Returns true if this part is a CharacterJoint, false otherwise. This is a tiny optimization over is_of_type(CharacterType::get_class_type()).

make_copy()

Allocates and returns a new copy of the node. Children are not copied, but see copy_subgraph().

sort_descendants()

Sorts the children nodes at each level of the hierarchy into alphabetical order. This should be done after creating the hierarchy, to guarantee that the correct names will match up together when the AnimBundle is later bound to a PlayerRoot.

write()

Writes a brief description of the group and all of its descendants.

write_with_value()

Writes a brief description of the group, showing its current value, and that of all of its descendants.