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:
-rw-r--r--intern/cycles/blender/addon/ui.py189
-rw-r--r--release/scripts/startup/bl_ui/properties_data_lamp.py60
2 files changed, 201 insertions, 48 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index a7008efdcf8..5c68115cd86 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1231,6 +1231,7 @@ class CYCLES_WORLD_PT_volume(CyclesButtonsPanel, Panel):
class CYCLES_WORLD_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
bl_label = "Ambient Occlusion"
bl_context = "world"
+ bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
@@ -1324,25 +1325,57 @@ class CYCLES_WORLD_PT_settings(CyclesButtonsPanel, Panel):
col = layout.column()
- col.label(text="Surface")
+class CYCLES_WORLD_PT_settings_surface(CyclesButtonsPanel, Panel):
+ bl_label = "Surface"
+ bl_parent_id = "CYCLES_WORLD_PT_settings"
+ bl_context = "world"
+
+ @classmethod
+ def poll(cls, context):
+ return context.world and CyclesButtonsPanel.poll(context)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ world = context.world
+ cworld = world.cycles
+
+ col = layout.column()
col.prop(cworld, "sample_as_light", text="Multiple Importance")
- sub = col.column(align=True)
+ sub = col.column()
sub.active = cworld.sample_as_light
sub.prop(cworld, "sample_map_resolution")
if use_branched_path(context):
- subsub = sub.row(align=True)
+ subsub = sub.column(align=True)
subsub.active = use_sample_all_lights(context)
subsub.prop(cworld, "samples")
sub.prop(cworld, "max_bounces")
- col.separator()
- col.label(text="Volume")
+class CYCLES_WORLD_PT_settings_volume(CyclesButtonsPanel, Panel):
+ bl_label = "Volume"
+ bl_parent_id = "CYCLES_WORLD_PT_settings"
+ bl_context = "world"
+
+ @classmethod
+ def poll(cls, context):
+ return context.world and CyclesButtonsPanel.poll(context)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ world = context.world
+ cworld = world.cycles
+
+ col = layout.column()
+
sub = col.column()
sub.active = use_cpu(context)
- sub.prop(cworld, "volume_sampling", text="")
- col.prop(cworld, "volume_interpolation", text="")
+ sub.prop(cworld, "volume_sampling", text="Sampling")
+ col.prop(cworld, "volume_interpolation", text="Interpolation")
col.prop(cworld, "homogeneous_volume", text="Homogeneous")
@@ -1425,25 +1458,75 @@ class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel):
mat = context.material
cmat = mat.cycles
+ layout.prop(mat, "pass_index")
+
+
+class CYCLES_MATERIAL_PT_settings_surface(CyclesButtonsPanel, Panel):
+ bl_label = "Surface"
+ bl_parent_id = "CYCLES_MATERIAL_PT_settings"
+ bl_context = "material"
+
+ @classmethod
+ def poll(cls, context):
+ return context.material and CyclesButtonsPanel.poll(context)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ mat = context.material
+ cmat = mat.cycles
+
col = layout.column()
- col.label(text="Surface")
col.prop(cmat, "sample_as_light", text="Multiple Importance")
col.prop(cmat, "use_transparent_shadow")
- col.separator()
- col.label(text="Geometry")
+
+class CYCLES_MATERIAL_PT_settings_geometry(CyclesButtonsPanel, Panel):
+ bl_label = "Geometry"
+ bl_parent_id = "CYCLES_MATERIAL_PT_settings"
+ bl_context = "material"
+
+ @classmethod
+ def poll(cls, context):
+ return context.material and CyclesButtonsPanel.poll(context)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ mat = context.material
+ cmat = mat.cycles
+
+ col = layout.column()
+
col.prop(cmat, "displacement_method", text="Displacement Method")
- col.separator()
- col.label(text="Volume")
+
+class CYCLES_MATERIAL_PT_settings_volume(CyclesButtonsPanel, Panel):
+ bl_label = "Volume"
+ bl_parent_id = "CYCLES_MATERIAL_PT_settings"
+ bl_context = "material"
+
+ @classmethod
+ def poll(cls, context):
+ return context.material and CyclesButtonsPanel.poll(context)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ mat = context.material
+ cmat = mat.cycles
+
+ col = layout.column()
sub = col.column()
sub.active = use_cpu(context)
sub.prop(cmat, "volume_sampling", text="Sampling")
col.prop(cmat, "volume_interpolation", text="Interpolation")
col.prop(cmat, "homogeneous_volume", text="Homogeneous")
- col.separator()
- col.prop(mat, "pass_index")
+
class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
@@ -1600,30 +1683,6 @@ class CYCLES_SCENE_PT_simplify(CyclesButtonsPanel, Panel):
layout.active = rd.use_simplify
- col = layout.column(align=True)
- col.prop(rd, "simplify_subdivision", text="Max Subdivision View")
- col.prop(rd, "simplify_subdivision_render", text="Render")
-
- col.separator()
-
- col = layout.column(align=True)
- col.prop(rd, "simplify_child_particles", text="Child Particles View")
- col.prop(rd, "simplify_child_particles_render", text="Render")
-
- col.separator()
-
- col = layout.column(align=True)
- col.prop(cscene, "texture_limit", text="Texture Limit View")
- col.prop(cscene, "texture_limit_render", text="Render")
-
- col.separator()
-
- col = layout.column(align=True)
- col.prop(cscene, "ao_bounces", text="AO Bounces View")
- col.prop(cscene, "ao_bounces_render", text="Render")
-
- layout.separator()
-
col = layout.column()
col.prop(cscene, "use_camera_cull")
sub = col.column()
@@ -1640,6 +1699,53 @@ class CYCLES_SCENE_PT_simplify(CyclesButtonsPanel, Panel):
sub.prop(cscene, "distance_cull_margin", text="Distance")
+class CYCLES_SCENE_PT_simplify_viewport(CyclesButtonsPanel, Panel):
+ bl_label = "Viewport"
+ bl_context = "scene"
+ bl_parent_id = "CYCLES_SCENE_PT_simplify"
+ COMPAT_ENGINES = {'CYCLES'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ scene = context.scene
+ rd = scene.render
+ cscene = scene.cycles
+
+ layout.active = rd.use_simplify
+
+ col = layout.column()
+ col.prop(rd, "simplify_subdivision", text="Max Subdivision")
+ col.prop(rd, "simplify_child_particles", text="Child Particles")
+ col.prop(cscene, "texture_limit", text="Texture Limit")
+ col.prop(cscene, "ao_bounces", text="AO Bounces")
+
+
+class CYCLES_SCENE_PT_simplify_render(CyclesButtonsPanel, Panel):
+ bl_label = "Render"
+ bl_context = "scene"
+ bl_parent_id = "CYCLES_SCENE_PT_simplify"
+ COMPAT_ENGINES = {'CYCLES'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ scene = context.scene
+ rd = scene.render
+ cscene = scene.cycles
+
+ layout.active = rd.use_simplify
+
+ col = layout.column()
+
+ col.prop(rd, "simplify_subdivision_render", text="Max Subdivision")
+ col.prop(rd, "simplify_child_particles_render", text="Child Particles")
+ col.prop(cscene, "texture_limit_render", text="Texture Limit")
+ col.prop(cscene, "ao_bounces_render", text="AO Bounces")
+
+
def draw_device(self, context):
scene = context.scene
layout = self.layout
@@ -1733,14 +1839,21 @@ classes = (
CYCLES_WORLD_PT_mist,
CYCLES_WORLD_PT_ray_visibility,
CYCLES_WORLD_PT_settings,
+ CYCLES_WORLD_PT_settings_surface,
+ CYCLES_WORLD_PT_settings_volume,
CYCLES_MATERIAL_PT_preview,
CYCLES_MATERIAL_PT_surface,
CYCLES_MATERIAL_PT_volume,
CYCLES_MATERIAL_PT_displacement,
CYCLES_MATERIAL_PT_settings,
+ CYCLES_MATERIAL_PT_settings_surface,
+ CYCLES_MATERIAL_PT_settings_geometry,
+ CYCLES_MATERIAL_PT_settings_volume,
CYCLES_RENDER_PT_bake,
CYCLES_RENDER_PT_debug,
CYCLES_SCENE_PT_simplify,
+ CYCLES_SCENE_PT_simplify_viewport,
+ CYCLES_SCENE_PT_simplify_render,
)
diff --git a/release/scripts/startup/bl_ui/properties_data_lamp.py b/release/scripts/startup/bl_ui/properties_data_lamp.py
index d47160de8a0..e5dd1bbd771 100644
--- a/release/scripts/startup/bl_ui/properties_data_lamp.py
+++ b/release/scripts/startup/bl_ui/properties_data_lamp.py
@@ -181,23 +181,60 @@ class DATA_PT_EEVEE_shadow(DataButtonsPanel, Panel):
col.prop(lamp, "shadow_buffer_exp", text="Exponent")
col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias")
- col.separator()
- if lamp.type == 'SUN':
- col.label("Cascaded Shadow Map")
- col.prop(lamp, "shadow_cascade_count", text="Count")
- col.prop(lamp, "shadow_cascade_fade", text="Fade")
+class DATA_PT_EEVEE_shadow_cascaded_shadow_map(DataButtonsPanel, Panel):
+ bl_label = "Cascaded Shadow Map"
+ bl_parent_id = "DATA_PT_EEVEE_shadow"
+ bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_EEVEE'}
+
+ @classmethod
+ def poll(cls, context):
+ lamp = context.lamp
+ engine = context.engine
+
+ return (lamp and lamp.type == 'SUN') and (engine in cls.COMPAT_ENGINES)
+
+ def draw(self, context):
+ layout = self.layout
+ lamp = context.lamp
+ layout.use_property_split = True
- col.prop(lamp, "shadow_cascade_max_distance", text="Max Distance")
- col.prop(lamp, "shadow_cascade_exponent", text="Distribution")
+ col = layout.column()
+
+ col.prop(lamp, "shadow_cascade_count", text="Count")
+ col.prop(lamp, "shadow_cascade_fade", text="Fade")
- layout.separator()
+ col.prop(lamp, "shadow_cascade_max_distance", text="Max Distance")
+ col.prop(lamp, "shadow_cascade_exponent", text="Distribution")
- layout.prop(lamp, "use_contact_shadow")
+
+class DATA_PT_EEVEE_shadow_contact(DataButtonsPanel, Panel):
+ bl_label = "Contact Shadows"
+ bl_parent_id = "DATA_PT_EEVEE_shadow"
+ COMPAT_ENGINES = {'BLENDER_EEVEE'}
+
+ @classmethod
+ def poll(cls, context):
+ lamp = context.lamp
+ engine = context.engine
+ return (lamp and lamp.type in {'POINT', 'SUN', 'SPOT', 'AREA'}) and (engine in cls.COMPAT_ENGINES)
+
+ def draw_header(self, context):
+ lamp = context.lamp
+
+ layout = self.layout
+ layout.active = lamp.use_shadow
+ layout.prop(lamp, "use_contact_shadow", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ lamp = context.lamp
+ layout.use_property_split = True
col = layout.column()
- col.active = lamp.use_contact_shadow
+ col.active = lamp.use_shadow and lamp.use_contact_shadow
col.prop(lamp, "contact_shadow_distance", text="Distance")
col.prop(lamp, "contact_shadow_soft_size", text="Softness")
@@ -268,6 +305,7 @@ class DATA_PT_spot(DataButtonsPanel, Panel):
class DATA_PT_spot(DataButtonsPanel, Panel):
bl_label = "Spot Shape"
+ bl_parent_id = "DATA_PT_EEVEE_lamp"
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@@ -321,6 +359,8 @@ classes = (
DATA_PT_lamp,
DATA_PT_EEVEE_lamp,
DATA_PT_EEVEE_shadow,
+ DATA_PT_EEVEE_shadow_contact,
+ DATA_PT_EEVEE_shadow_cascaded_shadow_map,
DATA_PT_area,
DATA_PT_spot,
DATA_PT_falloff_curve,