RESOLVED: CPlusPlus CHOP - cannot set "timeslice = false;"

Hi there,

I have a custom cpp chop, that I don’t want to do timeslicing, so I do:

void CPlusPlusCHOPExample::getGeneralInfo(CHOP_GeneralInfo* ginfo, const OP_Inputs* inputs, void* reserved1) { // This will cause the node to cook every frame ginfo->cookEveryFrameIfAsked = false; ginfo->timeslice = false; ginfo->inputMatchIndex = 0; }

But when I connect a chop to its input, that does timeslicing, my cpp chop does it as well.
How can I prevent this?

Best wishes,
David

Build 2019.14650
Windows 10


If you middle click on the node, you should see it’s not timeslicing. It is however just 1 frame long, and doesn’t change length if you drop frames (as a timesliced CHOP would). In getOutputInfo() you need to set info->numSamples to more samples if you want more than one to come out. Hope this helps. Let me know if you have any issues.

When I middle click, it says “Time Slice : Yes” and more than 1 frame, if TD is dropping frames.
Is it working for you? Am I doing something wrong?
I just took the Cplusplus CHOP Example and changed:

ginfo->cookEveryFrameIfAsked = false;
ginfo->timeslice = false;

Right, the other thing you need to do is return ‘true’ from getOutputInfo(), and set the numSamples. By default it’ll return false if an input is connected. The info popup will still say timesliced, which is a bug, but the node will behave like it isn’t timesliced.

Gotcha, it’s working.
Thank you for taking the time (slice) :smiley:

Thanks for the report! I’ve fixed the info popup bug, and I’ll add more comments to the sample file.