A custom HDK operator example with an option to reload changes at runtime, to retain the state of the loaded scene.
Update the CMakeLists.txt to point to Houdini installation directory ($HFS).
The make install
copies the host shared library to the dso folder inside $HOME/houdini18.0.
mkdir __build
cd __build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/houdini18.0/dso
make install
The reload is currently associated with the scene reload callback. (see the linked demo1.mp4)
Houdini OP_OperatorTable - does not handle reloading previously loaded dsos. There some existing references being created during plugin registration (HOM etc) and there is no API (that I know of) to handle this. To workaround this, on every new build we create a new shared object file keeping the plugin internal name (hdk_dualstar) unchanged. Loading a new dso containing same symbols should override and update existing operator (OP_Operator) as expected.
There is a possible way to improve state of things by at the cost of increasing code bloat of current solution. This would require to increment the internal node type (hdk_dualstar) during each built (and change each time the type during reload in Houdini session).