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:
authorCampbell Barton <ideasman42@gmail.com>2009-12-28 21:03:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-28 21:03:04 +0300
commit8177f343a0303a66e36f2b78566045c0dea0b406 (patch)
treeb1b63d0aac8df1cfb349895fceeff1047cecc43e /source/blender/editors
parent32656ad4ba6af89fcbd8247bc219e55be802ebdc (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 'source/blender/editors')
-rw-r--r--source/blender/editors/mesh/meshtools.c6
-rw-r--r--source/blender/editors/object/object_modifier.c4
-rw-r--r--source/blender/editors/object/object_shapekey.c4
3 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index b004fcb0deb..949faf16ef9 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -588,7 +588,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
key->type= KEY_RELATIVE;
/* first key added, so it was the basis. initialise it with the existing mesh */
- kb= add_keyblock(key);
+ kb= add_keyblock(key, NULL);
mesh_to_key(me, kb);
}
@@ -604,9 +604,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
if (!dm) continue;
- kb= add_keyblock(key);
- strcpy(kb->name, base->object->id.name+2);
- BLI_uniquename(&key->block, kb, "Key", '.', offsetof(KeyBlock, name), 32);
+ kb= add_keyblock(key, base->object->id.name+2);
DM_to_meshkey(dm, me, kb);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 8bfc9a66690..3e9b1cfe7c7 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -370,11 +370,11 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M
key->type= KEY_RELATIVE;
/* if that was the first key block added, then it was the basis.
* Initialise it with the mesh, and add another for the modifier */
- kb= add_keyblock(key);
+ kb= add_keyblock(key, NULL);
mesh_to_key(me, kb);
}
- kb= add_keyblock(key);
+ kb= add_keyblock(key, md->name);
DM_to_meshkey(dm, me, kb);
dm->release(dm);
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 5d839e60ca9..99b35b998c2 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -84,7 +84,7 @@
static void ED_object_shape_key_add(bContext *C, Scene *scene, Object *ob, int from_mix)
{
- if(object_insert_shape_key(scene, ob, from_mix)) {
+ if(object_insert_shape_key(scene, ob, NULL, from_mix)) {
Key *key= ob_get_key(ob);
ob->shapenr= BLI_countlist(&key->block);
@@ -241,7 +241,7 @@ static int shape_key_add_exec(bContext *C, wmOperator *op)
int from_mix = RNA_boolean_get(op->ptr, "from_mix");
ED_object_shape_key_add(C, scene, ob, from_mix);
-
+
return OPERATOR_FINISHED;
}