Fix for #36150, missing Preview Render Updates with Add/Remove material slot.
authorThomas Dinges <blender@dingto.org>
Wed, 17 Jul 2013 11:02:51 +0000 (11:02 +0000)
committerThomas Dinges <blender@dingto.org>
Wed, 17 Jul 2013 11:02:51 +0000 (11:02 +0000)
source/blender/editors/render/render_shading.c

index 7a274396e86bf470138e2baee362a35f20a997ca..3cdc2c771fc7c64a22dc98eda5331c85e537b7c4 100644 (file)
@@ -110,6 +110,7 @@ static int material_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
        object_add_material_slot(ob);
        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
        WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, ob);
+       WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_PREVIEW, ob);
        
        return OPERATOR_FINISHED;
 }
@@ -146,6 +147,7 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op)
        DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
        WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, ob);
+       WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_PREVIEW, ob);
        
        return OPERATOR_FINISHED;
 }