

def __applyFormat(self, unused, fmt):
    with Gaffer.UndoContext(self.getPlug().ancestor(Gaffer.ScriptNode)):
        Gaffer.Metadata.registerPlugValue(self.getPlug(), 'formatPlugValueWidget:mode', 'standard', persistent=False)
        self.getPlug().setValue(fmt)

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferImageUI/FormatPlugValueWidget.py FormatPlugValueWidget.__applyFormat/original