diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2022-09-12 00:32:21 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2022-09-12 10:31:53 +0300 |
commit | 33abb68cf20c91e6013f009e6e3f06bcd5bec410 (patch) | |
tree | 935ddcc012871caab6807cf838743291def6e9ac /release/scripts/startup | |
parent | 6d0f8d5a19c88c81d4681d765fb05f42b192e373 (diff) |
UI: add a Custom Properties panel to the View Layer tab of properties.
Although view layers aren't ID, they do support custom properties,
so not providing the UI to access them seems to be a simple oversight.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_view_layer.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index 78aec096510..e087b431ad8 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later -from bpy.types import Menu, Panel, UIList +from bpy.types import Menu, Panel, UIList, ViewLayer + +from rna_prop_ui import PropertyPanel class VIEWLAYER_UL_aov(UIList): @@ -249,6 +251,14 @@ class VIEWLAYER_PT_layer_passes_lightgroups(ViewLayerLightgroupsPanel): COMPAT_ENGINES = {'CYCLES'} +class VIEWLAYER_PT_layer_custom_props(PropertyPanel, Panel): + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_context = "view_layer" + _context_path = "view_layer" + _property_type = ViewLayer + + classes = ( VIEWLAYER_MT_lightgroup_sync, VIEWLAYER_PT_layer, @@ -260,6 +270,7 @@ classes = ( VIEWLAYER_PT_layer_passes_cryptomatte, VIEWLAYER_PT_layer_passes_aov, VIEWLAYER_PT_layer_passes_lightgroups, + VIEWLAYER_PT_layer_custom_props, VIEWLAYER_UL_aov, ) |