[Bf-blender-cvs] [946f9d8fb35] blender2.8: Eevee: Fix "Show Irradiance/cubemap" icons

Clément Foucault noreply at git.blender.org
Mon Nov 5 16:31:24 CET 2018


Commit: 946f9d8fb350ee0a6bb548c80031334dd7e9222a
Author: Clément Foucault
Date:   Mon Nov 5 12:53:54 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB946f9d8fb350ee0a6bb548c80031334dd7e9222a

Eevee: Fix "Show Irradiance/cubemap" icons

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

M	release/scripts/startup/bl_ui/properties_render.py
M	source/blender/makesrna/intern/rna_scene.c

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

diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 56022477515..19de7563c2c 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -464,17 +464,11 @@ class RENDER_PT_eevee_indirect_lighting_display(RenderButtonsPanel, Panel):
 
         row = layout.row(align=True)
         row.prop(props, "gi_cubemap_display_size", text="Cubemap Size")
-        if props.gi_show_cubemaps:
-            row.prop(props, "gi_show_cubemaps", text="", toggle=True, icon='HIDE_OFF')
-        else:
-            row.prop(props, "gi_show_cubemaps", text="", toggle=True, icon='HIDE_ON')
+        row.prop(props, "gi_show_cubemaps", text="", toggle=True)
 
         row = layout.row(align=True)
         row.prop(props, "gi_irradiance_display_size", text="Irradiance Size")
-        if props.gi_show_irradiance:
-            row.prop(props, "gi_show_irradiance", text="", toggle=True, icon='HIDE_OFF')
-        else:
-            row.prop(props, "gi_show_irradiance", text="", toggle=True, icon='HIDE_ON')
+        row.prop(props, "gi_show_irradiance", text="", toggle=True)
 
 
 class RENDER_PT_eevee_film(RenderButtonsPanel, Panel):
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index e4e6cd974d9..24889d97898 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -5688,12 +5688,14 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
 	prop = RNA_def_property(srna, "gi_show_irradiance", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_SHOW_IRRADIANCE);
 	RNA_def_property_boolean_default(prop, 0);
+	RNA_def_property_ui_icon(prop, ICON_HIDE_ON, 1);
 	RNA_def_property_ui_text(prop, "Show Irradiance Cache", "Display irradiance samples in the viewport");
 	RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
 
 	prop = RNA_def_property(srna, "gi_show_cubemaps", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_SHOW_CUBEMAPS);
 	RNA_def_property_boolean_default(prop, 0);
+	RNA_def_property_ui_icon(prop, ICON_HIDE_ON, 1);
 	RNA_def_property_ui_text(prop, "Show Cubemap Cache", "Display captured cubemaps in the viewport");
 	RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);



More information about the Bf-blender-cvs mailing list