How are plugin python wrappings formed based on XML?

Hello dear Paraview developers!

I have a widget which directly communicated with server part and sets some comples logic for my custom filter

However it does not seem to work via python.

I understand that is should not, because I wrote all logic by hands in my custom widget in c++ and client-server-streams.

But now I need python and dont know where to start
Help me please

Sincerely yours,
Mike

python only sees the XML properties, you should be able to modify these properties using python.

The widget you wrote in C++ can work with python.
Use the vtkPythonInterpreter class in C++ and then you can run python script string from C++.
I have used the same in my project, and it really helps to enjoy the flexibility of C++ while utilizing the simplicity of python for certain tasks. It was very useful and fun!

In your custom build, remmeber to enable relevant cmake variables and then you can access the vtkPythonInterpreter class for development. Cheers!

I think I misinterpreted your question. Initially, I thought you wanted to run some python from your C++ code. If that was the case, then my previous comment would have been very relevant. This is because writing plugin code in C++ offers good flexibility but sometimes it is convienient to call an already available single-line python function instead of writing too much code in C++. In such scenarios, I used vtkPythonInterpreter class to call python from C++, and it worked very well!

After reading your post again, I feel that it also sounds like you want to use python separately and do stuff in addition to your C++ logic, and you don’t know where to start?

  • ParaView’s standard online documentation will definitely give you a good start.
  • ParaView’s source code has got an “Examples” folder, and it is pure gold.

Cheers!