|02 February 2005||#1|
Visual Effects Artist
Join Date: Feb 2005
Im new to the maxscripting world so you might have to bear with me.
Anyway Im trying to write a small script that will extrude imported shapes from autocad at a random height.
So far I have this:
modPanel.addModToSelection (Extrude ()) ui:on
$.modifiers[#Extrude].amount = (random rExtrudeLowerLimit rExtrudeUpperLimit)
Now the problem is, this works fine if i have selected 1 shape. If i want to extrude multiple shapes all at random heights, it doesnt work. Now i can sort of understand in my head why, however I wouldnt have a clue how to rectify this.
The next step Im hoping to work out is to then 'drape' those extruded shapes onto a surface but first things first, the extrude is my main priority at this stage.
I figure this is a relatively simple operation but as i said, Im new.
Any help would be greatly appreciated!
Ah lastly, before you say to search the help files, Im using VIZ and there doesnt seem to be any maxscript help in the helpfiles.
Cheers for any help you can provide!
|02 February 2005||#2|
Forlorn Battle Acolyte
Join Date: Oct 2004
bobo posted a link to the max7 maxscript help file:
im using max6, i cud still use that helpfile coz it indicates entries that are new to max7, plus, the readability has improved, lots of new samples, and stuff, excellent resource.
im not sure if viz also has a separate help file for maxscript, but usually they come in seperate files.. a file for max, maxscript, character studio, and reactor... have tried looking at the max root folder under help (c:\3dsmax\help)? im not really particular with how or where viz installs its directories, but im just just assuming that its basically the same..
best bet is to look for "for loops"
very simple example...
prints the numbers 1 to 10 in the listener...
hope this helps!
|07 July 2005||#5|
Join Date: Jun 2003
i had the same need ..
i was just typing
for obj in selection do addmodifier obj (Extrude ())
for obj in selection do obj.modifiers[#Extrude].amount=(random WhateverLow WhateverHigh)
the strange thing is that when i combined those two into one command, and tried to do the same, it failed ... and such a simple command .
Maybe it has something to do with some problems in autocad files, (unclosed polylines for example) , or maybe something else .
But i do not really know .
When i will have some time i will try to post the final version.. :-)
Last edited by krembo99 : 07 July 2005 at 12:26 PM.
|07 July 2005||#6|
Join Date: Sep 2003
Thread automatically closed
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.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|