patch from Cessen

Adds a new set of bones to rig types which are to be used for weight paint vgroups, in some these have some more segments to account for twist. also use Aligoriths new copy transform constraint.
This commit is contained in:
2010-01-02 23:43:46 +00:00
parent 04d0261c37
commit d8d11c55d9
9 changed files with 175 additions and 38 deletions

View File

@@ -61,22 +61,11 @@ def deform(obj, definitions, base_names, options):
bone = obj.pose.bones[bone_name]
# Constrain to the original bone
# XXX. Todo, is this needed if the bone is connected to its parent?
con = bone.constraints.new('COPY_LOCATION')
con = bone.constraints.new('COPY_TRANSFORMS')
con.name = "copy_loc"
con.target = obj
con.subtarget = definitions[0]
con = bone.constraints.new('COPY_ROTATION')
con.name = "copy_rot"
con.target = obj
con.subtarget = definitions[0]
con = bone.constraints.new('COPY_SCALE')
con.name = "copy_scale"
con.target = obj
con.subtarget = definitions[0]
return (bone_name,)
@@ -94,18 +83,10 @@ def main(obj, bone_definition, base_names, options):
cp.update()
mt.update()
if not cp.cpy_b.connected:
con = mt.cpy_p.constraints.new('COPY_LOCATION')
con.target = obj
con.subtarget = cp.cpy
con = mt.cpy_p.constraints.new('COPY_ROTATION')
con = mt.cpy_p.constraints.new('COPY_TRANSFORMS')
con.target = obj
con.subtarget = cp.cpy
con = mt.cpy_p.constraints.new('COPY_SCALE')
con.target = obj
con.subtarget = cp.cpy
# Rotation mode and axis locks
cp.cpy_p.rotation_mode = mt.cpy_p.rotation_mode