Commit: 68e4a902409881ee1f29969c3135700cacfe1a66
Author: Julian Eisel
Date:   Mon Dec 14 19:08:13 2020 +0100
Branches: master
https://developer.blender.org/rB68e4a902409881ee1f29969c3135700cacfe1a66

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.)

===================================================================

M       source/blender/blenkernel/intern/preferences.c

===================================================================

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);
 }
 
 /** \} */

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to