import Gaffer objPlug = Gaffer.ObjectPlug( "myObjectPlug", Gaffer.Plug.Direction.In, {} ) objValue = { "name": "John", "age": 30 } objPlug.setValue( objValue )
import Gaffer objPlug1 = Gaffer.ObjectPlug( "objPlug1", Gaffer.Plug.Direction.In, {} ) objPlug2 = Gaffer.ObjectPlug( "objPlug2", Gaffer.Plug.Direction.Out, {} ) objPlug1.setInput( objPlug2 ) objValue = { "name": "John", "age": 30 } objPlug2.setValue( objValue ) print( objPlug1.getValue() )In this example, we create two ObjectPlugs and connect them together so that objPlug1 is downstream of objPlug2. We then set the value of objPlug2 and print out the value of objPlug1, which should be the same as objPlug2. Package library: Gaffer.