Using a count value with a delete SOP to hide primitives?

Hi,

I have a count CHOP that is being incremented by a timer; what I am trying to do is:

  • show primitives created by
  • grid → add points → add polygons
  • I have the count value in a CHOPTo DAT

I am trying to set the number if visible primitives using an expression ; this is not working. I don’t know if this is possible from reading the documentation. The count value is row 0, column 0; I am getting a syntax error with the expression.

@primnum >= op(‘chopto1’)[0, 0]

Ultimately, I want the use of a count to work with a Script SOP with generated polygons in an array in Python.

I had a look at some other uses of the Delete SOP & saw an example using the end range. This seems to be working now; I have some hardcoded values that I want to change to using variables - that are driven by the number of primitives in the network. I set the ‘rangeend’ to:

50 - op('chopto1')[0, 0]

Grid - delete SOP using end range.toe (5.9 KB)

Hi @MuttsMiro,

to always consider the input’s number of primitives, you can replace the 50 in your expression with me.inputs[0].numPrims

cheers
Markus

Yes, I see @snaut - I understand that now. Thanks.