diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-12 13:53:27 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-12 13:53:27 +0300 |
commit | be57cf9b2a0e1be577211839487cacd288886c1a (patch) | |
tree | e5a9e80db484a2b1c71fc0acfc31a4591fff427e /source/blender/editors/mesh/meshtools.c | |
parent | 5508b572ea9bb2d3b758cae6898035005e8ebb2a (diff) |
Cleanup: remove moar G.main from BKE area.
Diffstat (limited to 'source/blender/editors/mesh/meshtools.c')
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 6953473a792..8980e1830cf 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -366,7 +366,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) } else if (haskey) { /* add a new key-block and add to the mesh */ - key = me->key = BKE_key_add((ID *)me); + key = me->key = BKE_key_add(bmain, (ID *)me); key->type = KEY_RELATIVE; } @@ -598,6 +598,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) int join_mesh_shapes_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); Mesh *me = (Mesh *)ob->data; @@ -631,7 +632,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op) } if (key == NULL) { - key = me->key = BKE_key_add((ID *)me); + key = me->key = BKE_key_add(bmain, (ID *)me); key->type = KEY_RELATIVE; /* first key added, so it was the basis. initialize it with the existing mesh */ |