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.
Here are some screenshots
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















