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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user