[Bf-blender-cvs] [280404f0a18] soc-2020-outliner: Collections: Fix collection colors in move/link menu
Nathan Craddock
noreply at git.blender.org
Thu Aug 13 01:01:02 CEST 2020
Commit: 280404f0a18d00e586f270696725bba12e595a03
Author: Nathan Craddock
Date: Wed Aug 12 16:01:38 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rB280404f0a18d00e586f270696725bba12e595a03
Collections: Fix collection colors in move/link menu
The colors would not draw for items at a root in the collection tree
===================================================================
M source/blender/editors/object/object_edit.c
===================================================================
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 10b5afca3df..3612f546dd8 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1798,17 +1798,18 @@ static int collection_color_to_icon(Collection *collection)
static void move_to_collection_menus_items(uiLayout *layout, MoveToCollectionData *menu)
{
+ const int icon = collection_color_to_icon(menu->collection);
+
if (BLI_listbase_is_empty(&menu->submenus)) {
uiItemIntO(layout,
menu->collection->id.name + 2,
- collection_color_to_icon(menu->collection),
+ icon,
menu->ot->idname,
"collection_index",
menu->index);
}
else {
- uiItemMenuF(
- layout, menu->collection->id.name + 2, ICON_NONE, move_to_collection_menu_create, menu);
+ uiItemMenuF(layout, menu->collection->id.name + 2, icon, move_to_collection_menu_create, menu);
}
}
More information about the Bf-blender-cvs
mailing list