FIXED: C++ cookEveryFrame and perform mode

I have a C++ device driver I am feeding with CHOP data. Settings:

ginfo->cookEveryFrame = true;
ginfo->timeslice = true;

When I start my project in perform mode my CPlusPlusCHOP never initializes. If I exit perform mode and view in the editor, then it initializes and runs correctly. If I attach an always cook null CHOP to the output, then it starts correctly in perform mode.

Is this a bug? It is confusing behavior because the CPlusPlus CHOP does not behave the same as other CHOPs. For example I can feed the same data into Ether Dream CHOP, which initializes and cooks correctly in perform mode (with no output connected).

No input connected to CPlusPlus CHOP - starts correctly in perform mode
Input and output connected to CPlusPlus CHOP - starts correctly in perform mode
Only input connected to CPlusPlus CHOP - does not initialize or cook in perform mode

CPlusPlus_cook_issue.zip (27.6 KB)

Windows 10 - 64 bit - 2019.20700

Yep, seems like a bug. A workaround would be to use an Execute DAT to cook the node once when the file starts. Thanks for the report.

In build 2020.24780 or later, OP_CustomOPInfo will have a new cookOnStart boolean you can set to true to force a Custom Operator to cook when the file starts.
This doesn’t work for plugins manually loaded into CPlusPlus nodes though, so you will still need to use the workaround for those cases.