Request: Random selection

 From:  Michael Gibson
3927.2 In reply to 3927.1 
Hi Pilou, here's a script that can do the random selection part:

script: /* Deselect random objects */ var percent = 30; var objs = moi.geometryDatabase.getSelectedObjects(); for ( var i = 0; i < objs.length; ++i ) { if ( Math.random() * 100> percent ) objs.item(i).selected = false; }

You can change the value for the percent = 30 part in the script to adjust keeping more or fewer objects selected when it is triggered.

It won't give you exactly 30% of objects to remain selected, because it goes just object by object and gives each object by itself a 30% chance of remaining selected. But it should give a result somewhere close to 30% of the objects remaining selected.

- Michael