emrahgunduz
always eats his vegetables
Blog RSS Feed
  • twitter
  • friendfeed
  • linkedin
  • facebook
  • vimeo
  • flickr
  • lastfm

Randomly Delete Objects With Maxscript

Randomly Delete Objects With Maxscript

The script randomly deletes meshes from the selection. As the script depends on the random numbers created by 3dsmax, the percentage can be %0-1 off what you expected. Just select the meshes you want to randomly delete. Enter a percentage, click the Delete button.

Download Random Delete

Here are some screenshots

  • Just drag drop for startup
  • Script comes to life
  • 10 percent random deletion
  • 50 percent random deletion
  • 90 percent random deletion

And here is the code if you want to check it right away

rollout RDGUI "Random Delete v.1.0" width:184 height:144 (   spinner s_percentage "" pos:[112,8] width:48 height:16 enabled:true range:[0,100,50] type:#integer   button b_delete "Delete" pos:[56,40] width:72 height:20   label l_percent "%" pos:[163,8] width:12 height:16   label l_info "Deletion Percentage :" pos:[8,8] width:104 height:17     on b_delete pressed do   (     per = s_percentage.value as Float / 100     sel = selection as array     count = 1         if sel.count > 2 then     (       undo on       (         while count < sel.count do         (           rand = random 0.0 1.0                     if rand < per do (delete sel[count])           count += 1         )       )     )     else messageBox "You must select at least three or more objects" title:"Random Delete"   ) ) RDFloater = newRolloutFloater "emrahgunduz.com" 195 100 addRollOut RDGUI RDFloater

This post's short url is: http://emrg.me/5n

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> <span style=""> <p> <li> <ol>

Calendar

May 2012
M T W T F S S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031  
Web Analytics
Author: Emrah Gunduz