diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-31 17:04:04 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-31 17:04:04 +0300 |
commit | 16100f8261770e367b0892bb38c778699ed609fe (patch) | |
tree | 97232730f4680cd689cfa086c5434761c7dd33c7 /source/blender/editors/object/object_relations.c | |
parent | b53d358261a26652d510d62565f1b43035a55e67 (diff) |
Cleanup: get rid of last G.main usages in BKE library code.
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index ee78dc83c26..68bcdc59f4e 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2485,12 +2485,13 @@ void OBJECT_OT_make_single_user(wmOperatorType *ot) static int drop_named_material_invoke(bContext *C, wmOperator *op, const wmEvent *event) { + Main *bmain = CTX_data_main(C); Base *base = ED_view3d_give_base_under_cursor(C, event->mval); Material *ma; char name[MAX_ID_NAME - 2]; RNA_string_get(op->ptr, "name", name); - ma = (Material *)BKE_libblock_find_name(ID_MA, name); + ma = (Material *)BKE_libblock_find_name(bmain, ID_MA, name); if (base == NULL || ma == NULL) return OPERATOR_CANCELLED; |