diff options
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/modules/bpy/utils/__init__.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_common.py | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py index e6424de0742..b39099158c6 100644 --- a/release/scripts/modules/bpy/utils/__init__.py +++ b/release/scripts/modules/bpy/utils/__init__.py @@ -65,6 +65,7 @@ from _bpy import ( script_paths as _bpy_script_paths, unregister_class, user_resource as _user_resource, + system_resource, ) import bpy as _bpy diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index e7e95c26b55..222185e18d5 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -195,11 +195,8 @@ 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('LOCAL') - if not os.path.exists(dirname): - # TODO(campbell): use a better way of finding datafiles. - dirname = bpy.utils.resource_path('SYSTEM') - filename = os.path.join(dirname, "datafiles", "icons", icon_name + ".dat") + dirname = bpy.utils.system_resource('DATAFILES', "icons") + filename = os.path.join(dirname, icon_name + ".dat") try: icon_value = bpy.app.icons.new_triangles_from_file(filename) except Exception as ex: |