how do I drag and drop a code snippet to my toolbar?

how do I drag and drop a code snippet to my toolbar?

K.W.J.P.
Advocate Advocate
448 Views
1 Reply
Message 1 of 2

how do I drag and drop a code snippet to my toolbar?

K.W.J.P.
Advocate
Advocate

Hi Guys,

 

I wanted to keep a little script as a button along my toolbar. In Maya it´s very simple: select your script text and

drag ´n´drop it to the shelf. Easy. In Max that doesn´t work. But it should work somehow, or?

 

thanks in advance

0 Likes
449 Views
1 Reply
Reply (1)
Message 2 of 2

denisT.MaxDoctor
Advisor
Advisor

@K.W.J.P. wrote:

Hi Guys,

 

I wanted to keep a little script as a button along my toolbar. In Maya it´s very simple: select your script text and

drag ´n´drop it to the shelf. Easy. In Max that doesn´t work. But it should work somehow, or?



it works in MAX the same as in Maya. (according to the MXS Help)  

 

  • MAXScript supports text drag onto toolbars to create MacroScript buttons. You can select and drag text from any text window such as, Listener window panes or Editor windows onto any visible toolbar. The cursor changes to an arrow with + sign when it is OK to drop the text. If you drop it, a MacroScript button is added to the toolbar with the dropped text as the body of the MacroScript. The classic case here is to drag some text from the Macro Recorder pane in the Listener window onto a toolbar to make a button that does the sequence of events just recorded. Remember that tabbed elements on the Shelf are toolbars and can accept dropped text. MAXScript automatically encloses the text in a MacroScript definition with a MacroScript name of DragAndDrop-MacroN , where N is a number that makes the MacroScript name unique. The category is DragAndDrop and no tooltip is specified. As with MacroScripts defined in the Listener window, a file is automatically created to contain the MacroScript definition. This file is stored in the MacroScripts directory under the current user-interface directory.

0 Likes