

def testNodeMetadata(self):
    s = Gaffer.ScriptNode()
    s['b'] = Gaffer.Box()
    Gaffer.Metadata.registerNodeValue(s['b'], 'description', 'Test description')
    Gaffer.Metadata.registerNodeValue(s['b'], 'nodeGadget:color', IECore.Color3f(1, 0, 0))
    s['b'].exportForReference('/tmp/test.grf')
    self['r'] = Gaffer.Reference()
    s['r'].load('/tmp/test.grf')
    self.assertEqual(Gaffer.Metadata.nodeValue(s['r'], 'description'), 'Test description')
    self.assertEqual(Gaffer.Metadata.nodeValue(s['r'], 'nodeGadget:color'), IECore.Color3f(1, 0, 0))

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/ReferenceTest.py ReferenceTest.testNodeMetadata/VarMisuse@80/129 `s`->`self`