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:
authorCampbell Barton <ideasman42@gmail.com>2014-10-06 16:04:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-10-06 16:08:47 +0400
commit81c4c295041b72986efe4427fa3587a1d62c3ee6 (patch)
tree630f2cbd07628f4a01040ad0cf4071cf43bf31e9 /source/blender
parent471a011122415b6a78a2fd403b89263f11200074 (diff)
Fix T42075: DnD Material not updating render view
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/object/object_relations.c7
1 files changed, 5 insertions, 2 deletions
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;
}