diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-11 09:51:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-11 09:51:27 +0400 |
commit | dcb97c6bf9de424151ced10825247156c052ac2a (patch) | |
tree | 078968e939a9dfc025d4d386ec12faf850ee956c /io_anim_bvh | |
parent | c27565b0fa0dca618701cf905faef35a2702e985 (diff) |
py3.3 compat, __class__ is no longer in default namespace
Diffstat (limited to 'io_anim_bvh')
-rw-r--r-- | io_anim_bvh/export_bvh.py | 6 | ||||
-rw-r--r-- | io_anim_bvh/import_bvh.py | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/io_anim_bvh/export_bvh.py b/io_anim_bvh/export_bvh.py index 3b70033b..6ee688be 100644 --- a/io_anim_bvh/export_bvh.py +++ b/io_anim_bvh/export_bvh.py @@ -140,7 +140,7 @@ def write_armature(context, # redefine bones as sorted by serialized_names # so we can write motion - class decorated_bone(object): + class DecoratedBone(object): __slots__ = (\ "name", # bone name, used as key in many places "parent", # decorated bone parent, set in a later loop @@ -176,7 +176,7 @@ def write_armature(context, else: self.rot_order_str = rotate_mode - self.rot_order = __class__._eul_order_lookup[self.rot_order_str] + self.rot_order = DecoratedBone._eul_order_lookup[self.rot_order_str] self.pose_mat = self.pose_bone.matrix @@ -203,7 +203,7 @@ def write_armature(context, else: return "[\"%s\" root bone]\n" % (self.name) - bones_decorated = [decorated_bone(bone_name) for bone_name in serialized_names] + bones_decorated = [DecoratedBone(bone_name) for bone_name in serialized_names] # Assign parents bones_decorated_dict = {} diff --git a/io_anim_bvh/import_bvh.py b/io_anim_bvh/import_bvh.py index b4460853..f8fd18e9 100644 --- a/io_anim_bvh/import_bvh.py +++ b/io_anim_bvh/import_bvh.py @@ -26,10 +26,10 @@ import bpy from mathutils import Vector, Euler, Matrix -class bvh_node_class(object): +class BVH_Node(object): __slots__ = ( 'name', # bvh joint name - 'parent', # bvh_node_class type or None for no parent + '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 @@ -60,7 +60,7 @@ class bvh_node_class(object): self.parent = parent self.channels = channels self.rot_order = tuple(rot_order) - self.rot_order_str = __class__._eul_order_lookup[self.rot_order] + self.rot_order_str = BVH_Node._eul_order_lookup[self.rot_order] # convenience functions self.has_loc = channels[0] != -1 or channels[1] != -1 or channels[2] != -1 @@ -167,7 +167,7 @@ def read_bvh(context, file_path, rotate_mode='XYZ', global_scale=1.0): else: rest_head_world = my_parent.rest_head_world + rest_head_local - bvh_node = bvh_nodes[name] = bvh_node_class(name, rest_head_world, rest_head_local, my_parent, my_channel, my_rot_order) + bvh_node = bvh_nodes[name] = BVH_Node(name, rest_head_world, rest_head_local, my_parent, my_channel, my_rot_order) # If we have another child then we can call ourselves a parent, else bvh_nodes_serial.append(bvh_node) |