Unload plugin DLL?
TheMysteryIsThePoint
Posts: 2,946
The edit, compile, debug cycle would be greatly accelerated if I didn't have to quit Daz and reload the test scene every iteration. Does anyone know of a means to unload a plugin's DLL and reload it without restarting?
Thanks!
Comments
You can try accessing the Help menu at the top, and then, click on About Installed Plugins. This should allow you to enable and disable your various plugins, but it still might require a Restart of DAZ Studio, depending on the plugin.
Thanks for you input.
But enabling and disabling my plugin doesn't seem to have any effect at all... it remains in the Edit menu and works regardless of the state it is in. Is there some callback in the plugin that is supposed to handle loading/unloading itself?
Historically, "static" stuff always stays in memory. Other wise, it can be loaded and un-loaded. This is in response to both this posting and your other.
A restart is required, I'm afraid.
Having to restart DS and re-load test scene files that sometimes take minutes to load at every iteration of the dev cycle was really making everything less fun. So I took a detour from my normal activities and wrote a framework plugin that acts as a shim for loading and unloading plugin DLLs such updating the DLL in Visual Studio is possible without having to restart DS.
All that is required for a plugin to support it is good separation of the Action code from the core plugin code; i.e. creating an exported entry point function entryPoint() that performs the plugin's functioonality, without reference to the GUI that normally invokes it.
But while I am a good POSIX systems programmer, I haven't been good at Win32 for probably 20 years :) and the framework plugin, while it appears to work, is probably pretty sloppy in places, has insidious bugs in waiting, and/or is Broken By Design(tm). I'd appreciate the eyeballs of anyone who is actually a good Win32 systems programmer.
PM me if you'd like to help out and/or use this in your SDK dev effforts.