duststorm wrote:
Yes it is still maintained, there might be a bug in it at the moment with alternative rest poses, though, as I have seen an issue pass about it on the tracker.
Yes, BigBaer and I were chatting about this on IRC yesterday, and I managed to confuse the heck out of myself again. I've been looking at the import code all day, and can't quite figure it out. In:
- Code: Select all
def bvh_node_dict2armature(context,
bvh_name,
bvh_nodes,
bvh_frame_time,
rotate_mode='XYZ',
frame_start=1,
IMPORT_LOOP=False,
global_matrix=None,
use_fps_scale=False,
):
I change the rotate_mode to always be 'NATIVE':
- Code: Select all
rotate_mode = 'NATIVE'
if rotate_mode == 'NATIVE':
for bvh_node in bvh_nodes_list:
bone_name = bvh_node.temp # may not be the same name as the bvh_node, could have been shortened.
pose_bone = pose_bones[bone_name]
pose_bone.rotation_mode = bvh_node.rot_order_str
print("rotate_mode %s" % pose_bone.rotation_mode)
The idea being that it always uses the value of "bvh_node.rot_order_str", since this depends on the rotation order in the file. So I would expect pose_bone.rotation_mode to be 'ZXY' for "CHANNELS 3 Zrotation Xrotation Yrotation", and 'ZYX' for "CHANNELS 3 Zrotation Yrotation Xrotation", but it always prints 'XYZ'. Mind you, it's been years since I tried to do anything in python. Anyway, I like a challenge, so I'll keep on looking.
ETA: Typical, post a comment, and spot a silly error. I was using the wrong test bvh files
I think I'll take a break for a few days and let the professionals sort it out.
ETA2: At the risk of embarrassing myself further, here is my test pose, first with a MOTION section left, and MOTION set to zero right:
I then open the original blend
and apply bvh without the motion section and I get, as I would expect, the A-pose
Now, if I re-open the blend and apply the bvh with the motion section, I get
Surely, the MOTION section should be applied to A-pose which I know works?
No need to answer, I'm just trying to get my head around it.