blender/release/datafiles/alert_icons_update.py
Sean Kim d763e276ee Fix: Adjust alert_icons export-width
Adjust the `export-width` size of alert_icons_update.py since the
Blender has now been removed #117676.

Pull Request: https://projects.blender.org/blender/blender/pulls/117682
2024-01-31 01:33:30 +01:00

28 lines
722 B
Python
Executable File

#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2014-2022 Blender Authors
#
# 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__))
if not (inkscape_bin := os.environ.get("INKSCAPE_BIN")):
if sys.platform == 'darwin':
inkscape_bin = '/Applications/Inkscape.app/Contents/MacOS/inkscape'
else:
inkscape_bin = "inkscape"
cmd = (
inkscape_bin,
os.path.join(BASEDIR, "alert_icons.svg"),
"--export-width=1024",
"--export-height=256",
"--export-type=png",
"--export-filename=" + os.path.join(BASEDIR, "alert_icons.png"),
)
subprocess.check_call(cmd)