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:
authorPhilipp Oeser <info@graphics-engineer.com>2019-03-20 07:17:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-20 07:38:23 +0300
commitfe7c7d2820f84b815eec5d9c322c7192f33b04b8 (patch)
tree179ae1fde3e2fe1802e35576c2261723d914089a /source/blender/python
parent4e2aea5efea31262ce46240baa0511e85a021332 (diff)
Fix T62736: Inconsistent behavior bpy.utils.user_resource()
If a subfolder was specified which didn't exist, logic would fallback to get_path_user (instead of get_path_environment). Now always use the from the environment variable if it's set and exists.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index 05b471c4db7..55d226e1461 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -167,10 +167,7 @@ static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObj
}
/* same logic as BKE_appdir_folder_id_create(), but best leave it up to the script author to create */
- path = BKE_appdir_folder_id(folder_id, subdir);
-
- if (!path)
- path = BKE_appdir_folder_id_user_notest(folder_id, subdir);
+ path = BKE_appdir_folder_id_user_notest(folder_id, subdir);
return PyC_UnicodeFromByte(path ? path : "");
}