Introduction to Macro-Scripts (record actions in 3ds max):

 

 

-This Tutorial will cover how to use the Max Listener to record your actions in 3ds max, similar to actions in Photoshop. You will then have the code at your fingertips so that you can save out your max actions, as a "Macro Script". This Macro Script can be assigned to a category in your 3ds max menu and then used as a hotkey or button in the 3ds max UI.

-If you find yourself constantly doing the same stuff over and over again in 3ds max, and you would like to make a shortcut to speed up the process. This tutorial is for you. You do NOT need any prior scripting experience to follow along with this tutorial.

 

-Let's Begin...

Step 1: Open 3ds Max and go to the > "MaxScript" Menu > "MaxScript Listener..."

 

Step 2: Go to the "MacroRecorder" and click "Enable"

 

Step 3: Now when you do various tasks in 3ds max it will output your actions in code in the Max Script Listener.

 

Step 4: In this tutorial we will create an action for the "TurboSmooth" Modifier.

It can be annoying constantly checking the same values all the time, so we will create a script to handle it.

Simply choose the options you want and it will be recorded in the MaxScript Listener.

You can turn off the MacroRecorder when finished, or simply note the code you have created.

 

Step 5: Copy the text you just created by highlighting it and pressing "Cntl + C"

 

Step 6: Go back to the 3ds max Menu, and go to "MaxScript" > "New Script"

 

Step 6: The Max Script editor will appear. Paste in the code you just copied ("cntrl + v")

 

Step 7: Now type in the Code to create a MacroScript as shown in the image below. The Top line ("Macro Scripts Line") and braces are all you need here. In the red Underlined areas you will need to place your specific information.

 

Step 8: Lastly, add comments to explain your script. This generally a good idea, but is not absolutely necessary.

 

Step 9: Now simply save out your file by going to "File" > "Save As" in the Max Script Editor.

Save the file to your Scripts folder to keep things organized as shown in the image below.

 

Step 10: This is the final step to finish your Max Macro Script. Go to "Tools" > "Evaluate All" in the Max Script Editor.

If it appears nothing happend this is a good sign. Your script has been successfully run, and should now be in the "Customize" Menu.

 

Step 11: Finally, we want to find and add our script so we can put it to good use.

Go to the main 3ds max Menu, and "Customize" > "Customize User Interface"

 

Step 12: Click the "ToolBars" tab. Then Choose your category in this case "Brad's Tools". Remember, the name of this Category was defined in "Step 7".

 

Step 13: Click on your "Tool Tip", which was also defined in "Step 7" and drag it to the top menu with your other shortcut buttons.

You have now successfully created your shortcut Macro Script Button!

As in this example, all we need to do now is select an object, and click this button. 3ds Max will automatically add a TurboSmooth Modifier with the settings we want.

 

If you would like to download this script, get it: Here

So, if you have any questions feel free to email me at BradM3d@hotmail.com and also check out other tutorials I made on my site: www.BradM3d.com

 

Back Home: