How to access C++ class from python that’s client-side only and has no XML file to wrap?
As part of our application, I have implemented (via events) C++ class that allows camera to follow object. I have GUI toolbar with buttons for controlling the behaviour, e.g. to enable/disable tracking. This “behavior” class as well as toolbar exists on client side as I’m only interacting with client-side camera and both are part of one plugin. The behavior class is implemented as singleton which registers all existing render views.
Now, we are using python scripts for project files that get loaded on start-up and I’d like to setup the object tracking behaviour there (like, what object to track). So I need to access my C++ singleton from python and interact with the class. However, I haven’t found a way to do that yet. Could anyone point me in direction, maybe existing plugin or documentation?
One thing I noticed when going through existing implementation of some PV python scripts - they import classes from
paraview.module namespace. I believe this gives access to any C++ PV class from Python and is basically what I need. However, our custom modules are not listed there and I suppose this is because they come from plugin, not application itself. If there was a way to achieve similar for plugins, that would be perfect.