- added editbone.matrix, readonly, utility property that calculates the matrix from the bone roll

- spine fixes
- arm now uses the average Z axis to place the poll target
This commit is contained in:
2009-12-09 14:25:56 +00:00
parent d6c583cc54
commit a41131db24
5 changed files with 46 additions and 11 deletions

View File

@@ -178,16 +178,16 @@ def main(obj, bone_definition, base_names):
df.ribcage_e = copy_bone_simple(arm, child.name, "DEF-wgt_%s" % base_names[mt.ribcage])
df.ribcage = df.ribcage_e.name
df.ribcage_e.translate(Vector(spine_chain_segment_length * 2.0, - df.ribcage_e.length / 2.0, 0.0))
ex.ribcage_copy_e = copy_bone_simple(arm, mt.ribcage, base_names[mt.ribcage])
ex.ribcage_copy = ex.ribcage_copy_e.name
ex.ribcage_copy_e.connected = False
ex.ribcage_copy_e.parent = ex.ribcage_hinge_e
ex.ribcage_e = copy_bone_simple(arm, child.name, "MCH-wgt_%s" % base_names[mt.ribcage])
ex.ribcage = ex.ribcage_e.name
ex.ribcage_e.translate(Vector(0.0, - ex.ribcage_e.length / 2.0, 0.0))
ex.ribcage_e.parent = mt.ribcage_e
ex.ribcage_copy_e = copy_bone_simple(arm, child.name, base_names[mt.ribcage])
ex.ribcage_copy = ex.ribcage_copy_e.name
ex.ribcage_copy_e.connected = False
ex.ribcage_copy_e.parent = ex.ribcage_hinge_e
ex.ribcage_e.parent = ex.ribcage_copy_e
spine_chain = [child.name for child in spine_chain]
@@ -294,6 +294,8 @@ def main(obj, bone_definition, base_names):
con.target_space = 'LOCAL'
# df.ribcage_p / DEF-wgt_rib_cage
df.ribcage_p.lock_location = True, True, True
con = df.ribcage_p.constraints.new('COPY_ROTATION')
con.target = obj
con.subtarget = ex.ribcage
@@ -329,7 +331,7 @@ def main(obj, bone_definition, base_names):
con = ex.spine_rotate_p.constraints.new('COPY_ROTATION')
con.target = obj
con.subtarget = mt.ribcage
con.subtarget = ex.ribcage_copy
# ex.pelvis_p / MCH-wgt_pelvis