[Solved] How can I add my script to a toolbar with a custom icon in 3dsMax?


Hi !!

A few weeks ago, I have posted a new topic here but I don’t have recieve any answers yet :frowning: ! Maybe I have placed it in the wrong place…
Could you help me please ? I don’t know where to put my script files and how to add my custom icon to my toolbar.

Thanks a lot ! :slight_smile:

[Solved] How can I properly add my 3ds Max script to a toolbar with a custom icon?

you can select all your code, drag & drop in your toolbar and next right click Edit button Appearance


Thank you !

After right click on Edit button Appearance, I have this window and I don’t undestand how can I change my icon. I can’t browse my computer to find my *.png icon. :confused:



you need use mcr to definite it

macroScript <name> 
[icon:#(<string>, <index>)] 
   your script or  filein "file path"

this is the way max use , but you need 24x24 bmp image

you can use AEI ToolBar to add any scripts with icon , it can be download in scriptspot


What is “ToolTip” ? The official documentation says : « The toolTip: argument specifies the tooltip for the button. If no tooltip is specified, is displayed for the button. » but I don’t really know what is ToolTip !!

There is my code :

macroScript PFCreatorMacro
    category:"PF Creator"
    toolTip:"PF Creator"
    buttonText:"PF Creator"

My icon is pfcreator_24i.bmp and I placed it here : C:\Program Files\Autodesk\3ds Max 2020\UI_ln\Icons but I can’t find it in the Edit Macro Button :

I can’t find my icon when I click on Image Button. I can’t find my icon in Group, anywhere… Why ? I don’t undestand !!

My macro PFCreatorMacro.mcr is here C:\Users\MyName\AppData\Local\Autodesk\3dsMax\2020 - 64bit\ENU\usermacros.

Thank you for your help :smiley:


when mouse on the button , a title appear, that’s tooltip
icon#(<string>, <index>) ,this is an array , 1 element is the path of the bmp, 2 element is the index of the icon , you need use this format , such asicon:#("pfcreator_24i", 1)
the most important is you need restart max , if not , even if you try the method official gives , icon may can’t show .


Thank you for your answer.

Now my code is :

macroScript PFCreatorMacro
    category:"PF Creator"
    toolTip:"PF Creator"
    buttonText:"PF Creator"

I followed your steps, this tutorial but I can’t get my icon !! :frowning: I really don’t undestand what I’m doing wrong…

My files are here :slight_smile:
C:\Users\MyName\AppData\Local\Autodesk\3dsMax\2020 - 64bit\ENU\usermacros
C:\Users\MyName\AppData\Local\Autodesk\3dsMax\2020 - 64bit\ENU\usericons


why you put it in a temp path?
all icons load in UI_ln folder


Ok ! Now they’re in the right folder. But my icon doesn’t appear and I can’t find it in the Group list. Is it a bug or something like that ?! o_O


your code pattern may be wrong , you can compare with existing mcr
if you really can’t fix it , use AEI ToolBar may be better


It’s working !!

My code was correct but my customicon_24a.bmp icon wasn’t. The alpha was invert ! So I changed that.

I placed my icons at this location : C:\Program Files\Autodesk\3ds Max 2020\UI_ln\Icons and also at this location : C:\Users\MyName\AppData\Local\Autodesk\3dsMax\2020 - 64bit\ENU\usericons. When I restarted 3dsMax my icons wasn’t here !
So, I decided to restart my computer and for some reasons, It worked !! I don’t know why ! Weird !! :smiley:

Thank you so much for your help !