Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Boshoff <wahooney>2022-06-28 03:49:51 +0300
committerCampbell Barton <campbell@blender.org>2022-06-28 03:52:31 +0300
commitb9101143847f35acf18e43790e38bae22a15f8eb (patch)
treec343c3304fb1d32331477f3111f5a94030f7280d /release/scripts/startup/bl_ui/properties_collection.py
parent381fe684e207d1f8b1bb163bbaaf1f14aae2e7f6 (diff)
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
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_collection.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_collection.py15
1 files changed, 14 insertions, 1 deletions
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.