r/Maxscript • u/lucas_3d • Aug 01 '14
MAXScript help - adjusting vertex positions based on height - good for terrain development. (xpost to 3dsMax)
http://i.imgur.com/sj6fc5c.jpg
In this image a selection of vertices are above a certain distance (in this case 15m shown by the purple line).
I'm looking to apply a script that restricts a vertex' max height to a variable (15m).
It's something along the lines of (but just out of my reach):
maxheight = 15m
for i in selection vertex do
if vertex (z) > maxheight then 15m else do nothing...
I'm going to create this now, it seems simple, but I'm tragic at scripting!
This will be great for terrain areas where fills and excavations of new development areas will affect the current topography.
View all comments
Show parent comment
2
u/TomDeVis Aug 01 '14
You want to keep the modifiers? If not just convert to editable poly before your current code. If you want to keep the modifiers you can either add an "edit poly":
If you just want to edit the existing Modifier / Base object it might be a bit more difficult.
gets an Existing Edit Poly modifier.
if you want to edit the existing base object you can simply check by :
This script should work if all base objects are Editable_Poly's