UI: Draw Collection icon with color tag in object properties panel

Show collection icon inside collection panel of object properties tab.
Plus draw them colored when color tag is set.

See PR description for images.

Pull Request: https://projects.blender.org/blender/blender/pulls/157035
This commit is contained in:
Pratik Borhade 2026-04-13 10:31:17 +02:00 • committed by Pratik Borhade
parent d3fce77461
commit f1a7e10b2b

View file

@ -203,7 +203,10 @@ class OBJECT_PT_collections(ObjectButtonsPanel, Panel):
col.context_pointer_set("collection", collection)
row = col.box().row()
row.prop(collection, "name", text="")
icon = 'OUTLINER_COLLECTION'
if collection.color_tag != 'NONE':
icon = 'COLLECTION_' + collection.color_tag
row.prop(collection, "name", text="", icon=icon)
row.operator("object.collection_remove", text="", icon='X', emboss=False)
row.menu("COLLECTION_MT_context_menu", icon='DOWNARROW_HLT', text="")