Hello, I’m making a custom operator CHOP that exposes python functions which means I can’t load my built DLL into a CPlusPlusCHOP. Whenever I make a change to my operator while developing I’d like to be able to overwrite my plugin DLL in the Plugins folder with copy but I get the error
The process cannot access the file because it is being used by another process.
To overcome this I need to close TouchDesigner, overwrite my DLL, and then relaunch TouchDesigner. Has anyone found a better workflow for developing a custom operator that doesn’t require closing and relaunching so many times.
For a recent project that was heavily c+±based I set up a “Run” target in Visual Studio that launched a tester project in the appropriate TD version. That makes it possible to easily launch it and to attach a debugger to it. It does mean re-launching when you make a change though. So I put in some features to make it easy to get the running project into the relevant state (recalling parameter values etc).
No the option is only in the CPlusPlus CHOP. If you do find that feature quicker for developing, one option may be to develop as a CPlusPlus CHOP, only creating the custom operator afterwards.
I had a similar issue. I was able to get it to load when building with the Release profile. But for some reason the debug profile builds depend on a different version of the python runtime dll that isn’t available by default.
You can still debug the release builds but some variables aren’t viewable and stack traces sometimes skip things if they get inlined by the compiler.
Thanks for the help. I’ve managed to get the “plugin” to work when debugging but like @rob said I need to load it as a CPlusPlus CHOP (I’ll deal with the python stuff once I get all of my main functionality done). Additionally like @tekt said I am debugging with the “Release” build.
I’ve used visual studio debug to launch the TD process and set the linker output directory to the touch plugins folder. So every time I run as debug it launches the touch file with the new plugin version.