Maxscript: Vertex Randomizer

Simple script that randomizes vertex positions.

rollout roll_vertexRandomizer "Vertex Randomizer"
 spinner spnX "X dinstance" range:[0,10000,1]
 spinner spnY "Y dinstance" range:[0,10000,1]
 spinner spnZ "Z dinstance" range:[0,10000,1]
 button btnRandomize "Randomize" width:roll_vertexRandomizer.width

 on btnRandomize pressed do
 with undo on
 objs = selection as array
 for obj in objs do
 if classOf obj == Editable_Poly do
 verts = polyop.getNumVerts obj
 for i = 1 to verts do
 polyop.moveVert obj i \
    [(random -spnX.value spnX.value),\
    (random -spnY.value spnY.value),\
    (random -spnZ.value spnZ.value)]
createDialog roll_vertexRandomizer style:#(#style_toolwindow,#style_sysmenu)

3 thoughts on “Maxscript: Vertex Randomizer

  1. robin says:

    This script looks like just what i want.. however its impossible to use on heavy meshes. i tried it on a 1.6 million poly mesh and it maxes out 72GB (!!) of ram and locks up my workstation.

  2. Stefan says:

    Very cool script, close to waht i was looking for. Can you tell me, what i would neet to alter, so it would just have an effect on the vertices I selected. I am pretty new to scripting so please excuse this rather basic question. thanx in advance

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>