Jump to content

Question: very basic scripting question


Recommended Posts

I am developing a very simple script for forming cities from imported plines. This is just part of a study to break into maxScript, which I find very entertaining.

 

It performs the following functions:

 

-Splits editible splines containing more than one spline into seperate objects

 

-then within a loop

--Extrudes the splines within given random parameters

--Assigns appropriate matIDs to the wall, roof and parapet

--Performs a bevel operation on the top polygon to create a parapet wall

--adds between 0-3 textured blocks at the roof level simulating roof detail

--closes the object and then moves onto the next one

 

It works from a macro button. You simply select a bunch of stuff and hit the button and it grows a fairly presentable city with textures.

 

What I want it to do is either -

 

Work as a modifier so I can adjust my variable parameters in real time or...

Pop up an a box asking the user to input the min/max heights of the buildings

 

can somebody show me a barebones way of creating a plugin style modifier with just one variable. Even if it doesn't really do anything useful, I would like to see how it is set up.

Link to comment
Share on other sites

  • 2 months later...

Hi Kev,

 

I've found that a pop-up box is not a good way to drive your script.

 

I myself write all my scripts in the tools section, because it is intergrated in the max interface that way, not cluttering the working screen. Also I've found it easier to implement.

 

If you want the script always active, place it in the scripts/startup directory

 

utility Automatic City "Automatic City"

(

--Here comes your script

)

 

 

rgds,

 

nisus

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...