@@ -331,38 +331,19 @@ def fk2ik_arm(obj, fk, ik):
331
331
match_pose_scale(hand, handi)
332
332
else:
333
333
# Upper arm position
334
- mat = get_pose_matrix_in_other_space(uarmi.matrix, uarm)
335
- set_pose_translation(uarm, mat.copy())
336
- set_pose_rotation(uarm, mat.copy())
337
- set_pose_scale(uarm, mat.copy())
338
- bpy.ops.object.mode_set(mode='OBJECT')
339
- bpy.ops.object.mode_set(mode='POSE')
340
- # match_pose_translation(uarm, uarmi)
341
- # match_pose_rotation(uarm, uarmi)
342
- # match_pose_scale(uarm, uarmi)
334
+ match_pose_translation(uarm, uarmi)
335
+ match_pose_rotation(uarm, uarmi)
336
+ match_pose_scale(uarm, uarmi)
343
337
344
338
# Forearm position
345
- mat = get_pose_matrix_in_other_space(farmi.matrix, farm)
346
- set_pose_translation(farm, mat.copy())
347
- set_pose_rotation(farm, mat.copy())
348
- set_pose_scale(farm, mat.copy())
349
- bpy.ops.object.mode_set(mode='OBJECT')
350
- bpy.ops.object.mode_set(mode='POSE')
351
- #match_pose_translation(farm, farmi)
352
- # match_pose_rotation(farm, farmi)
353
- # match_pose_scale(farm, farmi)
339
+ #match_pose_translation(hand, handi)
340
+ match_pose_rotation(farm, farmi)
341
+ match_pose_scale(farm, farmi)
354
342
355
343
# Hand position
356
- mat = get_pose_matrix_in_other_space(handi.matrix, hand)
357
- set_pose_translation(hand, mat.copy())
358
- set_pose_rotation(hand, mat.copy())
359
- set_pose_scale(hand, mat.copy())
360
- bpy.ops.object.mode_set(mode='OBJECT')
361
- bpy.ops.object.mode_set(mode='POSE')
362
-
363
- # match_pose_translation(hand, handi)
364
- # match_pose_rotation(hand, handi)
365
- # match_pose_scale(hand, handi)
344
+ match_pose_translation(hand, handi)
345
+ match_pose_rotation(hand, handi)
346
+ match_pose_scale(hand, handi)
366
347
367
348
368
349
def ik2fk_arm(obj, fk, ik):
@@ -399,24 +380,16 @@ def ik2fk_arm(obj, fk, ik):
399
380
400
381
else:
401
382
# Hand position
402
- mat = get_pose_matrix_in_other_space(hand.matrix, handi)
403
- set_pose_translation(handi, mat.copy())
404
- set_pose_rotation(handi, mat.copy())
405
- set_pose_scale(handi, mat.copy())
406
- # match_pose_translation(handi, hand)
407
- # match_pose_rotation(handi, hand)
408
- # match_pose_scale(handi, hand)
383
+ match_pose_translation(handi, hand)
384
+ match_pose_rotation(handi, hand)
385
+ match_pose_scale(handi, hand)
409
386
410
387
# Upper Arm position
411
- mat = get_pose_matrix_in_other_space(farm.matrix, farmi)
412
- set_pose_translation(farmi, mat.copy())
413
- set_pose_rotation(farmi, mat.copy())
414
- set_pose_scale(farmi, mat.copy())
415
- # match_pose_translation(uarmi, uarm)
416
- # match_pose_rotation(uarmi, uarm)
417
- # match_pose_scale(uarmi, uarm)
388
+ match_pose_translation(uarmi, uarm)
389
+ match_pose_rotation(uarmi, uarm)
390
+ match_pose_scale(uarmi, uarm)
418
391
# Rotation Correction
419
- # correct_rotation(uarmi, uarm)
392
+ correct_rotation(uarmi, uarm)
420
393
421
394
def fk2ik_leg(obj, fk, ik):
422
395
""" Matches the fk bones in a leg rig to the ik bones.
0 commit comments