[Bf-blender-cvs] [1fe7b84] master: Fix T42973: Render viewport not updating when switching materials in Outliner
Bastien Montagne
noreply at git.blender.org
Sun Dec 21 12:43:09 CET 2014
Commit: 1fe7b84c733407b6fd0b855c1c91ad939c2ad342
Author: Bastien Montagne
Date: Sun Dec 21 12:40:02 2014 +0100
Branches: master
https://developer.blender.org/rB1fe7b84c733407b6fd0b855c1c91ad939c2ad342
Fix T42973: Render viewport not updating when switching materials in Outliner
For now, do as RNA material update functions - tag object for update too.
===================================================================
M source/blender/editors/space_outliner/outliner_select.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 6f5bf71..23586a6 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -290,6 +290,10 @@ static eOLDrawState tree_element_active_material(
}
}
if (set != OL_SETSEL_NONE) {
+ /* Tagging object for update seems a bit stupid here, but looks like we have to do it
+ * for render views to update. See T42973.
+ * Note that RNA material update does it too, see e.g. rna_MaterialSlot_update(). */
+ DAG_id_tag_update((ID *)ob, OB_RECALC_OB);
WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_LINKS, NULL);
}
return OL_DRAWSEL_NONE;
More information about the Bf-blender-cvs
mailing list