vtk event for about to load state ?


I’m creating a plugin that is doing some actions when a state file is being loaded. When i’m using the GUI, i can connect to pqApplicationCore::onStateAboutToLoad event.

This event doesn’t exist when I’m using pvbatch since pqApplication is only created for QApplication client. I tried to find a similar event in VTK. The closest I found is vtkCommand::LoadStateEvent but it’s only triggered after the state file is completely loaded.

Is there a way to connect to the onStateAboutToLoad signal when using pvbatch, or will a need to create a custom vtkCommand ?


Alas, currently there’s no event fired before loading state in vtkSMSessionProxyManager::LoadXMLState, as a result there’s no notification available in pvbatch for before loading state.

Ok, then I will create one.

thanks !