[Bf-blender-cvs] [b65499fa5a6] cycles_oneapi: UI: add Custom properties panel to collections

Keith Boshoff noreply at git.blender.org
Wed Jun 29 10:38:38 CEST 2022


Commit: b65499fa5a6715c4cbc7e2d47cbd0fb5f80b8920
Author: Keith Boshoff
Date:   Tue Jun 28 10:49:51 2022 +1000
Branches: cycles_oneapi
https://developer.blender.org/rBb65499fa5a6715c4cbc7e2d47cbd0fb5f80b8920

UI: add Custom properties panel to collections

Show a custom properties panel in the collections tab,
matching other data-blocks which already support this.

Reviewed by: HooglyBoogly, campbellbarton

Ref D12598

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_collection.py b/release/scripts/startup/bl_ui/properties_collection.py
index bd43ab32f37..220e35041c1 100644
--- a/release/scripts/startup/bl_ui/properties_collection.py
+++ b/release/scripts/startup/bl_ui/properties_collection.py
@@ -1,5 +1,12 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
-from bpy.types import Panel, Menu
+
+from bpy.types import (
+    Collection,
+    Menu,
+    Panel,
+)
+
+from rna_prop_ui import PropertyPanel
 
 
 class CollectionButtonsPanel:
@@ -90,11 +97,17 @@ class COLLECTION_PT_lineart_collection(CollectionButtonsPanel, Panel):
                 row = col.row(align=True)
 
 
+class COLLECTION_PT_collection_custom_props(CollectionButtonsPanel, PropertyPanel, Panel):
+    _context_path = "collection"
+    _property_type = Collection
+
+
 classes = (
     COLLECTION_MT_context_menu_instance_offset,
     COLLECTION_PT_collection_flags,
     COLLECTION_PT_instancing,
     COLLECTION_PT_lineart_collection,
+    COLLECTION_PT_collection_custom_props,
 )
 
 if __name__ == "__main__":  # only for live edit.



More information about the Bf-blender-cvs mailing list