[Bf-blender-cvs] [b9101143847] master: UI: add Custom properties panel to collections
Keith Boshoff
noreply at git.blender.org
Tue Jun 28 02:53:57 CEST 2022
Commit: b9101143847f35acf18e43790e38bae22a15f8eb
Author: Keith Boshoff
Date: Tue Jun 28 10:49:51 2022 +1000
Branches: master
https://developer.blender.org/rBb9101143847f35acf18e43790e38bae22a15f8eb
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