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
This commit is contained in:
Keith Boshoff 2022-06-28 10:49:51 +10:00 committed by Campbell Barton
parent 381fe684e2
commit b910114384
1 changed files with 14 additions and 1 deletions

View File

@ -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.