Edit macro button appearance

Edit macro button appearance

denisT.MaxDoctor
Advisor Advisor
522 Views
2 Replies
Message 1 of 3

Edit macro button appearance

denisT.MaxDoctor
Advisor
Advisor

Does anyone know for sure what the system does when you try to change the appearance of a macro button using the RightClick menu?
I don't see any SKD methods for this, so I assume it's just some data stored in some "INI" file.

 

Ideally, I want to catch this moment.

(monitoring some file or directory is not a problem for me... I just need to know where the changes are)

0 Likes
Accepted solutions (1)
523 Views
2 Replies
Replies (2)
Message 2 of 3

Serejah
Advocate
Advocate
Accepted solution

Appearance of all these buttons is saved on max session end (don't know if you can force it using maxscript) in .cuix file that you can find using workspace methods
WorkspaceManager.GetCurrentWorkspaceIdentifier()
WorkspaceManager.GetWriteDirectory()

 

upd

 

 

local g = (dotNetClass "Autodesk.Max.GlobalInterface").Instance

g.CUIFrameMgr.WriteConfig -- accessing this property forces max to save .cuix file

g.coreinterface7.loadcuiconfig g.CUIFrameMgr.ConfigFile -- force reload workspace

 

 

if it is the only button you need to track then perhaps you could subclass it and wait for a WM_COMMAND with lparam equal to 47816 which is sent when Edit Button Appearance... menu item is clicked. And then subclass this modal window and wait for WM_COMMAND with lparam equal to IDOK. Way too hacky to call it safe to use, imo

 

0 Likes
Message 3 of 3

denisT.MaxDoctor
Advisor
Advisor

@Serejah wrote:

Appearance of all these buttons is saved on max session end (don't know if you can force it using maxscript) in .cuix file


yeah... thanks for the confirmation. Finally, everything is stored in the specified .cuix. During the MAX session they are probably modifying the Action Table which I have access to through the SDK. So I'm almost "happy" with what I have.

0 Likes