Reuse one of native 3ds max Icons


#1

i want to make my macroscript have the same slate editor icon as the one used by 3ds max

i found on this link that most the icons are availabe in the Light.rcc and Dark.rcc files which are in the UI_LN folder
https://help.autodesk.com/view/3DSMAX/2018/ENU/?guid=__developer_icon_guide_icon_guide_html

how can i make my macroscripts icon read from that rcc file ?

also i found in another post some one trying to use paths in the macro icon definition is this correct / possible ?

icon:#((getDir #scripts as string + “\q3me\q3me”),1)


#2

mxs reference:
In 3ds Max 2017 a new method of loading icons was introduced to support high-DPI display scaling. The iconName: argument uses this method. …

Wouldn’t it be better to make programmatically your own using existing .png icons? Those default ones are terrible


#3

ofcourse
i just have a case where i need the default ones

so to make it work it should be like this
icon:#((“c:\program files\autodesk\3ds max 2020\ui_in\resources\lighticons\main\slatematerialeditor_32.png”),1)


#4

No, it won’t work this way. Read the docs, it has some examples and the description of the differences between old icon and new iconname
for my 2014 it should be like this, for your max version this 103 index might be different ( maybe )

...
icon:#("Maintoolbar", 103 )
...

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5


#5

this is not the icons inside the .rcc file
this maintoolbar_24i can be found in the iconsdark folder i know how to use them

what i want is a way to load from the rcc file


#6

did you try iconname:“MainUI/SlateMaterialEditor” ?

reading mxs docs usually helps quite a lot
CustomControlsOptions.PrintIconPaths

Path of this control’s QIcon: [C:\Program Files\Autodesk\3ds Max 2020\UI_LN\IconsDark.rcc] MainUI\SlateMaterialEditor
IconSize: 16x16 (scaled) IconState: off
Available Files: SlateMaterialEditor_24.png, SlateMaterialEditor_30.png, SlateMaterialEditor_36.png, SlateMaterialEditor_48.png


#7

i didn’t work multiple times for some reason but suddenly after multiple restarts it worked

i already read this section of maxscript but i didn’t notice the iconname part
thanks for pointing out this tip