Fix: Essentials asset library loaded from wrong location if present
Design of the essentials asset library is to treat it as part of
Blender (as if it were compiled into the binary), so the location and
state of these assets is clear and can be assumed in code. User edits
are not expected.
Because of that we should only look for this asset library in the
installation ("system") location, not in the user configuration which
would take priority if present. On some devs machines this location
would actually be present, making the essentials unavailable and causing
confusing/misleading warning prints, see #128420.
This commit is contained in:
@@ -26,8 +26,8 @@ EssentialsAssetLibrary::EssentialsAssetLibrary()
|
||||
StringRefNull essentials_directory_path()
|
||||
{
|
||||
static std::string path = []() {
|
||||
const std::optional<std::string> datafiles_path = BKE_appdir_folder_id(BLENDER_DATAFILES,
|
||||
"assets");
|
||||
const std::optional<std::string> datafiles_path = BKE_appdir_folder_id(
|
||||
BLENDER_SYSTEM_DATAFILES, "assets");
|
||||
return datafiles_path.value_or("");
|
||||
}();
|
||||
return path;
|
||||
|
||||
Reference in New Issue
Block a user