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!
This commit is contained in:
2014-01-17 13:16:07 +01:00
parent 6489c1f94d
commit df88dbf955

View File

@@ -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);
}
}