Has anyone verified that the python custom callbacks in POP custom components work in TouchDesigner?
I’m building a small POP extension to test interop between POP datastructures and torch tensors. This custom op needs to expose custom python methods & attributes to access POP buffers and call a standard “onCook” custom callback.
Working from the CHOPWithPythonClass and SimpleShapesPOP examples, I’ve been able to build a POP operator that exposes pop data via methods and properties. However, the callPythonCallback interface appears to be broken and doesn’t resolve callbacks when used with a POP_CPlusPlusBase subclass.
I’ve verified my implementation using a CHOP_CPlusPlusBase subclass and isolated the error to the return of callPythonCallback. To summarize…
When using POP_CPlusPlusBase I’ve verified that…
… info->customOPInfo.pythonMethodsexposes methods that can be called on the op.
… info->customOPInfo.pythonCallbacksDatexposes a callbacks template and a results in aCallbacks DATparameter on OP which successfully initializes from the template.
… OP_NodeInfo::context::callPythonCallbackdoes not resolve or call the callback, returningPy_Nonefor all invocations.
Has anyone attempted to build a C++ Custom POP and encountered this behavior.
Is there sample code available which exercises the python custom method/attribute/callback feature for POPs?