diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-17 19:50:11 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-17 19:50:11 +0400 |
commit | ac74718e6f525429165664bcf30be5ff8db59581 (patch) | |
tree | 4f372dc4e4ad16f90f0f1662bce0b993eee155cf /release/datafiles | |
parent | a33656ed8c0842c409bdb57d70b16106f0e32ae8 (diff) |
Icons: make inkscape svg to png conversion work with Inkscape.app on OS X.
Diffstat (limited to 'release/datafiles')
-rwxr-xr-x | release/datafiles/blender_icons_update.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/release/datafiles/blender_icons_update.py b/release/datafiles/blender_icons_update.py index b4b772b6a85..ec753c567fa 100755 --- a/release/datafiles/blender_icons_update.py +++ b/release/datafiles/blender_icons_update.py @@ -2,6 +2,7 @@ # This script updates icons from the SVG file import os +import sys def run(cmd): print(" ", cmd) @@ -9,9 +10,16 @@ def run(cmd): BASEDIR = os.path.abspath(os.path.dirname(__file__)) + os.sep -cmd = 'inkscape "%sblender_icons.svg" --export-dpi=90 --without-gui --export-png="%sblender_icons16.png"' % (BASEDIR, BASEDIR) +inkscape_path = 'inkscape' + +if sys.platform == 'darwin': + inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script' + if os.path.exists(inkscape_app_path): + inkscape_path = inkscape_app_path + +cmd = inkscape_path + ' "%sblender_icons.svg" --export-dpi=90 --without-gui --export-png="%sblender_icons16.png"' % (BASEDIR, BASEDIR) run(cmd) -cmd = 'inkscape "%sblender_icons.svg" --export-dpi=180 --without-gui --export-png="%sblender_icons32.png"' % (BASEDIR, BASEDIR) +cmd = inkscape_path + ' "%sblender_icons.svg" --export-dpi=180 --without-gui --export-png="%sblender_icons32.png"' % (BASEDIR, BASEDIR) run(cmd) |