Search local before system path

This works in both cases,
where system path would return a path even when it's missing.
This commit is contained in:
Campbell Barton 2018-04-25 14:05:48 +02:00
parent c392f2448c
commit cdfc4c0d1d
1 changed files with 2 additions and 2 deletions

View File

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