WIP: Brush assets project #106303

Draft
Julian Eisel wants to merge 370 commits from brush-assets-project into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 7 additions and 8 deletions
Showing only changes of commit 6d9f313ba1 - Show all commits

View File

@ -275,7 +275,8 @@ int BKE_preferences_extension_repo_get_index(const UserDef *userdef,
/** \name #bUserAssetShelfSettings
* \{ */
bUserAssetShelfSettings *asset_shelf_settings_new(UserDef *userdef, const char *shelf_idname)
static bUserAssetShelfSettings *asset_shelf_settings_new(UserDef *userdef,
const char *shelf_idname)
{
bUserAssetShelfSettings *settings = DNA_struct_default_alloc(bUserAssetShelfSettings);
BLI_addtail(&userdef->asset_shelves_settings, settings);
@ -284,7 +285,7 @@ bUserAssetShelfSettings *asset_shelf_settings_new(UserDef *userdef, const char *
return settings;
}
bUserAssetShelfSettings *BKE_preferences_asset_shelf_settings_ensure(UserDef *userdef,
static bUserAssetShelfSettings *asset_shelf_settings_ensure(UserDef *userdef,
const char *shelf_idname)
{
if (bUserAssetShelfSettings *settings = BKE_preferences_asset_shelf_settings_get(userdef,
@ -292,7 +293,6 @@ bUserAssetShelfSettings *BKE_preferences_asset_shelf_settings_ensure(UserDef *us
{
return settings;
}
return asset_shelf_settings_new(userdef, shelf_idname);
}
@ -305,7 +305,7 @@ bUserAssetShelfSettings *BKE_preferences_asset_shelf_settings_get(const UserDef
offsetof(bUserAssetShelfSettings, shelf_idname)));
}
bool asset_shelf_settings_is_catalog_path_enabled(const bUserAssetShelfSettings *settings,
static bool asset_shelf_settings_is_catalog_path_enabled(const bUserAssetShelfSettings *settings,
const char *catalog_path)
{
return BLI_findstring_ptr(
@ -334,8 +334,7 @@ bool BKE_preferences_asset_shelf_settings_ensure_catalog_path_enabled(UserDef *u
return false;
}
bUserAssetShelfSettings *settings = BKE_preferences_asset_shelf_settings_ensure(userdef,
shelf_idname);
bUserAssetShelfSettings *settings = asset_shelf_settings_ensure(userdef, shelf_idname);
char *path_copy = BLI_strdup(catalog_path);
BLI_addtail(&settings->enabled_catalog_paths, BLI_genericNodeN(path_copy));