ExposedProperties label is not used to wrap the property in python
In ParaView, the label is used to generate the python wrapping of a property, eg:
<IntVectorProperty command="SetNumberOfScalarComponents"
default_values="1"
name="NumberOfScalarComponents"
label="MyPrettyLabel"
number_of_elements="1">
<IntRangeDomain name="range" />
<Documentation>This property specifies the number of components the
scalar value at each pixel or voxel has (e.g., RGB - 3 scalar
components).</Documentation>
</IntVectorProperty>
It will allow to run :
reader.MyPrettyLabel
instead of using NumberOfScalarComponents
.
However, when exposing a property of a subproxy through ExposedProperty, eg:
<SubProxy>
<Proxy name="Reader"
proxygroup="internal_sources"
proxyname="ImageReaderCore"></Proxy>
<ExposedProperties>
<Property name="DataScalarType" />
<Property name="DataByteOrder" />
<Property name="DataOrigin" />
<Property name="DataSpacing" />
<Property name="NumberOfScalarComponents" />
<Property name="FileLowerLeft" />
<Property name="ScalarArrayName" />
</ExposedProperties>
</SubProxy>
The label is used to generate the proxy GUI, but not to wrap the proxy in python.
To reproduce:
- In
VTKExtensions/IOImage/Resources/readers_pv_ioimage.xml
, add a label to NumberOfScalarComponents RAW image reader proxy - Rebuild paraview
- Run paraview
- Open a .raw
- Label is correct in ui
- Open python shell
s=GetActiveSource()
s.MyPrettyLabel -> KO
s.NumberOfScalarComponents -> OK
FYI @cory.quammen