-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These Hi-DPI icons follow the naming convention defined by Maya; https://help.autodesk.com/view/MAYAUL/2025/ENU/?guid=GUID-F2900709-59D3-4E67-A217-4FECC84053BE with the page name "Use a high resolution custom icon for a shelf item". This includes a MS Windows Batch script to auto-generate all the icons from the .svg files. The README.md file is intended as documentation to help me remind myself of the details if of the icons... and new people on the project.
- Loading branch information
1 parent
9d942df
commit be5b8de
Showing
65 changed files
with
205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Icons | ||
|
||
The icons used in mmSolver are contained in this directory. | ||
|
||
The "edit/" sub-directory contain the editable files, used to create the icons. | ||
|
||
## Guidelines | ||
|
||
The icons in mmSolver should: | ||
- be readable and obvious to users. | ||
- be consistent and share a common language with all other icons in | ||
mmSolver (and in Autodesk Maya). | ||
- be defined in vector formats whenever possible (to allow rendering | ||
bitmaps at higher resolutions for Hi-DPI screens). | ||
- use open standard formats (like SVG format) where possible to avoid | ||
proprietary formats and avoid vendor lock-in. | ||
|
||
Note: [Inkscape](https://inkscape.org/) is a really good Free Software | ||
for creating vector artwork icons - it is recommended to use it for | ||
creating the icons for mmSolver. | ||
|
||
## Shelf Icon Naming Conventions | ||
|
||
Icons for Maya shelf buttons require the following naming convention: | ||
``` | ||
name.png # The default 32x32 icon. | ||
name_150.png # The 150% 48x48 icon. | ||
name_200.png # The 200% 64x64 icon. | ||
``` | ||
|
||
Please see [High resolution shelf | ||
icons](https://help.autodesk.com/view/MAYAUL/2025/ENU/?guid=GUID-F2900709-59D3-4E67-A217-4FECC84053BE) | ||
for more details. | ||
|
||
## Node Icon Naming Conventions | ||
|
||
Icons for Maya nodes in the Autodesk Maya Outliner require the | ||
following naming convention: | ||
``` | ||
out_nodeType.png | ||
``` | ||
|
||
Additionally the icons must have a resolution of 20x20. | ||
|
||
## Building Icons | ||
|
||
To speed up the process of outputting the bitmap icons with the | ||
correct naming convention and resolution, there is a script (currently | ||
only on Windows) to automate the process. | ||
|
||
This uses [Inkscape](https://inkscape.org/) to render the SVG icons | ||
into PNG files. | ||
|
||
On Windows: | ||
```cmd | ||
:: Go to root of the icons directory. | ||
> CD <project root>\share/icons/ | ||
:: Runs Inkscape for all files and exports all PNG/SVG files. | ||
> build_icons.bat | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (C) 2024 David Cattermole. | ||
# | ||
# This file is part of mmSolver. | ||
# | ||
# mmSolver is free software: you can redistribute it and/or modify it | ||
# under the terms of the GNU Lesser General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# mmSolver is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with mmSolver. If not, see <https://www.gnu.org/licenses/>. | ||
# --------------------------------------------------------------------- | ||
# | ||
# Runs 'inkscape' to export PNG files from .svg files. | ||
# | ||
# This file exports multiple resolutions using a naming convention. | ||
|
||
# Any subsequent commands which fail will cause the shell script to | ||
# exit immediately. | ||
set -e | ||
|
||
THIS_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
# TODO: Write this script to match the Windows .bat equal. | ||
|
||
cd ${THIS_DIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
@ECHO OFF | ||
SETLOCAL | ||
:: | ||
:: Copyright (C) 2024 David Cattermole. | ||
:: | ||
:: This file is part of mmSolver. | ||
:: | ||
:: mmSolver is free software: you can redistribute it and/or modify it | ||
:: under the terms of the GNU Lesser General Public License as | ||
:: published by the Free Software Foundation, either version 3 of the | ||
:: License, or (at your option) any later version. | ||
:: | ||
:: mmSolver is distributed in the hope that it will be useful, | ||
:: but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
:: GNU Lesser General Public License for more details. | ||
:: | ||
:: You should have received a copy of the GNU Lesser General Public License | ||
:: along with mmSolver. If not, see <https://www.gnu.org/licenses/>. | ||
:: --------------------------------------------------------------------- | ||
:: | ||
:: Runs 'inkscape' to export PNG files from .svg files. | ||
:: | ||
:: This file exports multiple resolutions using a naming convention. | ||
|
||
SET THIS_DIR=%~dp0 | ||
|
||
SET INKSCAPE_EXE="%PROGRAMFILES%\Inkscape\inkscape.com" | ||
|
||
SET OUTPUT_DIR=%THIS_DIR% | ||
|
||
:: Export node PNG icons at 20 x 20 resolution, for use in the Outliner. | ||
:: | ||
:: 20 x 20 is the resolution expected by Maya's Outliner. | ||
SET OUT_RESOLUTION=20 | ||
for /r %%i in (edit\node\*.svg) do ( | ||
echo ------------------------------------------------------------- | ||
echo Input file: %%i | ||
echo Output file: %OUTPUT_DIR%\out_%%~ni.png | ||
|
||
%INKSCAPE_EXE% ^ | ||
--without-gui ^ | ||
--export-area-page ^ | ||
--export-width=%OUT_RESOLUTION% ^ | ||
--export-height=%OUT_RESOLUTION% ^ | ||
--file="%%i" ^ | ||
--export-png="%OUTPUT_DIR%\out_%%~ni.png" | ||
) | ||
|
||
:: Export node plain SVG icons. | ||
SET OUT_RESOLUTION=20 | ||
for /r %%i in (edit\node\*.svg) do ( | ||
echo ------------------------------------------------------------- | ||
echo Input file: %%i | ||
echo Output file: %OUTPUT_DIR%\%%~ni.svg | ||
|
||
%INKSCAPE_EXE% ^ | ||
--without-gui ^ | ||
--export-area-page ^ | ||
--file="%%i" ^ | ||
--export-plain-svg="%OUTPUT_DIR%\%%~ni.svg" | ||
) | ||
|
||
:: Export shelf PNG icons at 32 x 32 resolution. | ||
SET OUT_RESOLUTION=32 | ||
for /r %%i in (edit\shelf\*.svg) do ( | ||
echo ------------------------------------------------------------- | ||
echo Input file: %%i | ||
echo Output file: %OUTPUT_DIR%\%%~ni_%OUT_RESOLUTION%x%OUT_RESOLUTION%.png | ||
|
||
%INKSCAPE_EXE% ^ | ||
--without-gui ^ | ||
--export-area-page ^ | ||
--export-width=%OUT_RESOLUTION% ^ | ||
--export-height=%OUT_RESOLUTION% ^ | ||
--file="%%i" ^ | ||
--export-png="%OUTPUT_DIR%\%%~ni.png" | ||
) | ||
|
||
:: Export shelf PNG icons at 48 x 48 resolution (150% scale). | ||
SET OUT_RESOLUTION=48 | ||
for /r %%i in (edit\shelf\*.svg) do ( | ||
echo ------------------------------------------------------------- | ||
echo Input file: %%i | ||
echo Output file: %OUTPUT_DIR%\%%~ni_150.png | ||
|
||
%INKSCAPE_EXE% ^ | ||
--without-gui ^ | ||
--export-area-page ^ | ||
--export-width=%OUT_RESOLUTION% ^ | ||
--export-height=%OUT_RESOLUTION% ^ | ||
--file="%%i" ^ | ||
--export-png="%OUTPUT_DIR%\%%~ni_150.png" | ||
) | ||
|
||
|
||
:: Export shelf PNG icons at 64 x 64 resolution (200% scale). | ||
SET OUT_RESOLUTION=64 | ||
for /r %%i in (edit\shelf\*.svg) do ( | ||
echo ------------------------------------------------------------- | ||
echo Input file: %%i | ||
echo Output file: %OUTPUT_DIR%\%%~ni_200.png | ||
|
||
%INKSCAPE_EXE% ^ | ||
--without-gui ^ | ||
--export-area-page ^ | ||
--export-width=%OUT_RESOLUTION% ^ | ||
--export-height=%OUT_RESOLUTION% ^ | ||
--file="%%i" ^ | ||
--export-png="%OUTPUT_DIR%\%%~ni_200.png" | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.