import Gaffer # Create a new Gaffer node node = Gaffer.Node() # Create a new Color3fPlug color = Gaffer.Color3fPlug( defaultValue=(1, 1, 1) ) # Add the Color3fPlug to the node node.addChild( color )
import Gaffer # Create a new Gaffer node node = Gaffer.Node() # Create a new Color3fPlug color = Gaffer.Color3fPlug( defaultValue=(0, 0, 0) ) # Add the Color3fPlug to the node node.addChild( color ) # Set the value of the Color3fPlug color.setValue( (1, 0, 0) ) # Get the value of the Color3fPlug print( color.getValue() )In this example, we create a new Gaffer node and a Color3fPlug. We set the default value of the plug to black (0, 0, 0) and add it to the node. We then set the value of the plug to red (1, 0, 0) and print out its value. Package Library: The Color3fPlug class is part of the Gaffer python module. The Gaffer module is included with the Gaffer application and is not a separate package.