I am seriously stuck on a simple python problem - guru help please. The attached program with several small python scripts cycles repeatedly through videos fine in network mode, but gets stuck and fails to index when I put it in perform mode. I have tried various delays, triggers etc but nothing seems to solve this. I assume it has something to do with Perform mode running much faster than network mode with viewers on etc, but I have never really encountered this before - something running worse in perform mode than in network mode. Please does anyone know why?
LoopDebug.6.toe (10.8 KB)
Hi @gordharris,
it’s the count and following operators that are not updating in perform mode as nothing, except a script, is fetching the value. You can make it always cook by setting the cook type of the Null CHOP called “next” to Always
.
Otherwise this might be a bit simpler with a Timer CHOP in the Segment mode.
It could be a segment table that mimics the necessary scripts to preload, play and unload:
id | length | cycle | action | movie |
---|---|---|---|---|
0 | 1 | 1 | preload | 0 |
1 | 1 | 1 | play | 0 |
2 | 1 | 1 | preload | 1 |
3 | 1 | 1 | play | 1 |
… |
The length of the segments are all set to 1 frame and they are looping indefinitely (Cycle Limit turned off). For preloading we can check on each cycle if the movie is fully preread. If that is the case, we are exiting the segment and are pushed to the play segment. Here it turns on the play parameter.
Via the Info CHOP I can watch for the last_frame trigger and exit the play segment. This will cause the play parameter to be turned off, the current movie to be unloaded and we are entering the next preload segment.
The segment table itself is created with the Table DAT’s “Fill by Column” feature where using the folder dat’s number of rows we can add and fill all columns with some references to the current evaluated row.
Hope this helps
cheers
Markus
LoopDebug.9.toe (8.4 KB)
Thank you very much Markus! Richard Burns also suggested null chops to cook type “always” and I got it working, but with a little flash like you mentioned earlier. Your timer CHOP approach sounds simpler. I will experiment with that.
I really appreciate you getting back to me quickly. Best regards and Happy New Year!