Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Vegdahl <cessen@cessen.com>2010-01-19 22:07:09 +0300
committerNathan Vegdahl <cessen@cessen.com>2010-01-19 22:07:09 +0300
commitc54d54e8aeb386fd8f5cbd61d62fb5a490bb6ea8 (patch)
tree6a9fdb6aa9b7ddf4ae4c864bd42075efdc6ae3de /release/scripts/modules/rigify/leg_biped.py
parent40fb29862ea06794d27378aaf64638d8c1f72121 (diff)
Rigify:
- Added two driven-shape-key rig types that create and drive shape keys on a mesh/meshes based on the distance or rotation difference between two bones. - Fixed bug in finger curl rig type where secondary finger controls were not created. Finger type can also now (optionally) have a hinge switch (useful when using it for wings). - Changed the blending system in rigify_utils to use copy_transforms constraints instead of copy_loc+copy_rot. - Finished the quadruped leg type. Now has both ik and fk control and ik/fk switching. Also uses a rotating bone to control the knee direction instead of a pole target (seems to work more consistently for quadruped setups). There's still one annoying bug regarding foot roll, but it's not blocking. I'll track it down later. - Mouth rig now creates corrective shape keys on the face mesh for dealing with mouth corners when they spread open. - Biped arm and leg types now cause mesh to scale when you scale the fk controls. - Misc improvements to the rig types.
Diffstat (limited to 'release/scripts/modules/rigify/leg_biped.py')
-rw-r--r--release/scripts/modules/rigify/leg_biped.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/release/scripts/modules/rigify/leg_biped.py b/release/scripts/modules/rigify/leg_biped.py
index 70be980d7b2..5c214cea362 100644
--- a/release/scripts/modules/rigify/leg_biped.py
+++ b/release/scripts/modules/rigify/leg_biped.py
@@ -219,6 +219,8 @@ def ik(obj, bone_definition, base_names, options):
ik.foot_roll_p.lock_rotation = False, True, True
ik_chain.toe_p.rotation_mode = 'YXZ'
ik_chain.toe_p.lock_rotation = False, True, True
+ ik_chain.toe_p.lock_location = True, True, True
+ ik.foot_roll_p.lock_location = True, True, True
# IK
con = ik_chain.shin_p.constraints.new('IK')
@@ -329,6 +331,7 @@ def fk(obj, bone_definition, base_names, options):
foot_p.rotation_mode = 'YXZ'
fk_chain.toe_p.rotation_mode = 'YXZ'
fk_chain.toe_p.lock_rotation = False, True, True
+ fk_chain.thigh_p.lock_location = True, True, True
con = fk_chain.thigh_p.constraints.new('COPY_LOCATION')
con.target = obj
@@ -336,7 +339,7 @@ def fk(obj, bone_definition, base_names, options):
# hinge
prop = rna_idprop_ui_prop_get(fk_chain.thigh_p, "hinge", create=True)
- fk_chain.thigh_p["hinge"] = 0.5
+ fk_chain.thigh_p["hinge"] = 0.0
prop["soft_min"] = 0.0
prop["soft_max"] = 1.0
@@ -441,6 +444,11 @@ def deform(obj, definitions, base_names, options):
con.target = obj
con.subtarget = definitions[2]
+ con = uleg1.constraints.new('COPY_SCALE')
+ con.name = "scale"
+ con.target = obj
+ con.subtarget = definitions[1]
+
con = uleg2.constraints.new('COPY_ROTATION')
con.name = "copy_rot"
con.target = obj
@@ -452,6 +460,11 @@ def deform(obj, definitions, base_names, options):
con.target = obj
con.subtarget = definitions[2]
+ con = lleg1.constraints.new('COPY_SCALE')
+ con.name = "copy_rot"
+ con.target = obj
+ con.subtarget = definitions[2]
+
con = lleg2.constraints.new('COPY_ROTATION')
con.name = "copy_rot"
con.target = obj
@@ -484,5 +497,5 @@ def main(obj, bone_definition, base_names, options):
deform(obj, bone_definition, base_names, options)
bpy.ops.object.mode_set(mode='OBJECT')
- blend_bone_list(obj, bone_definition + [None], bones_fk, bones_ik, target_bone=bones_ik[6], target_prop="ik", blend_default=0.0)
+ blend_bone_list(obj, bone_definition + [None], bones_fk, bones_ik, target_bone=bones_ik[6], target_prop="ik", blend_default=1.0)