Here’s a snippet from a reader I made:
@smproperty.xml("""
<IntVectorProperty name="PadData"
label="Pad Data"
command="SetPadStatus"
number_of_elements="1"
default_values="1">
<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()