[Bf-blender-cvs] [adcef2b] master: Cycles: Improve UI feedback for light samples.
Thomas Dinges
noreply at git.blender.org
Thu Jan 21 09:02:57 CET 2016
Commit: adcef2bd3686a887fba8f08192751ab6736b9782
Author: Thomas Dinges
Date: Thu Jan 21 09:00:10 2016 +0100
Branches: master
https://developer.blender.org/rBadcef2bd3686a887fba8f08192751ab6736b9782
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).
===================================================================
M intern/cycles/blender/addon/ui.py
===================================================================
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 522956d..afdca7b 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()
More information about the Bf-blender-cvs
mailing list