On 18/04/2014 at 14:42, xxxxxxxx wrote:
I'm selecting random polygons from an object, depending on a percentage with this code:
random.seed(rand)
selection=op.GetPolygonS()
selection.DeselectAll()
pnum=op.GetPolygonCount()
for i in range(pnum) :
rnd1=random.random()
if rnd1<kill:
selection.Select(i)
This part seems to be working fine.
But when I call the delete command with
c4d.CallCommand(12109)
I get a crash!!
So, how can I delete the selected polygons?
Oh, the op object in not in the document. It is an object created inside my code.