[Paraview] Replacement for colorByArray
Reuter, Michael A.
reuterma at ornl.gov
Fri Sep 5 09:24:24 EDT 2014
Hi,
I have an application that I’m trying to conform back to git-master in preparation for the version 4.2 release. In the application, I used the pqPipelineRepresentation::colorByArray function to preset the colormap array before the data is rendered. I see that this function has been removed. I did a bit of digging and tried to use the following as a replacement (signal is our default array name):
pqDataRepresentation *drep = objectBuilder->createDataRepresentation(…);
vtkSMPropertyHelper(drep->getProxy(), “Representation”).Set(“Surface”);
vtkSMPropertyHelper(drep->getProxy(), “ColorArrayName”).Set(“signal”);
drep->getProxy()->UpdateVTKObjects();
However, this doesn’t seem to set the correct array as the view shows Solid Color for the array when it renders. I’m either invoking things incorrectly or at the wrong time, but I don’t know what. What am I missing or is there a more appropriate alternative to this method?
Thanks,
M
Dr. Michael Reuter
Scientific Data Analysis Group
Neutron Data Analysis and Visualization Division
Oak Ridge National Laboratory
Office: 1-865-241-7216
Fax: 1-865-574-6080
Email: reuterma at ornl.gov<mailto:reuterma at ornl.gov>
More information about the ParaView
mailing list