Commit b8c7929c authored by David E. DeMarle's avatar David E. DeMarle
Browse files

let ray tracers respect server side widget visibility

In paraview client server mode with server side rendering
widgets can not be hidden with Ray Tracing enabled. The underlying
problem is that vtkSceneGraph deals with a select few vtkProp
child classes (Volumes and Mappers mostly). WidgetRepresentations
in particular were intentionally avoided in the first OSPRay project
and have not been revisited.

Widgets mostly work depite that, because Representations add their
internal Actors to the scene. What doesn't work is that
the containing Representation never gets a chance to control
the children without the accompanying Widget instance, which is not
present on the server side.

This change fixes this widget, but a proper fix will be to do
something like add WidgetRepresentation to SceneGraph.
parent 0c69613f
......@@ -1797,3 +1797,18 @@ void vtkImplicitPlaneRepresentation::RegisterPickers()
}
pm->AddPicker(this->Picker, this);
}
//----------------------------------------------------------------------
void vtkImplicitPlaneRepresentation::SetVisibility(vtkTypeBool nv)
{
this->Superclass::SetVisibility(nv);
this->OutlineActor->SetVisibility(nv);
this->CutActor->SetVisibility(nv);
this->EdgesActor->SetVisibility(nv);
this->ConeActor->SetVisibility(nv);
this->LineActor->SetVisibility(nv);
this->ConeActor2->SetVisibility(nv);
this->LineActor2->SetVisibility(nv);
this->SphereActor->SetVisibility(nv);
}
......@@ -436,6 +436,11 @@ public:
}
//@}
/**
* Overridden to pass on to internal actors for ray tracers to see.
*/
virtual void SetVisibility(vtkTypeBool) override;
protected:
vtkImplicitPlaneRepresentation();
~vtkImplicitPlaneRepresentation() override;
......
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