The included script is designed to allow the user to manipulate the camera position, the first test I wrote<br>was the ability to reset the camera to positive X, negative Y etc. The problem is that the changes to the camera
<br>position are not updating untill I actually manually focus the render window. I presume the problem is that I am <br>not updating a key component. Can anybody tell me what one I am missing?<br><br>#!/usr/bin/env python
<br><br>import paraview<br>#camera is an already defined class<br>class Cam:<br>&nbsp; def PosX(self):<br>&nbsp;&nbsp;&nbsp; Cam.__Reset(self,1, 0, 0, 0, 0, 1)<br>&nbsp; def NegX(self):<br>&nbsp;&nbsp;&nbsp; Cam.__Reset(self,-1, 0, 0, 0, 0, 1)<br>&nbsp; def PosY(self):
<br>&nbsp;&nbsp;&nbsp; Cam.__Reset(self,0, 1, 0, 0, 0, 1)<br>&nbsp; def NegY(self):<br>&nbsp;&nbsp;&nbsp; Cam.__Reset(self,0, -1, 0, 0, 0, 1)<br>&nbsp; def PosZ(self):<br>&nbsp;&nbsp;&nbsp; Cam.__Reset(self,0, 0, 1, 0, 1, 0);<br>&nbsp; def NegZ(self):<br>&nbsp;&nbsp;&nbsp; Cam.__Reset(self,0, 0, -1, 0, 1, 0);
<br>&nbsp; #Private Methods<br>&nbsp; def __Reset(self,look_x, look_y, look_z,up_x,up_y,up_z):&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; pxm = paraview.pyProxyManager()<br>&nbsp;&nbsp;&nbsp; iter = pxm.group_iter(&quot;view_modules&quot;)<br>&nbsp;&nbsp;&nbsp; activeView = None<br>&nbsp;&nbsp;&nbsp; for proxy in iter:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if proxy.IsA(&quot;vtkSMRenderModuleProxy&quot;):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activeView = proxy<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break<br>&nbsp;&nbsp;&nbsp; if activeView:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activeView.SetCameraPosition(0, 0, 0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activeView.SetCameraFocalPoint(look_x,look_y,look_z)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activeView.SetCameraViewUp(up_x,up_y,up_z)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activeView.ResetCamera()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activeView.UpdateVTKObjects()<br>