diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-08-19 21:25:36 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-08-19 21:25:36 +0300 |
commit | b831accc01a5790b6112f70e8bb5d6b3a8e8ab4d (patch) | |
tree | 2d823f5739c5ad9c408e15f4041a14359e031105 /release/scripts/startup | |
parent | c2c4420f89750309fdf267ba23a5f43b5e366e16 (diff) |
Workbench: hide background option for OpenGL render
When OpenGL renderer is selected the option for background colors are
displayed, but ignored. For now we hide this option as it makes no sense
to have a viewport color option without viewport or render a 'final'
with a theme color.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_render.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 2b91eec67c4..af2b3faafa7 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -853,7 +853,7 @@ class RENDER_PT_opengl_color(RenderButtonsPanel, Panel): return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): - VIEW3D_PT_shading_color.draw(self, context) + VIEW3D_PT_shading_color._draw_color_type(self, context) class RENDER_PT_opengl_options(RenderButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 2edd1815c08..59f705984d3 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3991,20 +3991,27 @@ class VIEW3D_PT_shading_color(Panel): shading = VIEW3D_PT_shading.get_shading(context) return shading.type == 'SOLID' - def draw(self, context): + def _draw_color_type(self, context): layout = self.layout - shading = VIEW3D_PT_shading.get_shading(context) layout.row().prop(shading, 'color_type', expand=True) if shading.color_type == 'SINGLE': layout.row().prop(shading, 'single_color', text="") + def _draw_background_color(self, context): + layout = self.layout + shading = VIEW3D_PT_shading.get_shading(context) + layout.row().label("Background") layout.row().prop(shading, 'background_type', expand=True) if shading.background_type == 'VIEWPORT': layout.row().prop(shading, "background_color", text="") + def draw(self, context): + self._draw_color_type(context) + self._draw_background_color(context) + class VIEW3D_PT_shading_options(Panel): bl_space_type = 'VIEW_3D' |