PythonAlgorithm plugins: properties are sorted by command attribute
In the example PythonAlgorithm plugin
Examples/Plugins/PythonAlgorithm/PythonAlgorithmExamples.py, the properties are sorted by the
command attribute, which is rather arbitrary and does not offer any control over the ordering of UI elements in the interface. For example, the properties
PythonSuperquadricSource have this order:
['GetStrings', 'GetValueRange', 'SetCenter', 'SetPhiResolution', 'SetScale', 'SetString', 'SetThetaResolution', 'SetThickness', 'SetValue']
which isn't terribly useful, i.e., you can't hack the order by changing the property name, for instance.
Instead, we shoul have an
order attribute that can be passed to the
smproperty decorators or something similar to specify how they are ordered in the generated XML.
A possible workaround is to use property groups.