Asset Browser: Use single column for asset library menu
Feedback was that the two column menu felt odd, and that the "Custom" and "Built-in" headings for each column were more confusing than helpful. So changing this to a single column menu with separator lines instead of headings.
This commit is contained in:
parent
73753e1a67
commit
b3c469153e
|
@ -116,10 +116,12 @@ const EnumPropertyItem *ED_asset_library_reference_to_rna_enum_itemf()
|
|||
EnumPropertyItem *item = nullptr;
|
||||
int totitem = 0;
|
||||
|
||||
/* Add predefined items. */
|
||||
RNA_enum_items_add(&item, &totitem, predefined_items);
|
||||
|
||||
/* Add separator if needed. */
|
||||
if (!BLI_listbase_is_empty(&U.asset_libraries)) {
|
||||
const EnumPropertyItem sepr = {0, "", 0, "Custom", nullptr};
|
||||
RNA_enum_item_add(&item, &totitem, &sepr);
|
||||
RNA_enum_item_add_separator(&item, &totitem);
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
|
@ -144,14 +146,6 @@ const EnumPropertyItem *ED_asset_library_reference_to_rna_enum_itemf()
|
|||
RNA_enum_item_add(&item, &totitem, &tmp);
|
||||
}
|
||||
|
||||
if (totitem) {
|
||||
const EnumPropertyItem sepr = {0, "", 0, "Built-in", nullptr};
|
||||
RNA_enum_item_add(&item, &totitem, &sepr);
|
||||
}
|
||||
|
||||
/* Add predefined items. */
|
||||
RNA_enum_items_add(&item, &totitem, predefined_items);
|
||||
|
||||
RNA_enum_item_end(&item, &totitem);
|
||||
return item;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue