Fixes: Set rot_mod to ZXY (ctrl&tweaks) & Spine tail_pos
This commit is contained in:
parent
efd386991e
commit
48ab09e860
|
@ -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
|
||||
|
|
|
@ -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'] ]
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue