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-05-29 16:59:18 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-29 17:02:53 +0300
commit8f670dd855b1d81fcf619b3b94ba4bfaf51e896d (patch)
tree681c0dabf0af6e17ead533d174fde08e55e9cd0f /source/blender/editors/object/object_relations.c
parent9d037153f70c9bcc665fffa4971d1517044dbf29 (diff)
parentf7af08b5feecd89ea32c8905de1e61d575ff4bf1 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/blenkernel/BKE_material.h source/blender/blenkernel/BKE_mesh.h source/blender/blenkernel/intern/library_remap.c source/blender/blenkernel/intern/material.c source/blender/editors/object/object_relations.c source/blender/editors/render/render_preview.c source/blender/makesrna/intern/rna_object.c
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 6925daa4b6c..75ff3fc24e6 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1454,7 +1454,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
ob_dst->data = obdata_id;
/* if amount of material indices changed: */
- test_object_materials(ob_dst, ob_dst->data);
+ test_object_materials(bmain, ob_dst, ob_dst->data);
DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA);
break;
@@ -1462,7 +1462,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
/* new approach, using functions from kernel */
for (a = 0; a < ob_src->totcol; a++) {
Material *ma = give_current_material(ob_src, a + 1);
- assign_material(ob_dst, ma, a + 1, BKE_MAT_ASSIGN_USERPREF); /* also works with ma==NULL */
+ assign_material(bmain, ob_dst, ma, a + 1, BKE_MAT_ASSIGN_USERPREF); /* also works with ma==NULL */
}
DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA);
break;
@@ -1875,7 +1875,7 @@ static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, c
BKE_animdata_copy_id_action(&man->id, false);
man->id.us = 0;
- assign_material(ob, man, a, BKE_MAT_ASSIGN_USERPREF);
+ assign_material(bmain, ob, man, a, BKE_MAT_ASSIGN_USERPREF);
}
}
}
@@ -2513,7 +2513,7 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, const wmEvent
if (base == NULL || ma == NULL)
return OPERATOR_CANCELLED;
- assign_material(base->object, ma, 1, BKE_MAT_ASSIGN_USERPREF);
+ assign_material(CTX_data_main(C), base->object, ma, 1, BKE_MAT_ASSIGN_USERPREF);
DEG_id_tag_update(&base->object->id, OB_RECALC_OB);