- object.add_shape_key(name="Key", from_mix=True)
[blender.git] / source / blender / editors / mesh / meshtools.c
index b004fcb0deb80a159739cc4c6dffda644e98396c..949faf16ef9b9810aa116d30314a4115e84b503b 100644 (file)
@@ -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);