diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-14 17:42:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-14 17:42:46 +0300 |
commit | d88c776614fb7ac0b391ca34713e69d2b9ed4665 (patch) | |
tree | 7145fa9554b2bcf3f87a90e4bbc60c8797255cc7 /release/scripts/modules/rigify | |
parent | 91215df5c2c685d5a9bb219a59901c090c74671e (diff) |
edits to the bone copy metarig type from Cessen, pointcache warning fix
Diffstat (limited to 'release/scripts/modules/rigify')
-rw-r--r-- | release/scripts/modules/rigify/copy.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/release/scripts/modules/rigify/copy.py b/release/scripts/modules/rigify/copy.py index d388ee18316..5fda9bd7ba8 100644 --- a/release/scripts/modules/rigify/copy.py +++ b/release/scripts/modules/rigify/copy.py @@ -50,7 +50,10 @@ def main(obj, bone_definition, base_names, options): mt = bone_class_instance(obj, METARIG_NAMES) mt.cpy = bone_definition[0] mt.update() - cp = mt.copy(to_fmt="%s_cpy") + cp = bone_class_instance(obj, ["cpy"]) + cp.cpy_e = copy_bone_simple(arm, mt.cpy, base_names[mt.cpy], parent=True) + cp.cpy = cp.cpy_e.name + bpy.ops.object.mode_set(mode='OBJECT') cp.update() @@ -63,7 +66,19 @@ def main(obj, bone_definition, base_names, options): con = cp.cpy_p.constraints.new('COPY_ROTATION') con.target = obj - con.subtarget = mt.cpy + 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 + cp.cpy_p.lock_location = tuple(mt.cpy_p.lock_location) + cp.cpy_p.lock_rotations_4d = mt.cpy_p.lock_rotations_4d + cp.cpy_p.lock_rotation = tuple(mt.cpy_p.lock_rotation) + cp.cpy_p.lock_rotation_w = mt.cpy_p.lock_rotation_w + cp.cpy_p.lock_scale = tuple(mt.cpy_p.lock_scale) # setup layers last layers = get_layer_dict(options) |