Developing a Scripted Utility in 3ds Max 9by Sathish Shanmugasundaram, India
Hello everyone, this tutorial will guide you to develop a scripted utility in 3DS MAX 9. This tutorial is for users with basic knowledge in max script or any other object oriented language. Here I explained everything step by step. Actually this coding is a part in my plug-in. Due to coding complexity, I cut shorted some and add only the few things. If time permits I will explain rest.
It covers:
- How to develop a tool (with rollouts, buttons, check boxes etc) in 3ds Max.
- How to position an object over another objects vertex or polygon.
- Calculating local normal of vertex and polygon in an object and positioning another object according to it.
- By using basic coding, making copies of an object according to user selection (may be Instance, Copy or references).
What is Scripted Utility?
Max Script allows us to create our own Tools for specific purpose and embed them into existing max interface. The Scripted Utilities are tools appear in Utility panel > Max Script Utility. Scripted utility is an easiest way of developing tools, since they are special kind of rollouts that saves the developer some UI management work.
Created and Running Scripted Utility
To create new script go to MaxScript menu->New (or)
Open Utility panel -> MaxScript->New script.
To run a script, go to MaxScript menu->Run Script (or) Utility panel -> MaxScript-> Run Script and choose script to be run.
When we put the Script file into \Scripts\Startup folder then it will automatically executed when 3DMax starts.
After execution our utility is available at Utilities panel -> maxScript -> Utility dropdown list (See fig). When we select Object Placer the rollout will appear below dropdown list as shown below.

Fig. 1 |
Purpose of our Utility - Object Placer
Object placer allow us to place copies of source object into the destination object‘s vertices and/or polygon’s centre, Also aligned with local normal.

Fig. 2 |
The fig shows, source object Cone copied and aligned to Geosphere‘s polygons and another object box copied and aligned with vertices of Geosphere.

Fig. 3 |
Fig.2 shows the final object placer utility. The contents are...
About rollout with Labels.
Parameter rollout with following
Two Pick buttons for Source and Destination object selection.
Two Check boxes for selecting Vertex and /or Polygon.
A Group named Copy option with three Radio buttons for selecting copy type. |
|
|
|