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:
parent
c392f2448c
commit
cdfc4c0d1d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue