forked from bartvdbraak/blender
parent
0ac1564f68
commit
f37518d902
@ -459,12 +459,10 @@ def bvh_node_dict2armature(context, bvh_nodes, ROT_MODE='XYZ', IMPORT_START_FRAM
|
||||
pose_bone.rotation_mode = eul_order_lookup[tuple(bvh_node.rot_order)]
|
||||
|
||||
elif ROT_MODE == 'XYZ':
|
||||
print(2)
|
||||
for pose_bone in pose_bones:
|
||||
pose_bone.rotation_mode = 'XYZ'
|
||||
else:
|
||||
# Quats default
|
||||
print(3)
|
||||
pass
|
||||
|
||||
context.scene.update()
|
||||
@ -520,7 +518,7 @@ def bvh_node_dict2armature(context, bvh_nodes, ROT_MODE='XYZ', IMPORT_START_FRAM
|
||||
lx, ly, lz, rx, ry, rz = bvh_node.anim_data[frame_current + 1]
|
||||
|
||||
if bvh_node.has_rot:
|
||||
bone_rotation_matrix = Euler(rx, ry, rz).to_matrix().resize4x4()
|
||||
bone_rotation_matrix = Euler((rx, ry, rz)).to_matrix().resize4x4()
|
||||
bone_rotation_matrix = bone_rest_matrix_inv * bone_rotation_matrix * bone_rest_matrix
|
||||
|
||||
if ROT_MODE == 'QUATERNION':
|
||||
|
@ -26,7 +26,7 @@ def RKS_POLL_selected_objects(ksi, context):
|
||||
def RKS_POLL_selected_bones(ksi, context):
|
||||
# we must be in Pose Mode, and there must be some bones selected
|
||||
if (context.active_object) and (context.active_object.mode == 'POSE'):
|
||||
if context.active_pose_bone or len(context.select_pose_bones):
|
||||
if context.active_pose_bone or len(context.selected_pose_bones):
|
||||
return True;
|
||||
|
||||
# nothing selected
|
||||
|
Loading…
Reference in New Issue
Block a user