diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-29 16:49:21 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-29 16:49:21 +0300 |
commit | f7af08b5feecd89ea32c8905de1e61d575ff4bf1 (patch) | |
tree | b23f8e58157285ce3c6287f664f66bfcba85a69d /source/blender/editors/space_outliner | |
parent | c72a204001ae32ab082af66b373ce19b64e28e2d (diff) |
Cleanup: Get rid of G.main in BKE_material.
Note that in some cases, this only moves the G.main case to somne other
places - in particular, RNA getters/setters are becoming annoying here...
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 71edd855cf0..8a9f9f6aff7 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -2291,6 +2291,7 @@ static int material_drop_invoke(bContext *C, wmOperator *op, const wmEvent *even { Material *ma = NULL; Object *ob = NULL; + Main *bmain = CTX_data_main(C); SpaceOops *soops = CTX_wm_space_outliner(C); ARegion *ar = CTX_wm_region(C); TreeElement *te = NULL; @@ -2313,7 +2314,7 @@ static int material_drop_invoke(bContext *C, wmOperator *op, const wmEvent *even return OPERATOR_CANCELLED; } - assign_material(ob, ma, ob->totcol + 1, BKE_MAT_ASSIGN_USERPREF); + assign_material(bmain, ob, ma, ob->totcol + 1, BKE_MAT_ASSIGN_USERPREF); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_LINKS, ma); |