mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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:
parent
d3fce77461
commit
f1a7e10b2b
1 changed files with 4 additions and 1 deletions
|
|
@ -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="")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue