Custom CHOP C++ operator — expose custom info to an Info DAT?

Hello,

I’m writing a custom CHOP C++ operator and I’d like to expose a few custom internal values (strings or numbers) from the CHOP so they can be displayed in an Info DAT connected to that CHOP.

For example: internal state, identifiers, counters, or metadata held by the CHOP instance.

Is this possible from a CHOP C++ operator?
If yes, which methods should be implemented?
Or is the Info DAT for a CHOP limited to built-in TouchDesigner info only?

Thanks,

Julien

Yes all C++ nodes support writing data to Info DAT and Info CHOP.

Both have seperate methods to configure how much data is written, and another method to set the actual data.

All documentation is in the base header file (in that file do a find for “Info DAT”), but to write to an Info DAT you’ll need to override ‎getInfoDATSize‎ and getInfoDATEntries.

For an example, see the ObjectDetectorTOP project in the Custom Operator Samples repo

1 Like

Hey @nettoyeur

Thanks a lot. I’ll check this out ASAP.

Started to dev very custom things with c++ directly. A whole new world in TD. Have been doing that for a while with Max.

Worked smoothly !
Thanks.
Next step, how to get the node instance name + TD project opened (file) from with a Custom Op… Will also check headers and not only docs etc as you mentioned :slight_smile:

great! I’m not sure if TD project name is available in the C++ SDK, but else you can always add a custom parameter to your C++ node with project.name as the expression value.

do you mean something we’d have to add manually to as a parameter ?