diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-28 21:03:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-28 21:03:04 +0300 |
commit | 8177f343a0303a66e36f2b78566045c0dea0b406 (patch) | |
tree | b1b63d0aac8df1cfb349895fceeff1047cecc43e /release/scripts/op | |
parent | 32656ad4ba6af89fcbd8247bc219e55be802ebdc (diff) |
- object.add_shape_key(name="Key", from_mix=True)
- ensure new shape key names are unique
- Transfer ShapeKey now can have its settings changes (redo operator)
Diffstat (limited to 'release/scripts/op')
-rw-r--r-- | release/scripts/op/object.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/release/scripts/op/object.py b/release/scripts/op/object.py index e093460ab31..5e261c18c23 100644 --- a/release/scripts/op/object.py +++ b/release/scripts/op/object.py @@ -170,7 +170,6 @@ class ShapeTransfer(bpy.types.Operator): default=False) def _main(self, ob_act, objects, mode='OFFSET', use_clamp=False): - def me_nos(verts): return [v.normal.copy() for v in verts] @@ -178,11 +177,10 @@ class ShapeTransfer(bpy.types.Operator): return [v.co.copy() for v in verts] def ob_add_shape(ob): - C_tmp = {"object": ob} me = ob.data - if me.shape_keys is None: # add basis - bpy.ops.object.shape_key_add(C_tmp) - bpy.ops.object.shape_key_add(C_tmp) + ob.add_shape_key(from_mix=False) + if len(me.shape_keys.keys) == 1: + ob.add_shape_key(from_mix=False) # we need a rest ob.active_shape_key_index = len(me.shape_keys.keys) - 1 ob.shape_key_lock = True |