WIP: Brush assets project #106303
|
@ -982,16 +982,16 @@ Main *BKE_main_from_id(Main *global_main, const ID *id, const bool verify)
|
|||
}
|
||||
}
|
||||
else {
|
||||
/* Debug assert, especially for places that pass in G_MAIN. */
|
||||
#ifndef NDEBUG
|
||||
/* Debug assert, especially for places that pass in G_MAIN. */
|
||||
#ifndef NDEBUG
|
||||
if (id->flag & LIB_EMBEDDED_DATA) {
|
||||
const ID *id_owner = BKE_id_owner_get(const_cast<ID*>(id));
|
||||
const ID *id_owner = BKE_id_owner_get(const_cast<ID *>(id));
|
||||
BLI_assert(BLI_findindex(which_libbase(global_main, GS(id_owner->name)), id_owner) != -1);
|
||||
}
|
||||
else {
|
||||
BLI_assert(BLI_findindex(which_libbase(global_main, GS(id->name)), id) != -1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
return global_main;
|
||||
|
|
|
@ -713,18 +713,17 @@ static void add_catalog_tabs(AssetShelf &shelf, uiLayout &layout)
|
|||
uiItemS(&layout);
|
||||
|
||||
/* Regular catalog tabs. */
|
||||
settings_foreach_enabled_catalog_path(
|
||||
shelf, [&](const asset_system::AssetCatalogPath &path) {
|
||||
uiBut *but = add_tab_button(*block, path.name());
|
||||
settings_foreach_enabled_catalog_path(shelf, [&](const asset_system::AssetCatalogPath &path) {
|
||||
uiBut *but = add_tab_button(*block, path.name());
|
||||
|
||||
UI_but_func_set(but, [&shelf_settings, path](bContext &C) {
|
||||
settings_set_active_catalog(shelf_settings, path);
|
||||
send_redraw_notifier(C);
|
||||
});
|
||||
UI_but_func_pushed_state_set(but, [&shelf_settings, path](const uiBut &) -> bool {
|
||||
return settings_is_active_catalog(shelf_settings, path);
|
||||
});
|
||||
});
|
||||
UI_but_func_set(but, [&shelf_settings, path](bContext &C) {
|
||||
settings_set_active_catalog(shelf_settings, path);
|
||||
send_redraw_notifier(C);
|
||||
});
|
||||
UI_but_func_pushed_state_set(but, [&shelf_settings, path](const uiBut &) -> bool {
|
||||
return settings_is_active_catalog(shelf_settings, path);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Reference in New Issue