User Guide Cancel

basegraph | Substance 3D Automation ToolKit

basegraph

Module basegraph aims to define base classes related to the graphs in .sbs and .sbsar packages:
class common_interfaces.basegraph.BaseGraph(aIdentifier, aParamInputs)
class common_interfaces.basegraph.BaseGraph(aIdentifier, aParamInputs)
 class common_interfaces.basegraph.BaseGraph(aIdentifier, aParamInputs)  

Bases: object

Class used to provide a common interface between a Graph and a MDLGraph.

Members:
  • mIdentifier: Unique identifier of the graph
  • mParamInputs: Absolute directory of the package
getIdentifier()
getIdentifier()
 getIdentifier()  

getIdentifer()

Returns:str identifier
getAttribute(aAttributeIdentifier)
getAttribute(aAttributeIdentifier)
 getAttribute(aAttributeIdentifier)  

Get the given attribute value

Parameters:aAttributeIdentifier (AttributesEnum) – the attribute identifier
Returns:the attribute value if defined, None otherwise
getAllInputs()
getAllInputs()
 getAllInputs()  

Get the list of all inputs (images and parameters) defined on this graph

Returns:a list of inputs as ParamInput
getAllInputsInGroup(aGroup)
getAllInputsInGroup(aGroup)
 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 (SBSARGuiGroup or str) – The group of parameter to consider, given a SBSARGuiGroup object or a Group identifier
Returns:a list of inputs
getAllInputGroups()
getAllInputGroups()
 getAllInputGroups()  

Get the list of all groups used for the inputs of the graph.

Returns:a list of groups as strings
getInput(aInputIdentifier)
getInput(aInputIdentifier)
 getInput(aInputIdentifier)  

Get the ParamInput with the given identifier, among the input images and parameters

Parameters:aInputIdentifier (str) – input parameter identifier
Returns:the corresponding ParamInput object if found, None otherwise
getInputFromUID(aInputUID)
getInputFromUID(aInputUID)
 getInputFromUID(aInputUID)  

Get the ParamInput with the given UID, among the input images and parameters

Parameters:aInputUID (str) – input parameter UID
Returns:the corresponding ParamInput object if found, None otherwise
getInputImages()
getInputImages()
 getInputImages()  

Get the list of image inputs

Returns:a list of image inputs as ParamInput
getInputImage(aInputImageIdentifier)
getInputImage(aInputImageIdentifier)
 getInputImage(aInputImageIdentifier)  

Get the image input with the given identifier

Parameters:aInputImageIdentifier (str) – input image identifier
Returns:a ParamInput if found, None otherwise
getInputImageWithUsage(aUsage)
getInputImageWithUsage(aUsage)
 getInputImageWithUsage(aUsage)  

Get the first image input which has the given usage defined

Parameters:aUsage (UsageEnum or str) – usage to look for
Returns:a ParamInput if found, None otherwise
getInputParameters()
getInputParameters()
 getInputParameters()  

Get the list of input parameters (not image)

Returns:a list of ParamInput
getInputParameter(aInputParamIdentifier)
getInputParameter(aInputParamIdentifier)
 getInputParameter(aInputParamIdentifier)  

Get the input parameter with the given identifier

Parameters:aInputParamIdentifier (str) – input parameter identifier
Returns:the corresponding ParamInput object if found, None otherwise
getInputParameterFromUID(aInputParamUID)
getInputParameterFromUID(aInputParamUID)
 getInputParameterFromUID(aInputParamUID)  

Get the input parameter with the given UID

Parameters:aInputParamUID (str) – input parameter UID
Returns:the corresponding ParamInput object if found, None otherwise
class common_interfaces.basegraph.Graph(aIdentifier, aPrimaryInput, aParamInputs, aGraphOutputs, aPresets)
class common_interfaces.basegraph.Graph(aIdentifier, aPrimaryInput, aParamInputs, aGraphOutputs, aPresets)
 class common_interfaces.basegraph.Graph(aIdentifier, aPrimaryInput, aParamInputs, aGraphOutputs, aPresets)  

Bases: common_interfaces.basegraph.BaseGraph

Class used to provide a common interface between a SBSGraph and a SBSARGraph.

Members:
  • mIdentifier: Unique identifier of the graph
  • mPrimaryInput: Execution context, with alias definition
  • mParamInputs: Absolute directory of the package
  • mGraphOutputs: Absolute path of the package
  • mPresets: List of parameters presets
getAllPresets()
getAllPresets()
 getAllPresets()  

Get all the presets defined on this graph

Returns:a list of Preset
getAttribute(aAttributeIdentifier)
getAttribute(aAttributeIdentifier)
 getAttribute(aAttributeIdentifier)  

Get the given attribute value

Parameters:aAttributeIdentifier (AttributesEnum) – the attribute identifier
Returns:the attribute value if defined, None otherwise
getGraphOutputs()
getGraphOutputs()
 getGraphOutputs()  

Get all the graph outputs

Returns:the list of GraphOutput defined on this graph
getGraphOutput(aOutputIdentifier)
getGraphOutput(aOutputIdentifier)
 getGraphOutput(aOutputIdentifier)  

Get the graph output with the given identifier

Parameters:aOutputIdentifier (str) – identifier of the output
Returns:a GraphOutput object if found, None otherwise
getGraphOutputWithUsage(aUsage)
getGraphOutputWithUsage(aUsage)
 getGraphOutputWithUsage(aUsage)  

Get the first graph output which has the given usage defined

Parameters:aUsage (UsageEnum or str) – usage to look for
Returns:a GraphOutput object if found, None otherwise
getPreset(aPresetLabel)
getPreset(aPresetLabel)
 getPreset(aPresetLabel)  

Get the preset with the given label

Returns:a Preset object if found, None otherwise
getPrimaryInput()
getPrimaryInput()
 getPrimaryInput()  

Get the primary input of the graph

Returns:The primary input as a string if it exists, None otherwise
isPrimaryInput(aInput)
isPrimaryInput(aInput)
 isPrimaryInput(aInput)  

Check if the given input is the primary input for this graph or not

Parameters:aInput (str) – The input to check
Returns:True if this is the primary input, False otherwise

Get help faster and easier

New user?