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>2014-01-17 16:16:07 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-01-17 16:16:07 +0400
commitdf88dbf955919c1178009781ee6462ff339818a6 (patch)
treef83860a9a2519c7aabaad54bbc1118c1612a71c3 /source/blender/editors/render/render_shading.c
parent6489c1f94d7bf1e83676e8eda91adf217d17926f (diff)
Fix T38161: Copy Material to Others causes incorrect viewport display if target object uses more materials
We need to update object data, like when removing a mat slot, since some mat indices might have become invalid!
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r--source/blender/editors/render/render_shading.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 3ef1f0db647..066195d1afa 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -348,6 +348,7 @@ static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op))
if (ob_iter->totcol == ob->totcol) {
ob_iter->actcol = ob->actcol;
+ DAG_id_tag_update(&ob_iter->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob_iter);
}
}