Commit da5b5959 authored by Ken Martin's avatar Ken Martin

add option to suppress rendering on PVRenderView

Can be useful in exporting a scene form PV without rendering
parent 6c9d7bad
......@@ -389,6 +389,7 @@ vtkPVRenderView::vtkPVRenderView()
this->Culler = vtkSmartPointer<vtkPVRendererCuller>::New();
this->ForceDataDistributionMode = -1;
this->PreviousDiscreteCameraIndex = -1;
this->SuppressRendering = false;
this->SynchronizedRenderers = vtkPVSynchronizedRenderer::New();
......@@ -1343,7 +1344,7 @@ void vtkPVRenderView::StillRender()
this->Internals->PreRender(this->RenderView);
this->Render(false, false);
this->Render(false, this->SuppressRendering);
vtkTimerLog::MarkEndEvent("Still Render");
}
......@@ -1357,7 +1358,7 @@ void vtkPVRenderView::InteractiveRender()
this->Internals->OSPRayCount = 0;
this->Internals->PreRender(this->RenderView);
this->Render(true, false);
this->Render(true, this->SuppressRendering);
vtkTimerLog::MarkEndEvent("Interactive Render");
}
......@@ -2224,6 +2225,7 @@ void vtkPVRenderView::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "UseLightKit: " << this->UseLightKit << endl;
os << indent << "SuppressRendering: " << this->SuppressRendering << endl;
}
//----------------------------------------------------------------------------
......
......@@ -202,6 +202,20 @@ public:
*/
void InteractiveRender() VTK_OVERRIDE;
//@{
/**
* SuppressRendering can be used to suppress the render within a StillRender
* or InteractiveRender. This is useful in cases where you want the
* representations mappers to be setup for rendering and have their data ready
* but not actually do the render. For example if you want to export the scene
* but not render it you must turn on SuppressRendering and then call
* StillRender
*/
vtkSetMacro(SuppressRendering, bool);
vtkGetMacro(SuppressRendering, bool);
vtkBooleanMacro(SuppressRendering, bool);
//@}
//@{
/**
* Get/Set the reduction-factor to use when for StillRender(). This is
......@@ -1094,6 +1108,15 @@ protected:
bool ShowAnnotation;
bool UpdateAnnotation;
// this ivar can be used to suppress the render within
// a StillRender or InteractiveRender. This is useful
// in cases where you want the representations mappers
// to be setup for rendering and have their data ready
// but not actually do the render. For example if you
// want to export the scene but not render it you must
// turn on SuppressRendering and then call StillRender
bool SuppressRendering;
// 2D and 3D interactor style
vtkPVInteractorStyle* TwoDInteractorStyle;
vtkPVInteractorStyle* ThreeDInteractorStyle;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment