[Bf-blender-cvs] [1019df81ffb] blender-v2.91-release: Fix T82251: Outliner Material Drag&Drop missing tree update
Philipp Oeser
noreply at git.blender.org
Fri Nov 6 16:57:05 CET 2020
Commit: 1019df81ffbcb0f696b260fc8cfb6a6bb1104a62
Author: Philipp Oeser
Date: Fri Oct 30 16:41:30 2020 +0100
Branches: blender-v2.91-release
https://developer.blender.org/rB1019df81ffbcb0f696b260fc8cfb6a6bb1104a62
Fix T82251: Outliner Material Drag&Drop missing tree update
Caused by rBb077de086e14.
Not entirely sure why this was rebuilding the tree prior to above
commit, but sending an ND_OB_SHADING notifier is appropriate (and also
what the Outliners listener listens to).
Maniphest Tasks: T82251
Differential Revision: https://developer.blender.org/D9396
===================================================================
M source/blender/editors/space_outliner/outliner_dragdrop.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c
index 6c0975498e0..865e06bf0b6 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.c
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.c
@@ -641,6 +641,7 @@ static int material_drop_invoke(bContext *C, wmOperator *UNUSED(op), const wmEve
BKE_object_material_assign(bmain, ob, ma, ob->totcol + 1, BKE_MAT_ASSIGN_USERPREF);
+ WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, ob);
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);
More information about the Bf-blender-cvs
mailing list