diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-02-12 13:55:42 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-02-12 13:55:42 +0300 |
commit | ed667e344d7e9f72f2b1a0302e241606276a06ae (patch) | |
tree | cc2e575443861d285b99c58434ddd7282b237cad /intern/cycles/blender/addon/ui.py | |
parent | 9a7dc41dd9b9803c30eb24bc74927a312b40ba4d (diff) | |
parent | 26481eabe1e66da2a322190f15ad600d9d69bbee (diff) |
Merge branch 'blender-v2.92-release'
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 8067dd9793c..4576cf4e413 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, |