Eevee: Fix "Show Irradiance/cubemap" icons
authorClément Foucault <foucault.clem@gmail.com>
Mon, 5 Nov 2018 11:53:54 +0000 (12:53 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Mon, 5 Nov 2018 15:31:12 +0000 (16:31 +0100)
release/scripts/startup/bl_ui/properties_render.py
source/blender/makesrna/intern/rna_scene.c

index 56022477515e10a71e4cc5aa1ce70e578e8dd73f..19de7563c2c01013ac0421389130da9c3e869797 100644 (file)
@@ -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):
index e4e6cd974d9cba80413c7556734e9a53affada68..24889d97898797252580d9fa66c39e396eedc605 100644 (file)
@@ -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);