Documentation for Substance Automation Toolkit is now included in the SAT package. You can access the documentation by opening html-doc.zip inside your downloaded SAT package.
graph
Content included in graph module:
Module graph aims to define SBSObjects that are relative to a graph or a function, mostly SBSGraph, SBSFunction, SBSParamInput and SBSGraphOutput.
class graph.graph.SBSGraph(aIdentifier='', aUID='', aAttributes=None, aParamInputs=None, aPrimaryInput=None, aGraphOutputs=None, aCompNodes=None, aBaseParameters=None, aGUIObjects=None, aOptions=None, aRoot=None, aPresets=None, aMetaDataTree=None, aGraphType=None)
Bases: pysbs.common_interfaces.sbsobject.SBSObject, pysbs.common_interfaces.basegraph.Graph, pysbs.common_interfaces.metadata.SBSMetaDataObject
Class that contains information on a compositing graph as defined in a .sbs file
- Members:
- mIdentifier (str): name of the graph (name of the definition and the instance if applicable).
- mUID (str): unique identifier in the package/ context.
- mAttributes (SBSAttributes): various attributes
- mParamInputs (list of SBSParamInput): list of parameters and compositing inputs of the graph.
- mPrimaryInput (str, optional): The uid of the primary (image) input (paramInputs/uid).
- mGraphOutputs (list of SBSGraphOutput): list of compositing outputs of the graph.
- mCompNodes (list of SBSCompNode): compositing nodes, the graph definition.
- mBaseParameters (list of SBSParameter): common authoring parameters.
- mGUIObjects (list of SBSGUIObject, optional): GUI specific objects.
- mOptions (list of SBSOption): list of specific options.
- mRoot (SBSRoot, optional): Appears when the graph is a root (root graphs outputs are directly computed at runtime, cooking always needed).
- mPresets (SBSPreset, optional): list of user-defined presets
- mMetaDataTree (SBSMetaDataTree, optional): metadata tree
- mGraphType (str, optional): graph type
 
addInputParameter(aIdentifier, aWidget, aDefaultValue, aOptions = None, aDescription = None, aLabel = None, aGroup = None, aUserData = None, aVisibleIf = None)
Create a SBSParamInput with the given parameters and add it to the ParamsInput of the graph.
| Parameters: | 
 | 
|---|---|
| Returns: | The created  | 
changeInputParameterIdentifier(aDoc, aInputParamIdentifier, aNewInputParamIdentifier)
changeParamInputIdentifier(aDoc, aInputParamIdentifier, aNewInputParamIdentifier)
Change the param’s identifier and update its dependencies, function’s paramnode, visibleIf… Raise error if aNewInputIdentifier already exist graph’s input parameter identifiers. :param aDoc: the current substance document SBSDocument :type aDoc: SBSDocument :param aIdentifier: the new identifier value :type aIdentifier: str :return:
computeUniqueInputIdentifier(aIdentifier, aSuffixId = 0)
Check if the given identifier is already used in the graph inputs and generate a unique identifier if necessary
| Returns: | A unique identifier, which is either the given one or a new one with a suffix: identifier_id | 
|---|
computeUniqueOutputIdentifier(aIdentifier, aSuffixId = 0)
Check if the given identifier is already used in the graph outputs and generate a unique identifier if necessary
| Returns: | A unique identifier, which is either the given one or a new one with a suffix: identifier_id | 
|---|
connectNodes(aLeftNode, aRightNode, aLeftNodeOutput = None, aRightNodeInput = None)
Connect the given nodes together: aLeftNode(on the output aLeftNodeOutput) -> aRightNode(on the input aRightNodeInput). If the right node input is None, the connection will be done on the first input of the right node. If the left node output is None, the connection will be done on the first compatible output of the left node.
| Parameters: | 
 | 
|---|---|
| Returns: | The connection if success, None otherwise (in case of type incompatibility for instance) | 
| Raise: | 
 | 
