If I change name=Center
to name=Center label=The Center
on this line ParaView/Examples/Plugins/PythonAlgorithm/PythonAlgorithmExamples.py at master · Kitware/ParaView · GitHub
and then attempt to execute the plugin from the Python shell using
PythonbasedSuperquadricSourceExample(Center=(0,0,1))
I get
AttributeError: Attribute Center does not exist. This class does not allow addition of new attributes to avoid mistakes due to typos. Use add_attribute() if you really want to add this attribute.
This error goes away if I set label=Center
. Is there a way to have label
differ from name
in a property for a plugin? I am creating a plugin it will be useful for the label to be a bit more informative. A related issue is that when hovering over a label in the menu, I don’t see a pop-up that shows the documentation. If there was a way to show the documentation, then having a label different from the name would not be as important.
Note that if I select PythonbasedSuperquadricSourceExample
from the Sources
menu, I see that the label in the properties menu is The Center
as desired and there is no error. So it seems that the label can be different, but that the labels are used to determine what the valid keyword arguments are for a plugin.