32using namespace blender::ed::asset;
34AssetShelfSettings::AssetShelfSettings() =
default;
70AssetShelfSettings::~AssetShelfSettings()
146 return &
shelf.settings.enabled_catalog_paths;
151 return const_cast<ListBaseT<AssetCatalogPathLink> *
>(
158 if (enabled_catalog_paths) {
160 BLI_assert(enabled_catalog_paths->is_empty());
169 if (!enabled_catalog_paths) {
183 U.runtime.is_dirty =
true;
200 if (!enabled_catalog_paths) {
#define STRNCPY_UTF8(dst, src)
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
const std::string & str() const
const char * c_str() const
AssetLibraryReference all_library_reference()
void settings_clear_enabled_catalogs(AssetShelf &shelf)
static bool use_enabled_catalogs_from_prefs(const AssetShelf &shelf)
bool settings_is_all_catalog_active(const AssetShelfSettings &settings)
AssetLibraryReference & settings_ensure_valid_library_ref(AssetShelfSettings &settings)
void settings_blend_read_data(BlendDataReader *reader, AssetShelfSettings &settings)
void settings_foreach_enabled_catalog_path(const AssetShelf &shelf, FunctionRef< void(const asset_system::AssetCatalogPath &catalog_path)> fn)
void settings_set_all_catalog_active(AssetShelfSettings &settings)
bool settings_is_catalog_path_enabled(const AssetShelf &shelf, const asset_system::AssetCatalogPath &path)
bool settings_is_active_catalog(const AssetShelfSettings &settings, const asset_system::AssetCatalogPath &path)
void settings_set_catalog_path_enabled(AssetShelf &shelf, const asset_system::AssetCatalogPath &path)
static const ListBaseT< AssetCatalogPathLink > * get_enabled_catalog_path_list(const AssetShelf &shelf)
void settings_blend_write(BlendWriter *writer, const AssetShelfSettings &settings)
void settings_set_active_catalog(AssetShelfSettings &settings, const asset_system::AssetCatalogPath &path)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void BKE_asset_catalog_path_list_free(ListBaseT< AssetCatalogPathLink > &catalog_path_list)
bool BKE_asset_catalog_path_list_has_path(const ListBaseT< AssetCatalogPathLink > &catalog_path_list, const char *catalog_path)
struct bUserAssetLibrary * BKE_preferences_asset_library_find_index(const struct UserDef *userdef, int index) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool BKE_preferences_asset_shelf_settings_ensure_catalog_path_enabled(UserDef *userdef, const char *shelf_idname, const char *catalog_path)
bUserAssetShelfSettings * BKE_preferences_asset_shelf_settings_get(const UserDef *userdef, const char *shelf_idname)
void BKE_asset_catalog_path_list_blend_read_data(BlendDataReader *reader, ListBaseT< AssetCatalogPathLink > &catalog_path_list)
bool BKE_preferences_asset_library_is_available(const struct UserDef *userdef, const struct bUserAssetLibrary *library) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
@ ASSET_SHELF_TYPE_FLAG_STORE_CATALOGS_IN_PREFS
void BKE_asset_catalog_path_list_blend_write(BlendWriter *writer, const ListBaseT< AssetCatalogPathLink > &catalog_path_list)
void BKE_asset_catalog_path_list_add_path(ListBaseT< AssetCatalogPathLink > &catalog_path_list, const char *catalog_path)
ListBaseT< AssetCatalogPathLink > BKE_asset_catalog_path_list_duplicate(const ListBaseT< AssetCatalogPathLink > &catalog_path_list)
void BLO_read_string(BlendDataReader *reader, char **ptr_p)
AssetLibraryReference asset_library_reference
const char * active_catalog_path
ListBaseT< AssetCatalogPathLink > enabled_catalog_paths
AssetShelfSettings_DisplayFlag display_flag
void write_string(const char *data)
void write_struct(const T *data, BlendStructWriterTypedFn< T > fn=nullptr)
ListBaseT< AssetCatalogPathLink > enabled_catalog_paths