From fc9051da0d1e14c95654a979925838c7ff9ef1bd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Oct 2014 14:04:55 +0200 Subject: Fix T42075: DnD Material not updating render view --- source/blender/editors/object/object_relations.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 0d58eaee5fa..abc0516cf2b 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2411,10 +2411,13 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, const wmEvent return OPERATOR_CANCELLED; assign_material(base->object, ma, 1, BKE_MAT_ASSIGN_USERPREF); - + + DAG_id_tag_update(&base->object->id, OB_RECALC_OB); + + WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, base->object); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_LINKS, ma); - + return OPERATOR_FINISHED; } -- cgit v1.2.3