FIXED:C++ TOP not getting unique operator ID when loaded as Custom OP

When a C++ operator is created, its constructor will be called with an OP_NodeInfo object, which is passed into the exported DLL functions (CreateTOPInstance, CreateCHOPInstance, etc).

This object contains a property called opId which is, as per the comments in the source code:

A unique ID representing the operator, no two operators will ever have the same ID in a single TouchDesigner instance.

This doesn’t realiably seem to be the case.

When loading the DLL for a C++ TOP in the CPlusPlusTOP operator, all is well and good. The opId seems to be a unique unsigned integer.

When loading the same DLL as a custom operator, the opId seems to be 0 most of the times. Once I’ve seen the operator get an opId of 1, but mostly 0.

This doesn’t seem to happen for Custom CHOP or DAT operators.

Hey @navFooh

Thanks for the report.

I was able to reproduce and logged an issue for our developers to look into.


1 Like

This will now be fixed in builds 2021.15360 and later.

Hi @rob, thanks for fixing the issue!