[Paraview] Please help!! How to force Render() from a reader

Takuya OSHIMA oshima at eng.niigata-u.ac.jp
Fri Oct 23 22:42:46 EDT 2009


Hi Mark,

Here are what I have tried within my custom reader panel (a subclass
of pqAutoGeneratedObjectPanel) so far and working fine for me. But I
may be wrong as Fabian reported the third one didn't for him.
( http://www.paraview.org/pipermail/paraview/2009-October/014074.html )

  // 1. If one is happy with only updating the active view
  if(this->view()) // may be null if no active view is present
    {
    this->view()->render();
    }

  // 2. All relevant views may be rendered this way, where Ps is a
  // pqPipelineSource (a subclass of pqProxy) passed to the constructor
  // of the reader panel class
  this->Ps->renderAllViews();

  // 3. All views including irrelevant ones may be rendered by
  pqApplicationCore::instance()->render();

  // 4. Or there may be another way something like
  vtkSMProxyIterator *pIt = vtkSMProxyIterator::New();
  pIt->SetModeToOneGroup();
  for(pIt->Begin("views"); !pIt->IsAtEnd(); pIt->Next())
    {
    vtkSMViewProxy::SafeDownCast(pIt->GetProxy())->StillRender();
    }
  pIt->Delete();

Takuya

Takuya OSHIMA, Ph.D.
Faculty of Engineering, Niigata University
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN

From: "Olesen, Mark" <Mark.Olesen at emcontechnologies.com>
Subject: RE: [Paraview] Please help!! How to force Render() from a reader
Date: Fri, 23 Oct 2009 02:25:54 +0200

> On a related tangent to the rendering issue:
> What method is needed to get the 3d view window to refresh.
> I have a customized reader panel with a few Qt checkboxes.
> When I select, for example, "Add Labels", the slot sends it to the server manager and it is correctly updated.
> However, the text labels themselves don't appear in the window until I do something else like resizing the window, clicking something, etc.
> 
> What method should be I using?
> 
> /mark


More information about the ParaView mailing list