Expose tyflow interface and classes to custom C# dll
#1
I can't see an obvious way to expose the Tyflow interface and classes so they can be used by a custom C# dll.  There is no type library etc.  For example if from a tyflow operator script I call a custom C# dll, and within that dll I want to call back into the tyflow interface.

The other way around would be to have a mechanism that can share script code between script operator nodes in different events - an ability which I don't believe currently exists?  I tried to hack around with the same script operator copy and pasted instanced into different events, and use a rollout float parameter to switch the specific between code paths in the script operator instance, but as the float parameters are instanced and not specific to the related script instance that doesn't work.  I guess I could use the specific event ID as a manually coded value to switch code paths but that is getting very messy.

Currently I have resorted to copying and pasting code that uses tyflow interface and classes between different script operators unfortunately :-(

Maybe I am missing some other better way?
  Reply
#2
Yes the tyFlow interface is contained in a hidden class whose name changes each time the script is recompiled (C# execution through MAXScript - the mechanism I use to instantiate C# classes - doesn't allow local recompilation of individual classes...so the class name has to change anytime the class itself changes)...so it's not feasible to access that class elsewhere by name (you'd have to pass it as an object).
  Reply


Forum Jump: