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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-12 13:53:27 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-12 13:53:27 +0300
commitbe57cf9b2a0e1be577211839487cacd288886c1a (patch)
treee5a9e80db484a2b1c71fc0acfc31a4591fff427e /source/blender/editors/object/object_shapekey.c
parent5508b572ea9bb2d3b758cae6898035005e8ebb2a (diff)
Cleanup: remove moar G.main from BKE area.
Diffstat (limited to 'source/blender/editors/object/object_shapekey.c')
-rw-r--r--source/blender/editors/object/object_shapekey.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 7d7130fdbc7..2f536f59c81 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -76,8 +76,9 @@
static void ED_object_shape_key_add(bContext *C, Object *ob, const bool from_mix)
{
+ Main *bmain = CTX_data_main(C);
KeyBlock *kb;
- if ((kb = BKE_object_shapekey_insert(ob, NULL, from_mix))) {
+ if ((kb = BKE_object_shapekey_insert(bmain, ob, NULL, from_mix))) {
Key *key = BKE_key_from_object(ob);
/* for absolute shape keys, new keys may not be added last */
ob->shapenr = BLI_findindex(&key->block, kb) + 1;