32AssetShelfSettings::AssetShelfSettings()
34 memset(
this, 0,
sizeof(*
this));
57AssetShelfSettings::~AssetShelfSettings()
82 MEM_delete(settings.active_catalog_path);
88 MEM_delete(settings.active_catalog_path);
89 settings.active_catalog_path =
nullptr;
95 return settings.active_catalog_path && settings.active_catalog_path == path.
str();
100 return !settings.active_catalog_path || !settings.active_catalog_path[0];
127 if (enabled_catalog_paths) {
137 if (!enabled_catalog_paths) {
151 U.runtime.is_dirty =
true;
167 if (!enabled_catalog_paths) {
void BKE_asset_catalog_path_list_free(ListBase &catalog_path_list)
ListBase BKE_asset_catalog_path_list_duplicate(const ListBase &catalog_path_list)
void BKE_asset_catalog_path_list_blend_write(BlendWriter *writer, const ListBase &catalog_path_list)
bool BKE_asset_catalog_path_list_has_path(const ListBase &catalog_path_list, const char *catalog_path)
void BKE_asset_catalog_path_list_blend_read_data(BlendDataReader *reader, ListBase &catalog_path_list)
void BKE_asset_catalog_path_list_add_path(ListBase &catalog_path_list, const char *catalog_path)
bUserAssetShelfSettings * BKE_preferences_asset_shelf_settings_get(const UserDef *userdef, const char *shelf_idname)
bool BKE_preferences_asset_shelf_settings_ensure_catalog_path_enabled(UserDef *userdef, const char *shelf_idname, const char *catalog_path)
@ ASSET_SHELF_TYPE_FLAG_STORE_CATALOGS_IN_PREFS
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define BLO_write_struct(writer, struct_name, data_ptr)
void BLO_read_string(BlendDataReader *reader, char **ptr_p)
void BLO_write_string(BlendWriter *writer, const char *data_ptr)
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
const std::string & str() const
const char * c_str() const
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)
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)
static const ListBase * get_enabled_catalog_path_list(const AssetShelf &shelf)
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)
void settings_blend_write(BlendWriter *writer, const AssetShelfSettings &settings)
void settings_set_active_catalog(AssetShelfSettings &settings, const asset_system::AssetCatalogPath &path)
struct AssetShelfSettings * prev
struct AssetShelfSettings * next
const char * active_catalog_path
ListBase enabled_catalog_paths
struct AssetShelfType * type
AssetShelfSettings settings
ListBase enabled_catalog_paths