I’m trying to use a custom render function (call_render from the python_view module) for a PythonView instance. If I write a render(view, width, height) function in the Script tab, it works just fine.
Then I tried renaming my render function to render2 and the call_render call below it.
For example python_view.call_render(render2, view, 300, 300).
I don’t understand though what exactly should I pass as the view argument? It should be a vtkPythonView class instance, but how can I access it?
I tried something like FindView(“PythonView1”).SMProxy.GetClientSideView(), which technically returns vtkPythonView class, but this approach does not work.
I need this because it seems that multiple PythonView instances will all use the same render function, even if the code in each view’s Script window is completely different. Whichever render function was modified last is the one used to render all PythonViews. Thought that using custom render functions would solve this issue.