[Bf-blender-cvs] [81c4c29] master: Fix T42075: DnD Material not updating render view

Campbell Barton noreply at git.blender.org
Mon Oct 6 14:09:01 CEST 2014


Commit: 81c4c295041b72986efe4427fa3587a1d62c3ee6
Author: Campbell Barton
Date:   Mon Oct 6 14:04:55 2014 +0200
Branches: master
https://developer.blender.org/rB81c4c295041b72986efe4427fa3587a1d62c3ee6

Fix T42075: DnD Material not updating render view

===================================================================

M	source/blender/editors/object/object_relations.c

===================================================================

diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 0d58eae..abc0516 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;
 }




More information about the Bf-blender-cvs mailing list