diff options
author | Ethan-Hall <Ethan1080> | 2022-03-09 19:00:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-03-11 20:27:58 +0300 |
commit | 3b28c785d4e438428af3aa513d56f5fd394498e4 (patch) | |
tree | 89507a819e4e6fe215862f105dab70a54e853426 /release | |
parent | 3902bebf1809e4243b2184852aeb82e57ca68421 (diff) |
Cycles: show viewport hair settings when using Cycles
Before this patch, users had to switch render engines just to change how the
hair should be displayed in solid and material preview viewport shading modes.
Differential Revision: https://developer.blender.org/D14290
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_render.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index b7522cbb04e..2a7af8357e7 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -484,6 +484,18 @@ class RENDER_PT_eevee_film(RenderButtonsPanel, Panel): sub.prop(props, "overscan_size", text="") +def draw_hair_settings(self, context): + layout = self.layout + scene = context.scene + rd = scene.render + + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + layout.prop(rd, "hair_type", text="Shape", expand=True) + layout.prop(rd, "hair_subdiv") + + class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel): bl_label = "Hair" bl_options = {'DEFAULT_CLOSED'} @@ -494,14 +506,7 @@ class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel): return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): - layout = self.layout - scene = context.scene - rd = scene.render - - layout.use_property_split = True - - layout.prop(rd, "hair_type", expand=True) - layout.prop(rd, "hair_subdiv") + draw_hair_settings(self, context) class RENDER_PT_eevee_performance(RenderButtonsPanel, Panel): @@ -519,6 +524,7 @@ class RENDER_PT_eevee_performance(RenderButtonsPanel, Panel): rd = scene.render layout.use_property_split = True + layout.use_property_decorate = False # No animation. layout.prop(rd, "use_high_quality_normals") |