Dear Paraview developers,
I have a custom representation, which is a subclass of vtkXYChartRepresentation. It has a property and I want to manipulate its visibility depending on the input. I have created an information_only property to manage that. The xml configuration looks something like that:
<ChartRepresentationProxy base_proxygroup="representations"
base_proxyname="XYChartRepresentation"
class="vtkXYMyChartRepresentation"
name="XYMyChartRepresentation"
processes="client|dataserver|renderserver"
post_creation="SetChartTypeToLine">
<IntVectorProperty name="VisualizationType"
command="GetVisualizationType"
information_only="1"/>
<DoubleVectorProperty command="SetMyProperty"
default_values="0"
name="MyProperty"
number_of_elements="1">
<DoubleRangeDomain max="1"
min="0"
name="range" />
</DoubleVectorProperty>
</ChartRepresentationProxy>
Then I manipulate the VisualizationType in RequestData
int vtkXYMyChartRepresentation::RequestData(
vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
{
if (!this->Superclass::RequestData(request, inputVector, outputVector))
return 0;
VisualizationType = 1;
this->PlotDataHasChanged = true;
return 1;
}
However, the visibility of MyProperty doesn’t change depending on what value I set in RequestData, it is visible if I contruct it like VisualizationType{1} and invisible if VisualizationType{0}. The function GetVisualizationType() doesn’t seem to get called at all. What am I doing wrong and what are the ways to implement that kind of behaviour?