Hello, community.
I'm having an extremely hard time understanding what's the procedure to use icons for scripts and macros buttons so they can show on the toolbar. I have read multiple times the max developer site sections but to no avail. To summarise:
1 - Can scripts/macros use .png icons and how?
I have found that using the command IconName:" lets me use the already existing .png from the .rcc file already existing within the 3ds max installation. Example:
IconName:"MassFX/AdvanceSimulationOneFrame"
But this limits to only use those already existing within that .rcc file. How can I add more customized .png files for use? Is there any alternative command for calling a .png icon to use for a script icon button?
2 - If needed (and there isn't another way to use .png) can I create another .rcc file with my own custom .png and how?
I should clarify that I'm not trying to create plugins but rather have better UI with the scripts and macros I create or use.
3 - When using .bmp icons what's the best or at least the current way to call them in a macro? Is this one?:
icon: #("NameIcon",1)
4 - Is this code only useful for the .bmp icons or does it accepts also .png?
NOTE: I believe should be noted that the knowledge base should be reviewed. It's not a clear base to work with and most of the time it just involves randomly testing code and searching the web to hopefully found something similar to kinda use. This has been specially true with things like UI and the icon guide.
- Thank and best regards
Solved! Go to Solution.
Solved by a2d4f3s1. Go to Solution.
Save the .png in the following location.
- [C:\Users\ _UserName_ \AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\usericons\Dark\TestA.png]
- [C:\Users\ _UserName_ \AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\usericons\Light\TestA.png]
The macro script is like this.
macroScript test
tooltip:"test"
Category:"test"
iconName:"TestA"
(
)
If you create subfolders in the "dark" and "light" folders...
- [C:\Users\ _UserName_ \AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\usericons\Dark\test\TestB.png]
- [C:\Users\ _UserName_ \AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\usericons\Light\test\TestB.png]
The macro script is like this.
macroScript test
tooltip:"test"
Category:"test"
iconName:"test/TestB"
(
)
And maybe ".png" should have 4 sizes: "24x24", "30x30", "36x36", and "48,48".
The file name should be written as "TestB_24.png". Adding "_24" etc. does not change the way the macro script is written.
if you want to show any image on button control from any place, any size, and any format, use bitmap instead of image name:
(
local my_bmp = openbitmap <absolute path png>
button theButton images:#(my_bmp, undefined, 1,1,1,1,1 ) width:40
)
Can't find what you're looking for? Ask the community or share your knowledge.