

def _updateFromPlug(self):
    value = None
    if (self.getPlug() is not None):
        with self.getContext():
            try:
                value = self.getPlug().getValue()
            except:
                pass
    text = ''
    if (value is not None):
        if (not len(value)):
            text = 'None'
        else:
            text = ''.join(value)
    self.__menuButton.setText(text)
    self.__menuButton.setEnabled(self._editable())

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferImageUI/ChannelMaskPlugValueWidget.py ChannelMaskPlugValueWidget._updateFromPlug/original