[Paraview] Coloring with vtkBlockColors
kenichiro yoshimi
rccm.kyoshimi at gmail.com
Mon Feb 27 06:13:58 EST 2017
Hi,
In order to color blocks by "vtkBlockColors", I just need to call
SetScalarColoring() like below:
vtkSMPVRepresentationProxy::SetScalarColoring(repr->getProxy(),
"vtkBlockColors", vtkDataObject::FIELD);
This may work even if "vtkBlockColors" array info is not contained in
vtkPVDataSetAttributesInformation although I do skip in this case.
Thanks,
yoshimi
> Hello all,
>
> I have a question over making a ParaView plugin. I try to set coloring
> with "vtkBlockColors" for a multi-block data set by conventional
> method:
> -----
> vtkPVDataSetAttributesInformation* attrInfo =
> dataInfo->GetFieldDataInformation();
> vtkPVArrayInformation* arrayInfo = attrInfo->GetArrayInformation(name);
> vtkSMPVRepresentationProxy::SetScalarColoring(repr->getProxy(),
> "vtkBlockColors", vtkDataObject::FIELD);
> -----
> But the above arrayInfo is always NULL though there exists a
> "vtkBlockColors" in field selection combo box with ParaView.
>
> I'd like to know the right way to do it.
>
> Kind regards,
> yoshimi
More information about the ParaView
mailing list