[Bf-extensions-cvs] [48ab09e] rigify_fixes: Fixes: Set rot_mod to ZXY (ctrl&tweaks) & Spine tail_pos
Lucio Rossi
noreply at git.blender.org
Fri Jul 29 13:27:29 CEST 2016
Commit: 48ab09e860100b473370658568680cd1364599ee
Author: Lucio Rossi
Date: Thu Jul 28 19:16:30 2016 +0200
Branches: rigify_fixes
https://developer.blender.org/rBA48ab09e860100b473370658568680cd1364599ee
Fixes: Set rot_mod to ZXY (ctrl&tweaks) & Spine tail_pos
===================================================================
M rigify/rigs/pitchipoy/limbs/arm.py
M rigify/rigs/pitchipoy/limbs/leg.py
M rigify/rigs/pitchipoy/limbs/paw.py
M rigify/rigs/pitchipoy/super_torso_turbo.py
===================================================================
diff --git a/rigify/rigs/pitchipoy/limbs/arm.py b/rigify/rigs/pitchipoy/limbs/arm.py
index 50a11e1..43327ec 100644
--- a/rigify/rigs/pitchipoy/limbs/arm.py
+++ b/rigify/rigs/pitchipoy/limbs/arm.py
@@ -70,8 +70,15 @@ def create_arm( cls, bones ):
'owner_space' : 'LOCAL'
})
- # Create ik/fk switch property
pb = cls.obj.pose.bones
+
+ # Modify rotation mode for ik and tweak controls
+ pb[bones['ik']['ctrl']['limb']].rotation_mode = 'ZXY'
+
+ for b in bones['tweak']['ctrl']:
+ pb[b].rotation_mode = 'ZXY'
+
+ # Create ik/fk switch property
pb_parent = pb[ bones['parent'] ]
pb_parent['IK_Strertch'] = 1.0
diff --git a/rigify/rigs/pitchipoy/limbs/leg.py b/rigify/rigs/pitchipoy/limbs/leg.py
index 5e1844a..9176bd9 100644
--- a/rigify/rigs/pitchipoy/limbs/leg.py
+++ b/rigify/rigs/pitchipoy/limbs/leg.py
@@ -227,6 +227,12 @@ def create_leg( cls, bones ):
'owner_space' : 'LOCAL'
})
+ # Modify rotation mode for ik and tweak controls
+ pb[bones['ik']['ctrl']['limb']].rotation_mode = 'ZXY'
+
+ for b in bones['tweak']['ctrl']:
+ pb[b].rotation_mode = 'ZXY'
+
# Create ik/fk switch property
pb_parent = pb[ bones['parent'] ]
diff --git a/rigify/rigs/pitchipoy/limbs/paw.py b/rigify/rigs/pitchipoy/limbs/paw.py
index 32e39a3..89de5e9 100644
--- a/rigify/rigs/pitchipoy/limbs/paw.py
+++ b/rigify/rigs/pitchipoy/limbs/paw.py
@@ -94,8 +94,15 @@ def create_paw( cls, bones ):
'owner_space' : 'LOCAL'
})
- # Create ik/fk switch property
pb = cls.obj.pose.bones
+
+ # Modify rotation mode for ik and tweak controls
+ pb[bones['ik']['ctrl']['limb']].rotation_mode = 'ZXY'
+
+ for b in bones['tweak']['ctrl']:
+ pb[b].rotation_mode = 'ZXY'
+
+ # Create ik/fk switch property
pb_parent = pb[ bones['parent'] ]
pb_parent['IK_Strertch'] = 1.0
diff --git a/rigify/rigs/pitchipoy/super_torso_turbo.py b/rigify/rigs/pitchipoy/super_torso_turbo.py
index c676d59..e1ff5b0 100644
--- a/rigify/rigs/pitchipoy/super_torso_turbo.py
+++ b/rigify/rigs/pitchipoy/super_torso_turbo.py
@@ -130,7 +130,11 @@ class Rig:
mch_eb.length /= 4
# Positioning pivot in a more usable location for animators
- pivot_loc = ( eb[ org_bones[0]].head + eb[ org_bones[0]].tail ) / 2
+ if hasattr(self,'tail_pos') and self.tail_pos > 0:
+ pivot_loc = eb[ org_bones[pivot-1]].head
+ else:
+ pivot_loc = ( eb[ org_bones[0]].head + eb[ org_bones[0]].tail ) / 2
+
put_bone( self.obj, ctrl_name, pivot_loc )
return {
@@ -495,7 +499,13 @@ class Rig:
'subtarget' : tweaks[ tidx + 1 ],
})
-
+ pb = self.obj.pose.bones
+
+ for t in tweaks:
+ if t != bones['neck']['ctrl']:
+ pb[t].rotation_mode = 'ZXY'
+
+
def create_drivers( self, bones ):
bpy.ops.object.mode_set(mode ='OBJECT')
pb = self.obj.pose.bones
More information about the Bf-extensions-cvs
mailing list