diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-02-12 13:29:50 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-02-12 13:35:05 +0300 |
commit | 26481eabe1e66da2a322190f15ad600d9d69bbee (patch) | |
tree | 15a56363f559558847e2ea7becad623d6d4d550f /intern/cycles/blender/addon/ui.py | |
parent | 837b5743ced83c5dfe724a8285eee504f623dbfb (diff) |
Cycles: Use Blender Settings For AOV
This patch will share the AOV settings between Cycles and Eevee.
It enable using the AOV name conflict detection of Blender. This
means that unlike how Cycles used to work it isn't possible to add an
AOV with a similar name. Conflicts with internal render pass names will
be indicated with an Warning icon.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D9774
Diffstat (limited to 'intern/cycles/blender/addon/ui.py')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index aa009c15b10..53676832243 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -23,7 +23,7 @@ from bl_ui.utils import PresetPanel from bpy.types import Panel from bl_ui.properties_grease_pencil_common import GreasePencilSimplifyPanel -from bl_ui.properties_view_layer import ViewLayerCryptomattePanel +from bl_ui.properties_view_layer import ViewLayerCryptomattePanel, ViewLayerAOVPanel class CYCLES_PT_sampling_presets(PresetPanel, Panel): @@ -915,49 +915,11 @@ class CYCLES_RENDER_PT_passes_debug(CyclesButtonsPanel, Panel): layout.prop(cycles_view_layer, "pass_debug_ray_bounces") -class CYCLES_RENDER_UL_aov(bpy.types.UIList): - def draw_item(self, context, layout, data, item, icon, active_data, active_propname): - row = layout.row() - split = row.split(factor=0.65) - icon = 'ERROR' if item.conflict else 'NONE' - split.row().prop(item, "name", text="", icon=icon, emboss=False) - split.row().prop(item, "type", text="", emboss=False) - - -class CYCLES_RENDER_PT_passes_aov(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_passes_aov(CyclesButtonsPanel, ViewLayerAOVPanel): bl_label = "Shader AOV" bl_context = "view_layer" bl_parent_id = "CYCLES_RENDER_PT_passes" - def draw(self, context): - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False - - cycles_view_layer = context.view_layer.cycles - - row = layout.row() - col = row.column() - col.template_list( - "CYCLES_RENDER_UL_aov", - "aovs", - cycles_view_layer, - "aovs", - cycles_view_layer, - "active_aov", - rows=2, - ) - - col = row.column() - sub = col.column(align=True) - sub.operator("cycles.add_aov", icon='ADD', text="") - sub.operator("cycles.remove_aov", icon='REMOVE', text="") - - if cycles_view_layer.active_aov < len(cycles_view_layer.aovs): - active_aov = cycles_view_layer.aovs[cycles_view_layer.active_aov] - if active_aov.conflict: - layout.label(text=active_aov.conflict, icon='ERROR') - class CYCLES_RENDER_PT_denoising(CyclesButtonsPanel, Panel): bl_label = "Denoising" @@ -2300,7 +2262,6 @@ classes = ( CYCLES_RENDER_PT_passes_light, CYCLES_RENDER_PT_passes_crypto, CYCLES_RENDER_PT_passes_debug, - CYCLES_RENDER_UL_aov, CYCLES_RENDER_PT_passes_aov, CYCLES_RENDER_PT_filter, CYCLES_RENDER_PT_override, |