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/makesrna | |
parent | 5508b572ea9bb2d3b758cae6898035005e8ebb2a (diff) |
Cleanup: remove moar G.main from BKE area.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 356355fa61c..6131b7adac8 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -228,9 +228,10 @@ static void rna_Object_free_duplilist(Object *ob) static PointerRNA rna_Object_shape_key_add(Object *ob, bContext *C, ReportList *reports, const char *name, int from_mix) { + Main *bmain = CTX_data_main(C); KeyBlock *kb = NULL; - if ((kb = BKE_object_shapekey_insert(ob, name, from_mix))) { + if ((kb = BKE_object_shapekey_insert(bmain, ob, name, from_mix))) { PointerRNA keyptr; RNA_pointer_create((ID *)ob->data, &RNA_ShapeKey, kb, &keyptr); |