diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2018-04-27 17:10:28 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2018-04-27 17:10:39 +0300 |
commit | ca66112b2967164a38103fb1a6885f44fe86a45a (patch) | |
tree | 44cb97939239d3c9df553a6561e8ca4c80dd7c46 /release | |
parent | c6d68916ed7e30596a2a2e2cd37938b9bc2afcb0 (diff) |
Fix missing icons in non-portable local builds.
The problem is that some local path is always returned by
bpy_resource_path. The function does not enforce a check for existence
of the path in the low level code.
Since client code may indeed not care about existence of the directory,
I leave bpy_resource_path alone and patch the python code to check for
existence. An extra argument that enforces the check might be a better
solution, but I will be leaving this to the UI team.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index 0a59b163b29..a4b306193c0 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -118,7 +118,7 @@ class ToolSelectPanelHelper: icon_value = _icon_cache.get(icon_name) if icon_value is None: dirname = bpy.utils.resource_path('LOCAL') - if not dirname: + 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") |