Hi,
Is there a way to set an intvector
with a boolean domain for a Python Plugin? What I’m trying to do is have a checkbox in the GUI. I don’t see how to do that for a Python Plugin.
Thanks,
Andy
Hi,
Is there a way to set an intvector
with a boolean domain for a Python Plugin? What I’m trying to do is have a checkbox in the GUI. I don’t see how to do that for a Python Plugin.
Thanks,
Andy
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()
Thanks – that’s exactly what I was looking for.