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>2015-05-04 05:25:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-04 09:01:20 +0300
commitfdc5f9c0a81bba0be6bab5120cdfc955d63265d5 (patch)
treea1c0f16847e59d5257f6104dd646ebe083da02c7 /source/blender/editors/mesh/editmesh_add.c
parent4e7ef3f5cd8cd96545c3250a93bf856174ee54e2 (diff)
Add name argument to data creation API calls
Was adding then renaming, unnecessarily.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_add.c')
-rw-r--r--source/blender/editors/mesh/editmesh_add.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 6ce5e8a304b..c67ee41703a 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -62,10 +62,7 @@ static Object *make_prim_init(bContext *C, const char *idname,
*was_editmode = false;
if (obedit == NULL || obedit->type != OB_MESH) {
- obedit = ED_object_add_type(C, OB_MESH, loc, rot, false, layer);
-
- rename_id((ID *)obedit, idname);
- rename_id((ID *)obedit->data, idname);
+ obedit = ED_object_add_type(C, OB_MESH, idname, loc, rot, false, layer);
/* create editmode */
ED_object_editmode_enter(C, EM_DO_UNDO | EM_IGNORE_LAYER); /* rare cases the active layer is messed up */