contains(aNode)
Check if the given node belongs to this graph
| Parameters: | aNode ( SBSCompNodeor str) – The node to check, as a, object or an UID | 
|---|---|
| Returns: | True if the given node belongs to the node list, False otherwise | 
copyCompNode(aCompNode)
Create a simple copy of the given CompNode with a new UID.
| Parameters: | aCompNode ( SBSCompNode) – the node to copy | 
|---|---|
| Returns: | The new SBSCompNodeobject | 
createBitmapNode(aSBSDocument, aResourcePath, aGUIPos = None, aParameters = None, aInheritance = None, aResourceGroup = 'Resources', aCookedFormat = None, aCookedQuality = None)
Create a new ‘bitmap’ node and add it to the CompNodes of the graph. Create the referenced resource if necessary, as a Linked resource. If you want to import the resource, use first SBSDocument.createImportedResource() and then SBSGraph.createBitmapNode() with the internal path to the imported resource (pkg:///…).
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
createComment(aCommentText='Comment', aGUIPos=None, aLinkToNode=None)
Create a new comment. If aLinkToNode is not None, this comment will be linked to the given node, and the given GUI position must be relative to this node.
| Parameters: | 
 | 
|---|---|
| Returns: | The  | 
createCompFilterNode(aFilter, aGUIPos = None, aParameters = None, aInheritance = None)
Create a new compositing node filter and add it to the CompNodes of the graph.
- Note:
- For a Bitmap node, use createBitmapNode()instead.
- For a SVG node, use createSvgNode()instead.
- For a Gradient Map node, use createGradientMapNode()instead.
- For a Curve node, use createCurveNode()instead.
- For a Text node, use createTextNode()instead.
 
- For a Bitmap node, use 
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
createCompInstanceNode(aSBSDocument, aGraph, aGUIPos = None, aParameters = None, aInheritance = None)
Create a new compositing node instance which references the given graph, and add it to the CompNodes of the current graph.
- Note:
- The graph must be defined in the given SBSDocument.
- Use createCompInstanceNodeFromPath()to add an instance of a graph included in an external package.
 
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
| Raise: | 
 | 
createCompInstanceNodeFromPath(aSBSDocument, aPath, aGUIPos = None, aParameters = None, aInheritance = None)
Create a new compositing node instance which references the graph pointed by the given path, and add it to the CompNodes of the graph.
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
createCurveNode(aGUIPos = None, aParameters = None, aInheritance = None, aCurveDefinitions = None)
Create a new Curve filter and add it to the CompNodes of the graph.
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
createFrame(aSize, aFrameTitle='Frame', aCommentText='', aGUIPos=None, aColor=None, aDisplayTitle=True)
Create a new framed comment.
| Parameters: | 
 | 
|---|---|
| Returns: | The  | 
createFrameAroundNodes(aNodeList, aFrameTitle='Frame', aCommentText='', aColor=None, aDisplayTitle=True)
Create a new framed comment around the given nodes.
| Parameters: | 
 | 
|---|---|
| Returns: | The  | 
| Raise: | 
 | 
createGradientMapNode(aGUIPos = None, aParameters = None, aInheritance = None, aKeyValues = None)
Create a new Gradient Map filter and add it to the CompNodes of the graph.
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
createInputNode(aIdentifier, aColorMode = sbsenum.ColorModeEnum.COLOR, aGUIPos = None, aAttributes = None, aUsages = None, aSetAsPrimary = False, aParameters = None, aInheritance = None)
Create a new compositing node input with the appropriate color and add it to the CompNode list of the graph. Declare it as PrimaryInput if this is the first input node. Declare the new SBSParamInput
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
createInputValueNode(aIdentifier, aInputValueTypeEnum = sbsenum.InputValueTypeEnum.FLOAT1, aGUIPos = None, aAttributes = None, aUsages = None, aSetAsPrimary = False, aParameters = None, aInheritance = None)
Create a new input value node with the appropriate value type and add it to the CompNode list of the graph. Declare it as PrimaryInput if this is the first input node. Declare the new SBSParamInput
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
createIterationOnNode(aNbIteration, aNodeUID, aForceRandomSeed = False, aIncrementIteration = False, aGUIOffset = None)
Duplicate NbIteration times the given node, and connect each node with the previous one to create this kind of connection:
Node -> Node_1 -> Node_2 -> … -> Node_N
| Parameters: | 
 | 
|---|---|
| Returns: | The list of  | 
createIterationOnPattern(aNbIteration, aNodeUIDs, aNodeUIDs_NextPattern = None, aForceRandomSeed = False, aIncrementIteration = False, aGUIOffset = None)
Duplicate NbIteration times the given pattern of compositing nodes, and connect each pattern with the previous one to create this kind of connection:
Pattern -> Pattern_1 -> Pattern_2 -> … -> Pattern_N
It allows to completely define the way two successive patterns are connected.
For instance, provide aNodeUIDs = [A, B, C] and aNodeUIDs_NextPatternInput = [A’], if the pattern is A -> B -> C, and if C is connected to A’.
If aNodeUIDs_NextPatternInput is let empty, the function will try to connect the successive patterns by the most obvious way, respecting the input / output type (color / grayscale)
| Parameters: | 
 | 
|---|---|
| Returns: | The list of  | 
createMetaDataStr(aName, aValue)
Create a metadata of type Str.
| Parameters: | 
 | 
|---|---|
| Returns: | A  | 
createMetaDataUrl(aName, aResource)
Create a metadata of type Url.
| Parameters: | 
 | 
|---|---|
| Returns: | A  | 
createNavigationPin(self, aPinText, aGUIPos)
Create a new navigation pin.
| Parameters: | 
 | 
|---|---|
| Returns: | The  | 
createOutputNode(aIdentifier, aGUIPos = None, aAttributes = None, aOutputFormat = sbsenum.TextureFormatEnum.DEFAULT_FORMAT, aMipmaps = None, aUsages = None, aGroup = None)
Create a new compositing node output and add it to the CompNodes of the graph. Declare the new RootOutput and GraphOutput
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
createPreset(aLabel, aUsertags=None, setCurrentDefaultValues=False)
Create a new preset with the given label and usertags and add it to the preset list of this graph.
| Parameters: | 
 | 
|---|---|
| Returns: | the created preset as a  | 
createSvgNode(aSBSDocument, aResourcePath, aGUIPos = None, aParameters = None, aInheritance = None, aResourceGroup = 'Resources', aCookedQuality = None)
Create a new ‘svg’ node and add it to the CompNodes of the graph. Create the referenced resource if necessary, as a Linked resource. If you want to import the resource, use first SBSDocument.createImportedResource() and then SBSGraph.createSvgNode() with the relative path to the imported resource.
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
createTextNode(aGUIPos = None, aParameters = None, aInheritance = None, aCurveDefinitions = None)
Create a new Curve filter and add it to the CompNodes of the graph.
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
deleteComment(aComment)
Allows to delete the given comment from the graph.
| Parameters: | aComment ( SBSGUIObjector str) – The comment to remove, as a Comment or an UID. | 
|---|---|
| Returns: | True if success | 
| Raise: | api_exceptions.SBSImpossibleActionError | 
deleteFrame(aFrame)
Allows to delete the given frame from the graph.
| Parameters: | aFrame ( SBSGUIObjector str) – The frame to remove, as a Frame or an UID. | 
|---|---|
| Returns: | True if success | 
| Raise: | api_exceptions.SBSImpossibleActionError | 
deleteInputParameter(aInputParameter)
Allows to delete the given input parameter. If this is an input image, remove the corresponding Input node.
| Parameters: | aInputParameter ( SBSParamInputor str) – The input parameter to remove. | 
|---|---|
| Returns: | True if success | 
| Raise: | api_exceptions.SBSImpossibleActionError | 
deleteMetaData(aName)
Delete a metadata, return True if success.
| Parameters: | aName (str) – | 
|---|---|
| Returns: | bool | 
deleteNavigationPin(aNavigationPin)
Allows to delete the given navigation pin from the graph.
| Parameters: | aNavigationPin ( SBSGUIObjector str) – The navigation pin to remove, as a NavigationPin or an UID. | 
|---|---|
| Returns: | True if success | 
| Raise: | api_exceptions.SBSImpossibleActionError | 
deleteNode(aNode)
Allows to delete the given node from the graph. It removes it from the CompNode list, and delete all the connection from and to that node in the graph.
| Parameters: | aNode ( SBSCompNodeor str) – The node to remove, as a SBSCompNode or an UID. | 
|---|---|
| Returns: | True if success | 
| Raise: | api_exceptions.SBSImpossibleActionError | 
deletePreset(aPreset)
Allows to delete the given preset.
| Parameters: | aPreset ( SBSPresetor str) – The preset to remove, as a SBSPreset object or identified by its label. | 
|---|---|
| Returns: | True if success | 
| Raise: | api_exceptions.SBSImpossibleActionError | 
disconnectNodes(aLeftNode, aRightNode, aLeftNodeOutput = None, aRightNodeInput = None)
Disconnect the given nodes: aLeftNode(on the output aLeftNodeOutput) -> aRightNode(on the input aRightNodeInput). If the left node output and the right node input are None, all the connections will be removed.
| Parameters: | 
 | 
|---|---|
| Returns: | Nothing | 
| Raise: | 
 | 
duplicateNode(aCompNode, aGUIOffset = None)
Duplicate the given node, generate a new UID and add the node to the same node list than the source node.
| Parameters: | 
 | 
|---|---|
| Returns: | The new  | 
equals(other)
Check if this SBSObject is equivalent to the other SBSObject. Some members may be excluded from this check, the UIDs or GUILayout for instance.
exposeAsInputParameter(aDoc, aNode, aIdentifier, useIfExist=True)
exposeParamInput(aDoc, aNode, aIdentifier) Expose the parameter input identifier from a node to the current graph. The returned parameter will get the same identifier and default value will be the current value of the node’s input parameter.
| Parameters: | 
 | 
|---|---|
| Returns: | bool | 
exposeParamInput(**kwargs)
getAllComments()
Get all comments defined in the graph
| Returns: | a list of SBSGUIObject | 
|---|
getAllDependencyUID()
Get the UIDs of the dependencies used by this graph
| Returns: | a list of UIDs as strings | 
|---|
getAllFiltersOfKind(aFilter)
Search for all SBSCompNode which represents the given filter kind.
| Parameters: | aFilter ( FilterEnumstr) – kind of filters to look for | 
|---|---|
| Returns: | a list of SBSCompNodecontaining all filters of the given kind. | 
getAllFrames()
Get all frames defined in the graph
| Returns: | a list of SBSGUIObject | 
|---|
getAllGUIObjects()
Get all the GUI objects defined in the graph (Comments, Frames, Navigation Pins)
| Returns: | a list of SBSGUIObject | 
|---|
getAllInputGroups()
Get the list of all groups used for the inputs of the graph.
| Returns: | a list of groups as strings | 
|---|
getAllInputNodes()
Search for all SBSCompNode with a CompInputBridge implementation.
| Returns: | a list of SBSCompNodecontaining all input nodes of the graph. | 
|---|
getAllInputs()
Get the list of all input parameters (images and variables) defined on this graph
| Returns: | a list of SBSParamInput | 
|---|
getAllInputsInGroup(aGroup)
Get the list of all inputs (images and parameters) contained in the given group.
If aGroup is None, returns all the parameters that are not included in a group.
| Parameters: | aGroup (str) – The group of parameter to consider | 
|---|---|
| Returns: | a list of SBSParamInput | 
getAllMetaData()
Get all MetaData under dictionary form.
| Returns: | dict | 
|---|
getAllNavigationPins()
Get all the navigation pins defined in the graph
| Returns: | a list of SBSGUIObject | 
|---|
getAllNodeInstancesOf(aSBSDocument, aPath)
Search for all SBSCompNode with a CompInstance implementation, which reference the given graph path.
| Parameters: | 
 | 
|---|---|
| Returns: | a list of  | 
getAllNodes()
Search for all SBSCompNode.
| Returns: | a list of SBSCompNode. | 
|---|
getAllOutputNodes()
Search for all SBSCompNode with a CompOutputBridge implementation.
| Returns: | a list of SBSCompNodecontaining all output nodes of the graph. | 
|---|
getAllPresets()
Get all the presets defined on this graph
| Returns: | a list of Preset | 
|---|
getAllReferencesOnDependency(aDependency)
Get all the SBSCompNode that are referencing the given dependency
| Parameters: | aDependency (str or SBSDependency) – The dependency to look for (UID or object) | 
|---|---|
| Returns: | A list of SBSCompNode | 
getAllReferencesOnResource(aResource)
Get all the SBSCompNode that are referencing the given resource
| Parameters: | aResource (str or SBSResource) – The resource to look for (object or path internal to the package (pkg:///myGroup/myResource) | 
|---|---|
| Returns: | A list of SBSCompNode | 
getAllResourcesUsed(aParentDocument)
Get the list of resources used in this graph as a list of paths relative to the package
| Parameters: | aParentDocument ( SBSDocument) – Parent SBSDocument containing this graph | 
|---|---|
| Returns: | the list of resources used in this graph as a list of paths relative to the package (pkg:///…) | 
getAllowedAttributes()
Get the attributes allowed on a SBSGraph
| Returns: | the list of attribute enumeration allowed ( AttributesEnum) | 
|---|
getAttribute(aAttributeIdentifier)
Get the given attribute value
| Parameters: | aAttributeIdentifier ( AttributesEnum) – the attribute identifier | 
|---|---|
| Returns: | the attribute value if defined, None otherwise | 
getBaseParameterValue(aParameter)
Find a parameter with the given name/id among the overloaded parameters and the default graph parameters, and return its value.
| Parameters: | aParameter ( CompNodeParamEnumor str) – Parameter identifier | 
|---|---|
| Returns: | The parameter value if found (string or SBSDynamicValue, None otherwise | 
getCommentsAssociatedToNode(aNode)
Get the list of comments associated to the given node
| Parameters: | aNode ( SBSCompNodeor str) – The node to consider, as a SBSCompNode or given its UID | 
|---|---|
| Returns: | a list of SBSGUIObject | 
getConnectionsFromNode(self, aLeftNode, aLeftNodeOutput=None)
Get the connections starting from the given left node, from a particular output or for all its outputs.
| Parameters: | 
 | 
|---|---|
| Returns: | a list of  | 
getConnectionsToNode(self, aRightNode, aRightNodeInput=None)
Get the connections incoming to the given right node, to a particular input or for all its inputs.
| Parameters: | 
 | 
|---|---|
| Returns: | a list of  | 
getDefaultParentSize()
Get the default parent size option of this graph.
| Returns: | The parent size, as a list of two OutputSizeEnum: [width,height]. If not defined, return the default value [SIZE_256,SIZE_256] | 
|---|
getFirstInputOfType(aType)
Get the first ParamInput with the given type. This considers the variant types as compatible types.
| Parameters: | aType (sbsenum.ParamTypeEnum) – The required type | 
|---|---|
| Returns: | a SBSParamInputobject if found, None otherwise | 
getFirstOutputOfType(aType)
Get the first GraphOutput with the given type. This considers the variant types as compatible types.
| Parameters: | aType (sbsenum.ParamTypeEnum) – The required type | 
|---|---|
| Returns: | a SBSGraphOutputobject if found, None otherwise | 
getGraphInputNode(aInputImageIdentifier)
Get the input node which corresponds to the input image with the given identifier
| Parameters: | aInputIdentifier (str) – identifier of the input | 
|---|---|
| Returns: | a SBSCompNodeobject if found, None otherwise | 
getGraphOutput(aOutputIdentifier)
Get the graph output with the given identifier
| Parameters: | aOutputIdentifier (str) – identifier of the output | 
|---|---|
| Returns: | a SBSGraphOutputobject if found, None otherwise | 
getGraphOutputFromOutputNode(aOutput)
Get the graph output corresponding to the given output node
| Parameters: | aOutputNode ( SBSCompNodeor str) – The output node, as a SBSCompNode or given its UID | 
|---|---|
| Returns: | the corresponding SBSGraphOutputif found, None otherwise | 
getGraphOutputFromUID(aOutputUID)
Get the graph output with the given UID
| Parameters: | aOutputUID (str) – UID of the output to get | 
|---|---|
| Returns: | a SBSGraphOutputobject if found, None otherwise | 
getGraphOutputNode(aOutputIdentifier)
Get the output node which corresponds to the graph output with the given identifier
| Parameters: | aOutputIdentifier (str) – identifier of the output | 
|---|---|
| Returns: | a SBSCompNodeobject if found, None otherwise | 
getGraphOutputType(aOutputIdentifier)
Get the output type of the GraphOutput with the given identifier
| Parameters: | aOutputIdentifier (str) – identifier of the output | 
|---|---|
| Returns: | the output type in the format ParamTypeEnumif found, None otherwise | 
getGraphOutputWithUsage(aUsage)
Get the first GraphOutput which has the given usage defined
| Parameters: | aUsage ( UsageEnumor str) – usage to look for | 
|---|---|
| Returns: | a SBSGraphOutputif found, None otherwise | 
getGraphOutputs()
Get all the graph outputs
| Returns: | the list of SBSGraphOutputdefined on this graph | 
|---|
getGraphType()
| Returns: | str | 
|---|
getGraphTypeName()
| Returns: | str | 
|---|
getIcon()
Get the icon associated to this graph
| Returns: | The icon as a SBSIconif it exists, None otherwise | 
|---|
getIconBytes()
Get the icon stream bytes
| Returns: | The icon image data as bytes if possible, None otherwise | 
|---|
getIdentifier()
getIdentifer()
| Returns: | str identifier | 
|---|
getInput(aInputIdentifier)
Get the SBSParamInput with the given identifier, among the input images and input parameters
| Parameters: | aInputIdentifier (str) – input parameter identifier | 
|---|---|
| Returns: | the corresponding SBSParamInputobject if found, None otherwise | 
getInputFromUID(aInputUID)
Get the SBSParamInput with the given UID, among the input images and parameters
| Parameters: | aInputUID (str) – input parameter UID | 
|---|---|
| Returns: | the corresponding SBSParamInputobject if found, None otherwise | 
getInputImage(aInputImageIdentifier)
Get the input image with the given identifier
| Parameters: | aInputImageIdentifier (str) – input image identifier | 
|---|---|
| Returns: | a SBSParamInputif found, None otherwise | 
getInputImageFromInputNode(aInputNode)
Get the input image associated to the given input node
| Parameters: | aInputNode ( SBSCompNodeor str) – the input node as a SBSCompNode or a UID | 
|---|---|
| Returns: | The input image as a SBSParamInputif found, None otherwise | 
getInputImageIndex(aInputImageIdentifier)
Get the index of the given input image, among the list of ParamInput of kind image.
| Parameters: | aInputImageIdentifier (str) – input image identifier | 
|---|---|
| Returns: | the index of the input image as an integer if found, -1 otherwise | 
getInputImageWithUsage(aUsage)
Get the first input image which has the given usage defined
| Parameters: | aUsage ( UsageEnumor str) – usage to look for | 
|---|---|
| Returns: | a SBSParamInputif found, None otherwise | 
getInputImages()
Get the list of input images (inputs of kind ENTRY_COLOR | ENTRY_GRAYSCALE | ENTRY_VARIANT)
| Returns: | a list of SBSParamInput | 
|---|
getInputNode(**kwargs)
getInputParameter(aInputIdentifier)
Get the SBSParamInput with the given identifier, among the input parameters
| Parameters: | aInputParamIdentifier (str) – input parameter identifier | 
|---|---|
| Returns: | the corresponding SBSParamInputobject if found, None otherwise | 
getInputParameterFromUID(aInputParamUID)
Get the SBSParamInput with the given UID
| Parameters: | aInputParamUID (str) – input parameter UID | 
|---|---|
| Returns: | the corresponding SBSParamInputobject if found, None otherwise | 
getInputParameterIndex(aInputParamIdentifier)
Get the index of the given input parameter, among the list of ParamInput of kind variable.
| Parameters: | aInputParamIdentifier (str) – input parameter identifier | 
|---|---|
| Returns: | the index of the input parameter as an integer if found, -1 otherwise | 
getInputParameters()
Get the list of inputs parameters that are not input entries but numerical values
| Returns: | a list of SBSParamInput | 
|---|
getInputParametersInVisibleIfExpression(aVisibleIf)
Get the list of inputs parameters referenced in the given VisibleIf expression
| Parameters: | aVisibleIf (str) – the VisibleIf expression | 
|---|---|
| Returns: | a list of SBSParamInput | 
getInputValueParamFromInputNode(aInputNode)
Get the input value parameter associated to the given input node
| Parameters: | aInputNode ( SBSCompNodeor str) – the input node as a SBSCompNode or a UID | 
|---|---|
| Returns: | The input value parameter as a SBSParamInputif found, None otherwise | 
getMetaData(aName)
Get a MetaData by its name
| Parameters: | aName (str) – | 
|---|---|
| Returns: | SBSMetaDataTreeUrlorSBSMetaDataTreeStr | 
getNode(aNode)
Search for the given compositing node in the node list
| Parameters: | aNode ( SBSCompNodeor str) – node to get, identified by its uid or as aSBSCompNode | 
|---|---|
| Returns: | A SBSCompNodeobject if found, None otherwise | 
getNodeAssociatedToComment(aComment)
Get the node associated to the given comment.
| Parameters: | aComment ( SBSGUIObject) – The comment to consider | 
|---|---|
| Returns: | the SBSCompNodeif found, None otherwise | 
getNodeList(aNodesList = None)
Get all the compositing nodes of this graph, or look for the given nodes if aNodesList is not None
| Parameters: | aNodesList (list of str or list of SBSCompNode, optional) – list of node to look for, might be identifiers or .SBSNode | 
|---|---|
| Returns: | a list of SBSCompNodeincluded in the graph | 
getNodesConnectedFrom(aLeftNode, aOutputIdentifier=None)
Get all the nodes connected to the given output of the given node. If aOutputIdentifier is let None, consider all the outputs of the node.
| Parameters: | 
 | 
|---|---|
| Returns: | a list of  | 
getNodesConnectedTo(aRightNode, aRightNodeInput=None)
Get all the nodes connected to the given input of the given node. If aInputIdentifier is let None, consider all the inputs of the node.
| Parameters: | 
 | 
|---|---|
| Returns: | a list of  | 
getNodesDockedTo(aRightNode)
Get all the nodes that are docked to the given node.
| Parameters: | aRightNode ( SBSCompNode) – the node to consider, as an object or given its uid | 
|---|---|
| Returns: | a list of SBSCompNodecorresponding to the nodes that are docked to the given node. | 
getNodesInFrame(aFrame)
Get all the nodes included or partially included in the given frame. The frame must be included in this graph, otherwise SBSImpossibleActionError is raised
| Parameters: | aFrame ( SBSGUIObject) – The frame to consider | 
|---|---|
| Returns: | a list of SBSCompNode | 
getOption(aOptionName)
Get the option with the given name.
| Parameters: | aOptionName (str) – the name of the option to get, as saved in the .sbs file | 
|---|---|
| Returns: | the corresponding SBSOptionobject if found, None otherwise | 
getOptions()
Get the list of options defined in this graph.
| Returns: | a list of SBSOption | 
|---|
getOutputFormat()
Get the output format of this GraphOutput.
| Parameters: | aOutputNode – an Identifier | 
|---|---|
| Returns: | the output format TextureFormatEnumorParamTypeEnumif Value output, None otherwise. | 
getOutputMipmaps()
Get the output Mipmaps of this GraphOutput.
| Parameters: | aOutputNode – an Identifier | 
|---|---|
| Returns: | the output format TextureFormatEnumorParamTypeEnumif Value output, None otherwise. | 
getPreset(aPresetLabel)
Get the preset with the given label
| Returns: | a Presetobject if found, None otherwise | 
|---|
getPrimaryInput()
Get the UID of the primary input of the graph
| Returns: | The UID of the primary input as a string if it exists, None otherwise | 
|---|
getPsdExporterOptions()
Get the list of options related to the PSD exporter defined in this graph.
| Returns: | a list of SBSOption | 
|---|
getRect(aNodeList = None)
Get the rectangle occupied by all the nodes of this graph, or use only the given nodes if aNodeList is not None
| Parameters: | aNodeList (list of str or list of SBSCompNode, optional) – The list of node to take in account for the GUI rectangle. None to consider the node list pointed by itself. | 
|---|---|
| Returns: | A Rect | 
getSBSMetaDataTree()
Get the SBSMetaDataTree structure.
| Returns: | class .SBSMetaDataTree | 
|---|
getUidIsUsed(aUID)
Check if the given uid is already used in the context of the graph
| Parameters: | aUID (str) – UID to check | 
|---|---|
| Returns: | True if the uid is already used, False otherwise | 
getUserData(aNode)
Easy way to get userData / userTags associated to an outputCompNode or an inputCompNode. :param aNode: the associated node or UID node. :type aNode: SBSCompNode or str :return:the userTags value as str
isAPathBetween(self, aLeftNode, aRightNode)
Check if there is a path from the left node to the right node with the current connections.
| Parameters: | 
 | 
|---|---|
| Returns: | True if a path is found, False otherwise | 
isPrimaryInput(aInput)
Check if the given input is the primary input for this graph or not
| Parameters: | aInput ( SBSParamInput) – The input to check | 
|---|---|
| Returns: | True if this is the primary input, False otherwise | 
moveConnectionOnPinInput(aInitialNode, aTargetNode, aInitialNodeInput=None, aTargetNodeInput=None)
Allows to move the connection connected to the given pin input of the given node to the target pin input of the target node.
| Parameters: | 
 | 
|---|---|
| Returns: | 
 | 
| Raise: | 
 | 
moveConnectionsOnPinOutput(aInitialNode, aTargetNode, aInitialNodeOutput=None, aTargetNodeOutput=None)
Allows to move all the connections connected to the given pin output of the given node to the target pin output of the target node.
| Parameters: | 
 | 
|---|---|
| Returns: | 
 | 
| Raise: | 
 | 
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
reframeAroundNodes(aFrame, aNodeList)
Move and resize a frame to be around the given nodes.
| Parameters: | 
 | 
|---|---|
| Raise: | SBSImpossibleActionError | 
setAttribute(aAttributeIdentifier, aAttributeValue)
Set the given attribute
| Parameters: | 
 | 
|---|
setAttributes(aAttributes)
Set the given attributes
| Parameters: | aAttributes (dictionary in the format { AttributesEnum: value}) – The attributes to set | 
|---|
setBaseParameterValue(aParameter, aParamValue, aRelativeTo = sbsenum.ParamInheritanceEnum.ABSOLUTE)
Set the value of the given parameter to the given value.
| Parameters: | 
 | 
|---|---|
| Returns: | True if succeed, False otherwise | 
| Raise: | 
 | 
setDefaultParentSize(aWidth, aHeight)
Set the default parent size option on this graph.
| Parameters: | 
 | 
|---|
setDynamicBaseParameter(aParameter, aRelativeTo = None)
Set the given parameter as dynamic, to init its params.SBSDynamicValue. If Inheritance is None, the default Inheritance is set.
| Parameters: | 
 | 
|---|---|
| Returns: | the  | 
| Raise: | 
 | 
setGraphOutputType(aGraphOutputUID, aType)
Set the output channel type of the SBSGraphOutput with the given uid
| Parameters: | 
 | 
|---|
setGraphType(aGraphTypeEnum)
Set the graph type :param aGraphTypeEnum: the enum value to set :type aGraphTypeEnum: GraphTypeEnum
setIcon(aIconAbsPath)
Set the given image as the icon of the graph. The provided image won’t be re-sized to get a thumbnail, so we strongly recommend that you provide the path to a 128x128 image.
| Parameters: | aIconAbsPath (str) – The absolute path of the image to set | 
|---|---|
| Returns: | The SBSIconobject created | 
setInputImageIndex(aInputImageIdentifier, aIndex)
Set the index of the ParamInput of kind image with the given identifier
| Parameters: | 
 | 
|---|---|
| Raise: | 
 | 
setInputParameterIndex(aInputParamIdentifier, aIndex)
Set the index of the given input parameter among the list of ParamInput of kind variable
| Parameters: | 
 | 
|---|---|
| Raise: | 
 | 
setMetaDataName(aMetadata, aName)
Set name of a metadata if name is valid
| Parameters: | 
 | 
|---|
setMetaDataValue(aMetadata, aValue)
Set value of a metadata
| Parameters: | 
 | 
|---|
setOption(aOptionName, aOptionValue)
Set the given option with the given value.
| Parameters: | 
 | 
|---|---|
| Returns: | the created or modified  | 
setOutputChannel(**kwargs)
setPrimaryInput(aUID)
Set the UID of the primary input of the graph
| Parameters: | aUID (str) – UID of the input to set as primary | 
|---|
setUserData(aNode, data)
Easy way to set userData / userTags associated to an outputCompNode or an inputCompNode. :param aGraph: the graph where live the node. :type aGraph: SBSGraph :param aData: the data to set as value :type aData: str :return: bool
sortNodesAsDAG()
Sort the CompNode list of the graph to order them as a DAG. The member mCompNodes is updated.
| Returns: | the sorted node list. | 
|---|
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
| Parameters: | 
 | 
|---|