When ‘Event chop’ is triggered more that 1 time ‘Chop execute’ with ‘id’ channel and ‘value change’ will be triggered every frame.
example.toe (4.12 KB)
Looks like the chopexecute is firing repeatedly for timesliced data. (doesn’t handle Value Change well for multi-sample / timesliced CHOPs).
If you follow the event with a Trim CHOP, set to (Relative to Current Frame, Start:0, End:0), it will produce single-sample output.
Pointing the chopexec to that, will then get you the behaviour you want, though you may miss intermediate sample changes if you drop frames.
okay at least it is better, that doing so with python. But if i trigger event chop twice in one frame (2 buttons pressed in one frame), i will miss one of the id and get only the last one (ill get id2 instead of id1 and id2). Sadly, that i cant nattily trace new elements made by event or trigger chop
The issue really is, is that the Event CHOP output is not actually timeslice,
its more like a table of values.
If you create a ‘CHOP to’ DAT, and point it to the Event CHOP, with “Include Names” on,
then you can better see how the data is changing.
Any id (table Row) can appear or disappear independently of the others at any frame.
That being said, if you append a Select DAT to this ‘chopto’ DAT, to select out column ‘id’, then you can place a ‘DAT Execute’ DAT to monitor changes on that DAT instead.
You’ll get a single callback any time that column changes (that is, an id is added/removed).
You’ll still have to keep track of which id actually changed though.
Ideally, the Event CHOP could have a callback DAT, called every time a particle is added or removed though.
Hope that helps,
Rob