forked from bartvdbraak/blender
3ca76ae0e8
It can be assumed that all scripts comply with basic pep8 formatting regarding white-space, indentation etc. Also remove note in best practices page & update `tests/python/pep8.py`. If we want to exclude some scripts from make format, this can be done by adding them to `ignore_files` in: source/tools/utils_maintenance/autopep8_format_paths.py Or using `# nopep8` for to ignore for individual lines. Ref T98554
27 lines
706 B
Python
Executable File
27 lines
706 B
Python
Executable File
#!/usr/bin/env python3
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# This script updates icons from the SVG file
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
BASEDIR = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
inkscape_bin = os.environ.get("INKSCAPE_BIN", "inkscape")
|
|
|
|
if sys.platform == 'darwin':
|
|
inkscape_app_path = '/Applications/Inkscape.app/Contents/MacOS/inkscape'
|
|
if os.path.exists(inkscape_app_path):
|
|
inkscape_bin = inkscape_app_path
|
|
|
|
cmd = (
|
|
inkscape_bin,
|
|
os.path.join(BASEDIR, "alert_icons.svg"),
|
|
"--export-width=1280",
|
|
"--export-height=256",
|
|
"--export-type=png",
|
|
"--export-filename=" + os.path.join(BASEDIR, "alert_icons.png"),
|
|
)
|
|
subprocess.check_call(cmd)
|