diff options
author | Julian Eisel <julian@blender.org> | 2021-01-08 16:58:29 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-01-08 17:07:54 +0300 |
commit | c549d736cff0d5013f05fb5240ef07671c5aa5ce (patch) | |
tree | 5c7745af33ebaf4fc5f370ddfe82d459d3f86500 /release/datafiles | |
parent | c66f00dc26b08d5f7be6aef080c1a0ec2de19cd7 (diff) |
Icons: Update script to generate icons from SVGs for Inkscape 1.0
The command line syntax for Inkscape changed quite a bit for the 1.0 release,
see https://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Command_Line.
Think it's reasonable to expect Inkscape 1.0 or later be installed if you want
to generate the icons with the script. It's easy to get via the website, if the
distribution doesn't provide new enough packages. Only few people would use the
script anyway.
I also had to change the path for command line access on macOS which apparently
changed (https://stackoverflow.com/a/60068607). Although I didn't find a
mention of this change in the Inkscape release notes.
Diffstat (limited to 'release/datafiles')
-rwxr-xr-x | release/datafiles/blender_icons_update.py | 10 | ||||
-rwxr-xr-x | release/datafiles/prvicons_update.py | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/release/datafiles/blender_icons_update.py b/release/datafiles/blender_icons_update.py index ed96afd7ea6..8167b8b25e6 100755 --- a/release/datafiles/blender_icons_update.py +++ b/release/datafiles/blender_icons_update.py @@ -17,7 +17,7 @@ inkscape_bin = os.environ.get("INKSCAPE_BIN", "inkscape") blender_bin = os.environ.get("BLENDER_BIN", "blender") if sys.platform == 'darwin': - inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script' + inkscape_app_path = '/Applications/Inkscape.app/Contents/MacOS/inkscape' if os.path.exists(inkscape_app_path): inkscape_bin = inkscape_app_path blender_app_path = '/Applications/Blender.app/Contents/MacOS/Blender' @@ -29,8 +29,8 @@ cmd = ( os.path.join(BASEDIR, "blender_icons.svg"), "--export-width=602", "--export-height=640", - "--without-gui", - "--export-png=" + os.path.join(BASEDIR, "blender_icons16.png"), + "--export-type=png", + "--export-filename=" + os.path.join(BASEDIR, "blender_icons16.png"), ) run(cmd) @@ -39,8 +39,8 @@ cmd = ( os.path.join(BASEDIR, "blender_icons.svg"), "--export-width=1204", "--export-height=1280", - "--without-gui", - "--export-png=" + os.path.join(BASEDIR, "blender_icons32.png"), + "--export-type=png", + "--export-filename=" + os.path.join(BASEDIR, "blender_icons32.png"), ) run(cmd) diff --git a/release/datafiles/prvicons_update.py b/release/datafiles/prvicons_update.py index 85e92e9e564..fa526f88e96 100755 --- a/release/datafiles/prvicons_update.py +++ b/release/datafiles/prvicons_update.py @@ -10,7 +10,7 @@ BASEDIR = os.path.abspath(os.path.dirname(__file__)) inkscape_path = 'inkscape' if sys.platform == 'darwin': - inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script' + inkscape_app_path = '/Applications/Inkscape.app/Contents/MacOS/inkscape' if os.path.exists(inkscape_app_path): inkscape_path = inkscape_app_path @@ -19,7 +19,7 @@ cmd = ( os.path.join(BASEDIR, "prvicons.svg"), "--export-width=1792", "--export-height=256", - "--without-gui", - "--export-png=" + os.path.join(BASEDIR, "prvicons.png"), + "--export-type=png", + "--export-filename=" + os.path.join(BASEDIR, "prvicons.png"), ) subprocess.check_call(cmd) |