Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-12-14 21:08:13 +0300
committerJulian Eisel <julian@blender.org>2020-12-15 19:03:48 +0300
commit68e4a902409881ee1f29969c3135700cacfe1a66 (patch)
treea9bfab363890eb118e6e94deed96936489871d4a
parent303aceb917b892e1144b88663225ee3b1e78eabe (diff)
Assets: Better path for the default asset library
In D9722 we agreed on using `[home-directory]/Documents/Blender/Assets` for the default asset library. I just forgot to do the change before committing. (The default repository is just a named path, it's *not* a default library with bundled assets.)
-rw-r--r--source/blender/blenkernel/intern/preferences.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/preferences.c b/source/blender/blenkernel/intern/preferences.c
index c263ff7100f..8dcf6de164a 100644
--- a/source/blender/blenkernel/intern/preferences.c
+++ b/source/blender/blenkernel/intern/preferences.c
@@ -102,18 +102,18 @@ int BKE_preferences_asset_library_get_index(const UserDef *userdef,
void BKE_preferences_asset_library_default_add(UserDef *userdef)
{
- const char *asset_blend_name = "assets.blend";
- const char *doc_path = BKE_appdir_folder_default();
+ char documents_path[FILE_MAXDIR];
/* No home or documents path found, not much we can do. */
- if (!doc_path || !doc_path[0]) {
+ if (!BKE_appdir_folder_documents(documents_path) || !documents_path[0]) {
return;
}
- /* Add new "Default" library under '[doc_path]/assets.blend'. */
-
bUserAssetLibrary *library = BKE_preferences_asset_library_add(userdef, DATA_("Default"), NULL);
- BLI_join_dirfile(library->path, sizeof(library->path), doc_path, asset_blend_name);
+
+ /* Add new "Default" library under '[doc_path]/Blender/Assets'. */
+ BLI_path_join(
+ library->path, sizeof(library->path), documents_path, N_("Blender"), N_("Assets"), NULL);
}
/** \} */