[Bf-blender-cvs] [849e77b1f95] master: Fix T51318: Non-update of preview when switching from world to lamp panel.
Bastien Montagne
noreply at git.blender.org
Mon May 22 17:13:03 CEST 2017
Commit: 849e77b1f957b25ac9223a3dc510e234f4467fd1
Author: Bastien Montagne
Date: Mon May 22 17:11:55 2017 +0200
Branches: master
https://developer.blender.org/rB849e77b1f957b25ac9223a3dc510e234f4467fd1
Fix T51318: Non-update of preview when switching from world to lamp panel.
Lamp preview panel is in DATA buttons context...
===================================================================
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index c71af054c02..f2e856bf1ba 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1130,7 +1130,8 @@ static EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSED(C),
static void rna_SpaceProperties_context_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
SpaceButs *sbuts = (SpaceButs *)(ptr->data);
- if (ELEM(sbuts->mainb, BCONTEXT_WORLD, BCONTEXT_MATERIAL, BCONTEXT_TEXTURE)) {
+ /* XXX BCONTEXT_DATA is ugly, but required for lamps... See T51318. */
+ if (ELEM(sbuts->mainb, BCONTEXT_WORLD, BCONTEXT_MATERIAL, BCONTEXT_TEXTURE, BCONTEXT_DATA)) {
sbuts->preview = 1;
}
}
More information about the Bf-blender-cvs
mailing list