@@ -28,22 +28,41 @@ from mathutils import Vector, Euler, Matrix
...
@@ -28,22 +28,41 @@ from mathutils import Vector, Euler, Matrix
classBVH_Node:
classBVH_Node:
__slots__=(
__slots__=(
'name',# bvh joint name
# Bvh joint name.
'parent',# BVH_Node type or None for no parent
'name',
'children',# a list of children of this type.
# BVH_Node type or None for no parent.
'rest_head_world',# worldspace rest location for the head of this node
'parent',
'rest_head_local',# localspace rest location for the head of this node
# A list of children of this type..
'rest_tail_world',# worldspace rest location for the tail of this node
'children',
'rest_tail_local',# worldspace rest location for the tail of this node
# Worldspace rest location for the head 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
'rest_head_world',
'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.
# Localspace rest location for the head of this node.
'rot_order_str',# same as above but a string 'XYZ' format.
'rest_head_local',
'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.
# Worldspace rest location for the tail of this node.
'has_loc',# Convenience function, bool, same as (channels[0]!=-1 or channels[1]!=-1 or channels[2]!=-1)
'rest_tail_world',
'has_rot',# Convenience function, bool, same as (channels[3]!=-1 or channels[4]!=-1 or channels[5]!=-1)
# Worldspace rest location for the tail of this node.
'index',# index from the file, not strictly needed but nice to maintain order
'rest_tail_local',
'temp',# use this for whatever you want
# 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={
_eul_order_lookup={
(None,None,None):'XYZ',# XXX Dummy one, no rotation anyway!
(None,None,None):'XYZ',# XXX Dummy one, no rotation anyway!