Python Plugin Filter UI Missing Boolean (Checkbox)

I recently updated to ParaView 5.12.0 and found that a custom reader is now missing an element of the UI. Specifically, the “Pad Data” checkbox at the bottom of the properties is no longer visible.

Otherwise the plugin seems to function without issue.

What do I need to change in the code to make the checkbox visible?

The specific associated code:

@smproperty.xml("""
    <IntVectorProperty name="PadData"
        label="Pad Data"
        command="SetPadStatus"
        number_of_elements="1"
        default_values="1"
        panel_visibility="always">
        <BooleanDomain name="bool" />
        <Documentation>If checked, dataset will be padded at all timestates
            to ensure consistent block indices</Documentation>
    </IntVectorProperty>
    """)
def SetPadStatus(self, val):
    '''Set attribute to signal whether data should be padded when RequestData is called
    '''
    self.pad_data = val
    self.Modified()

That is strange. Nothing that comes to mind should have changed boolean int vector properties from being shown as a checkbox. Let me investigate.

Oh and when I say updated to 5.12, that’s coming from 5.9. So the different behavior could be present in 5.10 or 5.11. I can test against those versions if that gives you some guidance.

If you remove panel_visibility="always", you’ll see the checkbox. AFAICT “always” is not a valid setting for this property. Logic may have changed in the GUI code since 5.9 that causes ParaView to treat an unknown visibility attribute the same as “never”.

Interesting. Thanks so much!

1 Like