[Bf-blender-cvs] [c549d736cff] master: Icons: Update script to generate icons from SVGs for Inkscape 1.0

Julian Eisel noreply at git.blender.org
Fri Jan 8 15:09:28 CET 2021


Commit: c549d736cff0d5013f05fb5240ef07671c5aa5ce
Author: Julian Eisel
Date:   Fri Jan 8 14:58:29 2021 +0100
Branches: master
https://developer.blender.org/rBc549d736cff0d5013f05fb5240ef07671c5aa5ce

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.

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

M	release/datafiles/blender_icons_update.py
M	release/datafiles/prvicons_update.py

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

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)



More information about the Bf-blender-cvs mailing list