[Bf-blender-cvs] [cdfc4c0d1db] blender2.8: Search local before system path
Campbell Barton
noreply at git.blender.org
Wed Apr 25 14:14:34 CEST 2018
Commit: cdfc4c0d1dbb6ae2dde8dd262cab5b69e9389b7c
Author: Campbell Barton
Date: Wed Apr 25 14:05:48 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBcdfc4c0d1dbb6ae2dde8dd262cab5b69e9389b7c
Search local before system path
This works in both cases,
where system path would return a path even when it's missing.
===================================================================
M release/scripts/startup/bl_ui/space_toolsystem_common.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 3d0a21b26d3..ae00f3675a0 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -61,10 +61,10 @@ class ToolSelectPanelHelper:
assert(type(icon_name) is str)
icon_value = _icon_cache.get(icon_name)
if icon_value is None:
- dirname = bpy.utils.resource_path('SYSTEM')
+ dirname = bpy.utils.resource_path('LOCAL')
if not dirname:
# TODO(campbell): use a better way of finding datafiles.
- dirname = bpy.utils.resource_path('LOCAL')
+ dirname = bpy.utils.resource_path('SYSTEM')
filename = os.path.join(dirname, "datafiles", "icons", icon_name + ".dat")
try:
icon_value = bpy.app.icons.new_triangles_from_file(filename)
More information about the Bf-blender-cvs
mailing list