PDA

View Full Version : noob help. run script off quad. please!


artmann
04-07-2003, 02:10 PM
well, might not actually be a 3d noob but sure a max script newbie.

seems selection filters arenīt shortcut assignable or anything. so i opened up max scipt listener, and tried to extract the commands (SetSelectFilter 8, for instance is bones) and save them down as scripts, to run them off a quad or something.

going insane here. looked in manuals all websites about maxscripts, canīt find any info off this (seemingly) easy question!

had SOME success, but only after having made a button in the interface running this script.... do i HAVE to make a button out of it to run scripts like this? at least then it showed up as assignable...

or to where would i save a script like this, to what folder, so i can assign them to a quad?

please help going bananas!

artistīs trying to handle scripts..... man....

would apreciate any feedback!

LFShade
04-07-2003, 02:40 PM
In order to be assignable to a button, shortcut, or menu, a script must be wrapped in a macroScript definition. When you drag code to a toolbar to create a button, it automatically creates the macroScript wrapping for you. I would suggest looking in the Maxscript online help and learning how to create macroScript definitions - there are some good features such as contextually enabling/disabling the macro based on whatever criteria you wish.

EricChadwick
04-07-2003, 02:44 PM
[edit - oops beat me to it!]

I tried to use the Listener to make a maxcscript. Then I asked the script gurus on Discreet's webboard, and they all said the Listener wasn't worth using. Apparently it doesn't produce proper maxscript.

As for sticking a script in a quad, it has to be a Macroscript (.mcr) first. It is easy to convet a.ms into a .mcr.

Open the Listener window, paste the script into the white area, then select the script text, and drag that text somewhere onto the Tab panel to make a button. Right click on the new button and choose Edit. You can now see what it has done, added a simple header with parentheses enclosing the script.

It saves the .mcr in \ui\macroscripts, as DragAndDrop-Macro#.mcr.

You can then add it to a Quad by going to Customize, Customize User Interface, Quads, Category: DragAndDrop, and stick it in a quad.

Once you understand the header/parentheses thing, you can convert any .ms into a .mcr. And you can make your own category. Then just put the .mcr in the macroscripts folder to use it in a quad (or anywhere else in the UI, like a keyboard shortcut).

Pretty cool huh?

artmann
04-07-2003, 02:59 PM
promise i will get down and dirty w scripting. tho gonna try the speedy shortcut asap :)!

thanx guys!

Bobo
04-08-2003, 02:38 AM
Originally posted by artmann
promise i will get down and dirty w scripting. tho gonna try the speedy shortcut asap :)!

thanx guys!


Check out the new "How To" examples in the MAXScript Help.
The first one is as simple as it gets and shows how to turn a one-liner script into a MacroScript manually...

(Just FYI, the next version of the online tutorials will be illustrated - in color :applause: )

artmann
04-08-2003, 12:10 PM
max scripting in colors huh? might that be black and blue then ;)?

just discovered the new docs in v5 (still prefer v4 tho)!
nice! an improvement!

thanx!

CGTalk Moderation
01-14-2006, 07:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.