[Bf-blender-cvs] [acb5bbf9b23] blender2.8: UI: use subpanels for Cycles, render, scene, object, particle, curves.
William Reynish
noreply at git.blender.org
Mon Jun 4 13:44:35 CEST 2018
Commit: acb5bbf9b23ebaa3f7617098d70692b985e303fb
Author: William Reynish
Date: Mon Jun 4 12:20:40 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBacb5bbf9b23ebaa3f7617098d70692b985e303fb
UI: use subpanels for Cycles, render, scene, object, particle, curves.
===================================================================
M intern/cycles/blender/addon/ui.py
M release/scripts/startup/bl_ui/properties_data_curve.py
M release/scripts/startup/bl_ui/properties_object.py
M release/scripts/startup/bl_ui/properties_particle.py
M release/scripts/startup/bl_ui/properties_render.py
M release/scripts/startup/bl_ui/properties_scene.py
M source/blender/makesrna/intern/rna_particle.c
===================================================================
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 13d070be135..a7008efdcf8 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -162,33 +162,55 @@ class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel):
if cscene.progressive == 'PATH' or use_branched_path(context) is False:
col = layout.column(align=True)
- col.prop(cscene, "samples", text="Render Samples")
- col.prop(cscene, "preview_samples", text="Preview Samples")
+ col.prop(cscene, "samples", text="Render")
+ col.prop(cscene, "preview_samples", text="Viewport")
+ col.separator()
col.prop(cscene, "use_square_samples") # Duplicate below.
else:
+
col = layout.column(align=True)
- col.prop(cscene, "aa_samples", text="Render Samples")
- col.prop(cscene, "preview_aa_samples", text="Preview Samples")
+ col.label(text="AA Samples")
+ col.prop(cscene, "aa_samples", text="Render")
+ col.prop(cscene, "preview_aa_samples", text="Preview")
col = layout.column(align=True)
- col.prop(cscene, "diffuse_samples", text="Diffuse Samples")
- col.prop(cscene, "glossy_samples", text="Glossy Samples")
- col.prop(cscene, "transmission_samples", text="Transmission Samples")
- col.prop(cscene, "ao_samples", text="AO Samples")
+ col.label(text="Samples")
+ col.prop(cscene, "diffuse_samples", text="Diffuse")
+ col.prop(cscene, "glossy_samples", text="Glossy")
+ col.prop(cscene, "transmission_samples", text="Transmission")
+ col.prop(cscene, "ao_samples", text="AO")
sub = col.row(align=True)
sub.active = use_sample_all_lights(context)
- sub.prop(cscene, "mesh_light_samples", text="Mesh Light Samples")
-
- col.prop(cscene, "subsurface_samples", text="Subsurface Samples")
- col.prop(cscene, "volume_samples", text="Volume Samples")
-
+ sub.prop(cscene, "mesh_light_samples", text="Mesh Light")
+ col.prop(cscene, "subsurface_samples", text="Subsurface")
+ col.prop(cscene, "volume_samples", text="Volume")
+ col.separator()
col.prop(cscene, "use_square_samples") # Duplicate above.
col = layout.column(align=True)
col.prop(cscene, "sample_all_lights_direct")
col.prop(cscene, "sample_all_lights_indirect")
+ row = layout.row(align=True)
+ row.prop(cscene, "seed")
+ row.prop(cscene, "use_animated_seed", text="", icon="TIME")
+
+ layout.prop(cscene, "sampling_pattern", text="Pattern")
+
+
+class CYCLES_RENDER_PT_sampling_light(CyclesButtonsPanel, Panel):
+ bl_label = "Light"
+ bl_parent_id = "CYCLES_RENDER_PT_sampling"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ scene = context.scene
+ cscene = scene.cycles
+
col = layout.column(align=True)
col.prop(cscene, "light_sampling_threshold", text="Light Threshold")
@@ -196,12 +218,6 @@ class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel):
col.prop(cscene, "sample_clamp_direct")
col.prop(cscene, "sample_clamp_indirect")
- row = layout.row(align=True)
- row.prop(cscene, "seed")
- row.prop(cscene, "use_animated_seed", text="", icon="TIME")
-
- layout.row().prop(cscene, "sampling_pattern", text="Pattern")
-
draw_samples_info(layout, context)
@@ -209,38 +225,79 @@ class CYCLES_RENDER_PT_geometry(CyclesButtonsPanel, Panel):
bl_label = "Geometry"
bl_options = {'DEFAULT_CLOSED'}
+ def draw(self, context):
+ pass
+
+
+class CYCLES_RENDER_PT_geometry_subdivision(CyclesButtonsPanel, Panel):
+ bl_label = "Subdivision"
+ bl_parent_id = "CYCLES_RENDER_PT_geometry"
+
+ @classmethod
+ def poll(self, context):
+ return context.scene.cycles.feature_set == 'EXPERIMENTAL'
+
def draw(self, context):
layout = self.layout
layout.use_property_split = True
scene = context.scene
cscene = scene.cycles
- ccscene = scene.cycles_curves
- col = layout.column(align=True)
- col.prop(cscene, "volume_step_size", text="Volume Step Size")
- col.prop(cscene, "volume_max_steps", text="Volume Max Steps")
+ col = layout.column()
+ sub = col.column(align=True)
+ sub.prop(cscene, "dicing_rate", text="Dicing Rate Render")
+ sub.prop(cscene, "preview_dicing_rate", text="Preview")
col.separator()
- if cscene.feature_set == 'EXPERIMENTAL':
+ col.prop(cscene, "offscreen_dicing_scale", text="Offscreen Scale")
+ col.prop(cscene, "max_subdivisions")
- col = layout.column()
- sub = col.column(align=True)
- sub.prop(cscene, "dicing_rate", text="Dicing Rate Render")
- sub.prop(cscene, "preview_dicing_rate", text="Dicing Rate Preview")
+ col.prop(cscene, "dicing_camera")
- col.prop(cscene, "offscreen_dicing_scale", text="Offscreen Scale")
- col.prop(cscene, "max_subdivisions")
- col.prop(cscene, "dicing_camera")
+class CYCLES_RENDER_PT_geometry_volume(CyclesButtonsPanel, Panel):
+ bl_label = "Volume"
+ bl_parent_id = "CYCLES_RENDER_PT_geometry"
- col.separator()
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ scene = context.scene
+ cscene = scene.cycles
+ ccscene = scene.cycles_curves
- layout.prop(ccscene, "use_curves", text="Hair Rendering")
col = layout.column()
- col.active = ccscene.use_curves
+ col.prop(cscene, "volume_step_size", text="Step Size")
+ col.prop(cscene, "volume_max_steps", text="Max Steps")
+
+
+class CYCLES_RENDER_PT_geometry_hair(CyclesButtonsPanel, Panel):
+ bl_label = "Hair"
+ bl_parent_id = "CYCLES_RENDER_PT_geometry"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw_header(self, context):
+ layout = self.layout
+ scene = context.scene
+ cscene = scene.cycles
+ ccscene = scene.cycles_curves
+
+ layout.prop(ccscene, "use_curves", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ scene = context.scene
+ cscene = scene.cycles
+ ccscene = scene.cycles_curves
+ layout.active = ccscene.use_curves
+
+ col = layout.column()
col.prop(ccscene, "minimum_width", text="Min Pixels")
col.prop(ccscene, "maximum_width", text="Max Extension")
col.prop(ccscene, "shape", text="Shape")
@@ -270,14 +327,41 @@ class CYCLES_RENDER_PT_light_paths(CyclesButtonsPanel, Panel):
row.operator("render.cycles_integrator_preset_add", text="", icon="ZOOMIN")
row.operator("render.cycles_integrator_preset_add", text="", icon="ZOOMOUT").remove_active = True
+
+class CYCLES_RENDER_PT_light_paths_max_bounces(CyclesButtonsPanel, Panel):
+ bl_label = "Max Bounces"
+ bl_parent_id = "CYCLES_RENDER_PT_light_paths"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ scene = context.scene
+ cscene = scene.cycles
+
+ col = layout.column(align=True)
+ col.prop(cscene, "max_bounces", text="Total")
+
col = layout.column(align=True)
- col.prop(cscene, "max_bounces", text="Max Bounces")
- col.prop(cscene, "transparent_max_bounces", text="Transparency")
col.prop(cscene, "diffuse_bounces", text="Diffuse")
col.prop(cscene, "glossy_bounces", text="Glossy")
+ col.prop(cscene, "transparent_max_bounces", text="Transparency")
col.prop(cscene, "transmission_bounces", text="Transmission")
col.prop(cscene, "volume_bounces", text="Volume")
+
+class CYCLES_RENDER_PT_light_paths_caustics(CyclesButtonsPanel, Panel):
+ bl_label = "Caustics"
+ bl_parent_id = "CYCLES_RENDER_PT_light_paths"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ scene = context.scene
+ cscene = scene.cycles
+
col = layout.column()
col.prop(cscene, "blur_glossy")
col.prop(cscene, "caustics_reflective")
@@ -305,9 +389,29 @@ class CYCLES_RENDER_PT_motion_blur(CyclesButtonsPanel, Panel):
col = layout.column()
col.prop(cscene, "motion_blur_position", text="Position")
col.prop(rd, "motion_blur_shutter")
+ col.separator()
+ col.prop(cscene, "rolling_shutter_type", text="Rolling Shutter")
+ sub = col.column()
+ sub.active = cscene.rolling_shutter_type != 'NONE'
+ sub.prop(cscene, "rolling_shutter_duration")
+
+
+class CYCLES_RENDER_PT_motion_blur_curve(CyclesButtonsPanel, Panel):
+ bl_label = "Shutter Curve"
+ bl_parent_id = "CYCLES_RENDER_PT_motion_blur"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ scene = context.scene
+ cscene = scene.cycles
+ rd = scene.render
+ layout.active = rd.use_motion_blur
col = layout.column()
- col.label("Shutter curve:")
+
col.template_curve_mapping(rd, "motion_blur_shutter_curve")
col = layout.column(align=True)
@@ -319,12 +423,6 @@ class CYCLES_RENDER_PT_motion_blur(CyclesButtonsPanel, Panel):
row.operator("render.shutter_curve_preset", icon='LINCURVE', text="").shape = 'LINE'
row.operator("render.shutter_curve_preset", icon='NOCURVE', text="").shape = 'MAX'
- col = layout.column()
- col.prop(cscene, "rolling_shutter_type")
- row = col.row()
- row.active = cscene.rolling_shutter_type != 'NONE'
- row.prop(cscene, "rolling_shutter_duration")
-
class CYCLES_RENDER_PT_film(Cyc
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list