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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-10-06 16:04:55 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-10-15 15:06:07 +0400
commitfc9051da0d1e14c95654a979925838c7ff9ef1bd (patch)
tree9d537c6b71ac3031a84286f9bd07a29aef6a15b9 /source
parent6ce663b80ad5be4a9e628be22e923f5164b1e373 (diff)
Fix T42075: DnD Material not updating render view
Diffstat (limited to 'source')
-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;
}