Let’s say I have 2 operators, a Null CHOP (null1) and a Level TOP (level1)
If I drag channel 0 from null1 onto the Invert parameter of level1, I can select “Export CHOP” and create a hard export between the two ops. At this point, if I access op("null1")[0].exports in python, I’ll see an array containing the Invert parameter I’m exporting to. This is great because if I ever want to kill exports from null1 (e.g before calling op("null1").destroy()), I can iterate through its channel exports, switching them into constant or expression mode or some other backup/default reference.
Alternatively, let’s say instead of manually dropping the channel and selecting “Export CHOP”, I create a reference in python, e.g. op("level1").par.invert.expr = "op('null1')[0]". Now op("null1")[0].exports is an empty array, as it doesn’t acknowledge the expression reference as it did the earlier export. How can I programmatically access expression references to clean them up before I call op("null1").destroy()?
I’ve seen mention of using the OP Find DAT to search for all operators in the network which contain a parameter reference to op("null1")[0], which sadly isn’t practical in my network due to performance limitations, plus the reference expressions aren’t guaranteed to always be the same string.
On the other hand, if I could create a CHOP Export in python, then I could avoid expressions altogether. E.g if I could do something like op("null1")[0].exportTo(op("level1").par.invert resulting in a traditional export, then I could presumably access this relationship later via the channel’s exports attribute. But exportTo isn’t a real method, and I haven’t found anything in the docs / various class methods suggesting this is possible.
Is there a way, given a Channel, to find all parameters in the network which derive their value from that Channel, similar to traditional channel exports? Or can traditional channel exports be created in python?