Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan-Hall <Ethan1080>2022-03-09 19:00:22 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-03-11 20:27:58 +0300
commit3b28c785d4e438428af3aa513d56f5fd394498e4 (patch)
tree89507a819e4e6fe215862f105dab70a54e853426 /intern/cycles/blender/addon/ui.py
parent3902bebf1809e4243b2184852aeb82e57ca68421 (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 'intern/cycles/blender/addon/ui.py')
-rw-r--r--intern/cycles/blender/addon/ui.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 10a72c598e2..2b74a1b7ccf 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -11,6 +11,7 @@ from bl_ui.utils import PresetPanel
from bpy.types import Panel
from bl_ui.properties_grease_pencil_common import GreasePencilSimplifyPanel
+from bl_ui.properties_render import draw_hair_settings
from bl_ui.properties_view_layer import ViewLayerCryptomattePanel, ViewLayerAOVPanel
class CyclesPresetPanel(PresetPanel, Panel):
@@ -355,6 +356,13 @@ class CYCLES_RENDER_PT_hair(CyclesButtonsPanel, Panel):
if ccscene.shape == 'RIBBONS':
col.prop(ccscene, "subdivisions", text="Curve Subdivisions")
+class CYCLES_RENDER_PT_hair_viewport_display(CyclesButtonsPanel, Panel):
+ bl_label = "Viewport Display"
+ bl_parent_id = "CYCLES_RENDER_PT_hair"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ draw_hair_settings(self, context)
class CYCLES_RENDER_PT_volumes(CyclesButtonsPanel, Panel):
bl_label = "Volumes"
@@ -2153,6 +2161,7 @@ classes = (
CYCLES_RENDER_PT_volumes,
CYCLES_RENDER_PT_subdivision,
CYCLES_RENDER_PT_hair,
+ CYCLES_RENDER_PT_hair_viewport_display,
CYCLES_RENDER_PT_simplify,
CYCLES_RENDER_PT_simplify_viewport,
CYCLES_RENDER_PT_simplify_render,