diff options
author | Pablo Vazquez <venomgfx@gmail.com> | 2018-11-03 07:12:45 +0300 |
---|---|---|
committer | Pablo Vazquez <venomgfx@gmail.com> | 2018-11-03 07:12:45 +0300 |
commit | 4affea081a74f5b97240008e8e774edfc8ad35b4 (patch) | |
tree | f1959d0d31fc61a818e1acae69c46e36b71a44b7 /release/scripts/startup/bl_ui/properties_render.py | |
parent | 9b2fff4ff8181a05434eab927bdba9057e1fc165 (diff) |
UI: Move Simplify panel from Scene to Render properties.
It mainly contains properties that affect the final render/viewport and it's handy
to see if it's enabled or not while going through the render settings.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_render.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_render.py | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 1594fc9b896..56022477515 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -580,6 +580,93 @@ class RENDER_PT_opengl_options(RenderButtonsPanel, Panel): VIEW3D_PT_shading_options.draw(self, context) +class RENDER_PT_simplify(RenderButtonsPanel, Panel): + bl_label = "Simplify" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + + def draw_header(self, context): + rd = context.scene.render + self.layout.prop(rd, "use_simplify", text="") + + def draw(self, context): + pass + + +class RENDER_PT_simplify_viewport(RenderButtonsPanel, Panel): + bl_label = "Viewport" + bl_parent_id = "RENDER_PT_simplify" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + rd = context.scene.render + + layout.active = rd.use_simplify + + flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) + + col = flow.column() + col.prop(rd, "simplify_subdivision", text="Max Subdivision") + + col = flow.column() + col.prop(rd, "simplify_child_particles", text="Max Child Particles") + + +class RENDER_PT_simplify_render(RenderButtonsPanel, Panel): + bl_label = "Render" + bl_parent_id = "RENDER_PT_simplify" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + rd = context.scene.render + + layout.active = rd.use_simplify + + flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) + + col = flow.column() + col.prop(rd, "simplify_subdivision_render", text="Max Subdivision") + + col = flow.column() + col.prop(rd, "simplify_child_particles_render", text="Max Child Particles") + + +class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel): + bl_label = "Grease Pencil" + bl_parent_id = "RENDER_PT_simplify" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + bl_options = {'DEFAULT_CLOSED'} + + def draw_header(self, context): + rd = context.scene.render + self.layout.prop(rd, "simplify_gpencil", text="") + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + rd = context.scene.render + + layout.active = rd.simplify_gpencil + + col = layout.column() + col.prop(rd, "simplify_gpencil_onplay", text="Playback Only") + col.prop(rd, "simplify_gpencil_view_modifier", text="Modifiers") + col.prop(rd, "simplify_gpencil_shader_fx", text="ShaderFX") + + col = layout.column(align=True) + col.prop(rd, "simplify_gpencil_view_fill") + sub = col.column() + sub.active = rd.simplify_gpencil_view_fill + sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines") + + classes = ( RENDER_PT_context, RENDER_PT_eevee_sampling, @@ -603,6 +690,10 @@ classes = ( RENDER_PT_opengl_film, RENDER_PT_color_management, RENDER_PT_color_management_curves, + RENDER_PT_simplify, + RENDER_PT_simplify_viewport, + RENDER_PT_simplify_render, + RENDER_PT_simplify_greasepencil, ) if __name__ == "__main__": # only for live edit. |