[Bf-blender-cvs] [1da12885444] blender2.8: Check LOCAL datafiles if SYSTEM not found

Campbell Barton noreply at git.blender.org
Tue Apr 24 10:46:13 CEST 2018


Commit: 1da12885444c9743e474461f3d7364588d54344e
Author: Campbell Barton
Date:   Tue Apr 24 10:45:57 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB1da12885444c9743e474461f3d7364588d54344e

Check LOCAL datafiles if SYSTEM not found

===================================================================

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 db35ab27506..2e4bbc8674b 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -62,6 +62,9 @@ class ToolSelectPanelHelper:
             icon_value = _icon_cache.get(icon_name)
             if icon_value is None:
                 dirname = bpy.utils.resource_path('SYSTEM')
+                if not dirname:
+                    # TODO(campbell): use a better way of finding datafiles.
+                    dirname = bpy.utils.resource_path('LOCAL')
                 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