[Closed] Button on main toolbar run a small script
I want to make a button on main toolbar that run a small script (It is very short to make seperate macro file ;)). However, I can not figure how Max handle it. Edit a button dont give any area for putting script in.
Thanks for any help
The only way to add a button anywhere in the UI is to create a short MacroScript.
macroScript yourScriptName category:"ghostlake114" buttontext:"ButtonName"
(
--your code here
)
Once you have evaluated it, go yo Customize UI > Toolbars and drag the button to the Main Toolbar. If you want an icon, you can assign an existing one using the Edit Button Appearance option or create your own icon BMP files (there is a documentation page explaining how) and specify in the macro definition.
well, that’s not entirely true – but this is not beginner-level material and it’s not very flexible; one can create a small dialog, register it as being dockable, then dock it somewhere in max. Unfortunately the only docking options are top/right/bottom/left without any precise positioning
Which is very handy for things like the “drop down button” I have on my toolbar…
I can see the request for “a button for a small script on the Main Toolbar”.
I don’t see anything about “a dialog docked in the UI”
So I stand by the truthfulness of my answer (as opposed to truthiness)
I forgot to quote
There ya go
Of course one could then argue that a docked dialog isn’t really part of ‘the UI’, and the original question -was- regarding a toolbar, so both are truthful – depending on context