In the reader plugin I’m writing I’m trying to add helping information but there’s something that I don’t understand. For example if I put the following decorated function:
@smproperty.stringvector(name="FileName", panel_visibility="advanced", animateable="0", no_custom_default="1") @smdomain.filelist() @smhint.filechooser(extensions="ext", file_description="my file type") def SetFileName(self, name): """Specify filename for the file to read.""" if self._filename != name: if name!="None": self._filename = name self.Modified()
The FileName property is correctly available and the reader is ok. But I would like to add a tooltip in the GUI to show info about this box (I’ve done this example but the same need is also for all the other properties my reader needs).
So I’ve tried to use the old xml property specification by substituting the first decorator with:
@smproperty.xml(""" <StringVectorProperty name="FileName" command="SetFileName" number_of_elements="1" panel_visibility="advanced" animateable="0" no_custom_default="1"> <Documentation>Filename (extension .ext in Hdf5 Format) to be read</Documentation> </StringVectorProperty>""")
The strange behaviour is that the tooltip is now correctly added but if I open from paraview an input file the association of the reader is ok but the SetFile function is not called before RequestInformation as it was before.
Moreover, if I try to use the same plugin in a pvbatch script or with pvpython everything seems ok and if I use help() function on the source corresponding to the reader it correctly shows also the Documentation information for the FileName property.
Which is the correct way of adding Documentation for pythonAlgorithm plugins?
By the way I’ve never been able to populate the Help panel (the one that is shown clicking on the “?” button) for a python plugin. I’ve tried to decorate the class with:
bla bla bla
bla bla bla
and it correctly appears in pvpython when I use help() function but If I click on the “?” button in Paraview only general Paraview doc appears.
Thank you in advance for any help.