[Paraview] Moving geometry

Berk Geveci berk.geveci at kitware.com
Tue Jun 3 14:40:57 EDT 2008


Try loading the following script from the python shell (under Tools).
Watch out for line wrap. We can tweak this script to fit your needs
better.

from paraview import servermanager
sm = servermanager
rv = sm.GetRenderView().SMProxy
pm = sm.vtkProcessModule.GetProcessModule()
ans = None
for i in sm.ProxyManager().GetProxiesInGroup("animation").values():
  if i.IsA("vtkSMAnimationSceneProxy"):
    ans = i
    break
if ans:
  def callback(caller, *args):
    global rv
    rv.UpdateAllRepresentations()
    rv.ResetCamera()

  print pm.GetObjectFromID(ans.GetIDAsInt()).AddObserver("AnimationCueTickEvent",
callback, 1.0)


On Tue, Jun 3, 2008 at 12:42 PM, Rick Angelini(CISD/CIV)
<angel at arl.army.mil> wrote:
> I would like for the camera to follow the object
>
> Berk Geveci wrote:
>
> So you want the camera to follow the object or zoom out enough such
> that the object is always visible?
>
> -berk
>
> On Tue, Jun 3, 2008 at 11:11 AM, Rick Angelini(CISD/CIV)
> <angel at arl.army.mil> wrote:
>
>
> I have a time-varying dataset with a changing geometry - over time, the
> object moves along one of the axis and eventually moves off of the
> screen.    Is there a way to tie a camera (or some other mechanism) so that
> the object stays in a particular orientation on the screen for all of the
> timesteps.   If interactive analysis, it's not helpful to have the object
> falling off the edge of the screen...
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
>
>


More information about the ParaView mailing list