Commit: 33abb68cf20c91e6013f009e6e3f06bcd5bec410
Author: Alexander Gavrilov
Date:   Mon Sep 12 00:32:21 2022 +0300
Branches: master
https://developer.blender.org/rB33abb68cf20c91e6013f009e6e3f06bcd5bec410

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.

===================================================================

M       release/scripts/startup/bl_ui/properties_view_layer.py

===================================================================

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,
 )

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to