Unload plugin DLL?

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

  • westechiewestechie Posts: 17

    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.

  • westechie said:

    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?

  • westechiewestechie Posts: 17

    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.

  • westechie said:

    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?

    A restart is required, I'm afraid.

  • westechie said:

    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?

    A restart is required, I'm afraid.

    Thanks for the confirmation, Richard. And this would not be so bad if it weren't for the fact that my test scene had about 300 frames of dForce simulation in it. Even though I changed everything to Static Surface, and set the number of frames to 1, the duf file remains huge and takes a very long time to load. Is there a way to "clean out" the cruft that accumulates, so that Daz only saves/loads the one frame? Thanks!
  • TheMysteryIsThePointTheMysteryIsThePoint Posts: 2,882
    edited December 2020

    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.

    Post edited by TheMysteryIsThePoint on
Sign In or Register to comment.