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:
authorThomas Dinges <blender@dingto.org>2016-01-21 11:00:10 +0300
committerThomas Dinges <blender@dingto.org>2016-01-21 11:02:49 +0300
commitadcef2bd3686a887fba8f08192751ab6736b9782 (patch)
treea03104a7d63209de8a9149e817223bfd1e40654d /intern/cycles
parent301383c6881deb05382da6910e8be632408828c8 (diff)
Cycles: Improve UI feedback for light samples.
Fix T47213. There was actually no real bug here, just clarify now in the UI that Mesh, World and Lamp samples only have an effect if we sample all lights (direct or indirect).
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/blender/addon/ui.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 522956d1590..afdca7ba8f1 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -81,6 +81,12 @@ def use_branched_path(context):
return (cscene.progressive == 'BRANCHED_PATH' and device_type != 'OPENCL')
+def use_sample_all_lights(context):
+ cscene = context.scene.cycles
+
+ return cscene.sample_all_lights_direct or cscene.sample_all_lights_indirect
+
+
def draw_samples_info(layout, context):
cscene = context.scene.cycles
integrator = cscene.progressive
@@ -183,7 +189,11 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
sub.prop(cscene, "glossy_samples", text="Glossy")
sub.prop(cscene, "transmission_samples", text="Transmission")
sub.prop(cscene, "ao_samples", text="AO")
- sub.prop(cscene, "mesh_light_samples", text="Mesh Light")
+
+ subsub = sub.row(align=True)
+ subsub.active = use_sample_all_lights(context)
+ subsub.prop(cscene, "mesh_light_samples", text="Mesh Light")
+
sub.prop(cscene, "subsurface_samples", text="Subsurface")
sub.prop(cscene, "volume_samples", text="Volume")
@@ -877,7 +887,9 @@ class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
if not (lamp.type == 'AREA' and clamp.is_portal):
sub = col.column(align=True)
if use_branched_path(context):
- sub.prop(clamp, "samples")
+ subsub = sub.row(align=True)
+ subsub.active = use_sample_all_lights(context)
+ subsub.prop(clamp, "samples")
sub.prop(clamp, "max_bounces")
col = split.column()
@@ -1086,7 +1098,9 @@ class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
sub.active = cworld.sample_as_light
sub.prop(cworld, "sample_map_resolution")
if use_branched_path(context):
- sub.prop(cworld, "samples")
+ subsub = sub.row(align=True)
+ subsub.active = use_sample_all_lights(context)
+ subsub.prop(cworld, "samples")
sub.prop(cworld, "max_bounces")
col = split.column()