@@ -28,21 +28,40 @@ from mathutils import Vector, Euler, Matrix
classBVH_Node:
__slots__=(
'name',# bvh joint name
'parent',# BVH_Node type or None for no parent
'children',# a list of children of this type.
'rest_head_world',# worldspace rest location for the head of this node
'rest_head_local',# localspace rest location for the head of this node
'rest_tail_world',# worldspace rest location for the tail of this node
'rest_tail_local',# worldspace rest location for the tail of this node
'channels',# list of 6 ints, -1 for an unused channel, otherwise an index for the BVH motion data lines, loc triple then rot triple
'rot_order',# a triple of indices as to the order rotation is applied. [0,1,2] is x/y/z - [None, None, None] if no rotation.
'rot_order_str',# same as above but a string 'XYZ' format.
'anim_data',# a list one tuple's one for each frame. (locx, locy, locz, rotx, roty, rotz), euler rotation ALWAYS stored xyz order, even when native used.
'has_loc',# Convenience function, bool, same as (channels[0]!=-1 or channels[1]!=-1 or channels[2]!=-1)
'has_rot',# Convenience function, bool, same as (channels[3]!=-1 or channels[4]!=-1 or channels[5]!=-1)
'index',# index from the file, not strictly needed but nice to maintain order
'temp',# use this for whatever you want
# Bvh joint name.
'name',
# BVH_Node type or None for no parent.
'parent',
# A list of children of this type..
'children',
# Worldspace rest location for the head of this node.
'rest_head_world',
# Localspace rest location for the head of this node.
'rest_head_local',
# Worldspace rest location for the tail of this node.
'rest_tail_world',
# Worldspace rest location for the tail of this node.
'rest_tail_local',
# List of 6 ints, -1 for an unused channel,
# otherwise an index for the BVH motion data lines,
# loc triple then rot triple.
'channels',
# A triple of indices as to the order rotation is applied.
# [0,1,2] is x/y/z - [None, None, None] if no rotation..
'rot_order',
# Same as above but a string 'XYZ' format..
'rot_order_str',
# A list one tuple's one for each frame: (locx, locy, locz, rotx, roty, rotz),
# euler rotation ALWAYS stored xyz order, even when native used.
'anim_data',
# Convenience function, bool, same as: (channels[0] != -1 or channels[1] != -1 or channels[2] != -1).
'has_loc',
# Convenience function, bool, same as: (channels[3] != -1 or channels[4] != -1 or channels[5] != -1).
'has_rot',
# Index from the file, not strictly needed but nice to maintain order.
'index',
# Use this for whatever you want.
'temp',
)
_eul_order_lookup={
...
...
@@ -73,16 +92,18 @@ class BVH_Node:
self.children=[]
# list of 6 length tuples: (lx,ly,lz, rx,ry,rz)
# even if the channels aren't used they will just be zero
#
# List of 6 length tuples: (lx, ly, lz, rx, ry, rz)
# even if the channels aren't used they will just be zero.