diff options
author | Sam Kottler <dev@samkottler.net> | 2020-06-04 19:01:06 +0300 |
---|---|---|
committer | Sam Kottler <dev@samkottler.net> | 2020-06-04 19:01:06 +0300 |
commit | 2305fdfaa196fb5b46f972e7684917e3e8dad5b7 (patch) | |
tree | ddac605e0cd1a2b5d9d09f8077205ae81ad86845 | |
parent | cf92470adf8c155bfe79d4b4761295e9a8695350 (diff) |
Made Light Tree an experimental feature
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 28975ccfe15..81fe3c4de19 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -297,14 +297,34 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel): layout.row().prop(cscene, "use_layer_samples") break - row = layout.row(align=True) - row.label(text="Experimental:") - row.prop(cscene, "use_light_tree", text="Light Tree") - if cscene.use_light_tree and use_branched_path(context): - row = layout.row(align=True) - row.label(text="") # create empty column - row.prop(cscene, "splitting_threshold", text="Splitting") +class CYCLES_RENDER_PT_sampling_light_tree(CyclesButtonsPanel, Panel): + bl_label = "Light Tree" + bl_parent_id = "CYCLES_RENDER_PT_sampling" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + return (context.scene.cycles.feature_set == 'EXPERIMENTAL') + + def draw_header(self, context): + layout = self.layout + scene = context.scene + cscene = scene.cycles + layout.prop(cscene, "use_light_tree", text="") + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + scene = context.scene + cscene = scene.cycles + + layout.active = cscene.use_light_tree + row = layout.row(align=True) + row.label(text="") # create empty column + row.prop(cscene, "splitting_threshold", text="Splitting") class CYCLES_RENDER_PT_sampling_total(CyclesButtonsPanel, Panel): bl_label = "Total Samples" @@ -2257,6 +2277,7 @@ classes = ( CYCLES_RENDER_PT_sampling_sub_samples, CYCLES_RENDER_PT_sampling_adaptive, CYCLES_RENDER_PT_sampling_advanced, + CYCLES_RENDER_PT_sampling_light_tree, CYCLES_RENDER_PT_light_paths, CYCLES_RENDER_PT_light_paths_max_bounces, CYCLES_RENDER_PT_light_paths_clamping, |