User Guide Cancel

paramgraph | Substance 3D Automation ToolKit

  1. Substance 3D home
  2. Home
  3. Command Line Tools
    1. Command Line overview
    2. sbsbaker
      1. sbsbaker overview
      2. sbsbaker command line options
      3. sbsbaker Example Command Lines
    3. sbscooker
      1. sbscooker overview
      2. sbscooker command line options
      3. sbscooker pattern variables
    4. sbsmtools
      1. sbsmtools overview
      2. sbsmtools command line options
    5. sbsmutator
      1. sbsmutator overview
      2. sbsmutator command line options
      3. sbsmutator Example Command Lines
    6. sbsrender
      1. sbsrender overview
      2. sbsrender base parameters and pattern variables
      3. sbsrender command line options
      4. sbsrender example command lines
    7. sbsupdater
      1. sbsupdater overview
      2. sbsupdater command line options
  4. Pysbs - Python API
    1. Pysbs - Python API overview
    2. Getting started
    3. General topics
      1. Basic manipulation
      2. Substance creation
      3. Substances modification
      4. Dependencies management
      5. PySbs batchtools module
      6. metadata manipulation
      7. SAT demos
      8. Edit sbsar with SBSARManager
      9. Spot Colors
      10. Thumbnail creation with SAT
    4. Examples
      1. demohelloworld
      2. demos
      3. demos_batchtools
      4. script_update_with_sbsupdater
    5. API Content
      1. API Content overview
      2. Substance definitions
        1. Common interfaces
          1. basegraph
          2. package
          3. sbsarobject
          4. sbsobject
        2. compnode
          1. compnode overview
          2. common
          3. compimplementation
          4. paramgraph
        3. context projectmgr
        4. graph
          1. graph overview
          2. function
          3. inputparameters
          4. output
        5. mdl
          1. mdlannotation
          2. mdlcommon
          3. mdldictionaries
          4. mdlenum
          5. mdlgraph
          6. mdllibclasses
          7. mdlmanager
          8. mdlnode
          9. mdlnodeimpl
          10. mdloperand
          11. mdlsbsbridge
        6. modelgraphindex
          1. modelannotationnames
          2. modelgraph
          3. modelgraphgenerator
          4. modelgraphimplementation
          5. modelnodenames
          6. modeloperand
          7. modulegraphindex
          8. moduleannotation
          9. moduleconnection
          10. modulegraph
          11. modulegraphgenerator
          12. modulegraphimplementation
          13. modulegraphlibrary
          14. modulegraphregister
          15. modulenode
          16. modulenodeimplementation
          17. modulenodeinstance
          18. moduleoperand
          19. moduleoutputbridging
          20. moduleparaminput
        7. params
          1. params overview
          2. dynamicvalue
          3. paramnode
        8. projectmgrdoc
        9. sbsarchive
          1. sbsarchive overview
          2. sbsarenum
          3. sbsargraph
          4. sbsargui
          5. sbsarguiwidgets
          6. sbsarmanager
        10. sbscommon
          1. connections
          2. gui
          3. nodes
          4. values
        11. sbspreset
        12. sbsproject
        13. substance
          1. substance overview
          2. content
          3. resource
      3. Libraries
        1. sbsenum
        2. sbslibrary
          1. sbslibrary overview
          2. sbsdictionaries
          3. sbsfilters
          4. sbsfunctions
          5. sbsfxmapnodes
          6. sbslibclasses
          7. sbswidgets
        3. sbsbakerslibrary
          1. sbsbakerslibrary overview
          2. sbsbakersdef
          3. sbsbakersdefaultprops
          4. sbsbakersdictionaries
          5. sbsbakersenum
          6. sbsbakingconverter
          7. sbsbakingconverterparam
          8. sbsbakingparameters
          9. sbsdialogstate
          10. sbsscenedata
        4. Helpers
          1. sbscleaner
          2. sbsexporter
          3. sbsgenerator
          4. sbsparser
          5. sbswriter
          6. qtclasses
            1. qtclasses overview
            2. qtvariantreader
            3. qtvariantwriter
          7. psdparser
          8. sbsimpactmanager
          9. batchtools
          10. autograph
            1. ag_functions
            2. ag_layout
            3. ag_types
          11. info_mesh_parser
          12. sbsbaker_info_handlers
          13. sbsrender_render_handlers
          14. output_handlers
          15. spotcolorinfo_handler
          16. thumbnail
          17. batchtools overview
        5. Execution context
          1. context
          2. functions
        6. API Change log
  5. Samples
    1. Samples overview
    2. Texturing Template Demo
    3. Batch Tools Demo
    4. Variations
    5. Texture Mat
    6. Pixel Processor Ray tracer
  6. Setup and Getting Started
    1. Setup and Getting Started overview
    2. Compatibility
    3. Frequently asked Questions
    4. Known issues
    5. SAT Cookbook
    6. Use Pysbs in different python interpreter (maya, sd, blender...)
  7. Integrations
    1. Substance Maya toolset
      1. Substance Maya Toolset overview
      2. Installing
      3. Launching
      4. Baking
        1. Baking overview
        2. Export parameters
        3. Baker parameters
        4. Mesh setup
        5. Using a template
      5. Changelog
  8. Changelog overview

paramgraph

Module paramgraph provides the definition of all the objects relative to a FxMap graph:

 class compnode.paramgraph.SBSParamsGraph(aName='', aUID='', aGUILayoutPGraph=None, aRootNode=None, aParamsGraphDatas=None, aParamsGraphNodes=None, aGUIObjects=None)  

Bases: pysbs.common_interfaces.sbsobject.SBSObject

Class that contains information on a FxMap graph (e.g. parameters set graph) as defined in a .sbs file. Data (parameters) are separated from node instances to allow data reuse and Inheritance.

Members:
  • mName (str): name (type) of the graph.
  • mUID (str): unique identifier of the graph in the /paramsGraphs/ context.
  • mGUILayoutPGraph (SBSGUILayoutComp, optional): GUI flags and options.
  • mRootNode (str, optional): uid of the root node.
  • mParamsGraphDatas (list of SBSParamsGraphData): data set of nodes, with Inheritance system.
  • mParamsGraphNodes (list of SBSParamsGraphNode): nodes list of the parameters graph.
  • mGUIObjects (SBSGUIObject): GUI specific objects.
 computeUniqueIdentifier(aIdentifier, aSuffixId = 0)  

Check if the given identifier is already used 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(aBottomNode, aTopNode, aTopNodeOutput = None)  

Connect the given nodes together: aTopNode(on the output aTopNodeOutput) -> aBottomNode. If the top node output is None, the connection will be done for ALL the outputs of the top node.

Parameters:
Returns:

True if success

Raise:

api_exceptions.SBSImpossibleActionError

 contains(aNode)  

Check if the given node belongs to this graph

Parameters:aNode (SBSParamsGraphNode or str) – The node to check, as a, object or an UID
Returns:True if the given node belongs to the graph, False otherwise
 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:
  • aCommentText (str, optional) – The text of the comment. Default to ‘Comment’
  • aGUIPos (list of 3 float, optional) – The comment position in the graph. Default to [0,0,0]
  • aLinkToNode (str, optional) – UID of the node to associate to this comment
Returns:

The SBSGUIObject created

 createFrame(aSize, aFrameTitle='Frame', aCommentText='', aGUIPos=None, aColor=None, aDisplayTitle=True)  

Create a new framed comment.

Parameters:
  • aSize (list of 2 float) – The frame size
  • aFrameTitle (str, optional) – The title of the frame. Default to ‘Frame’
  • aCommentText (str, optional) – The text of the frame. Empty by default
  • aGUIPos (list of 3 float, optional) – The frame position in the graph. Default to [0,0,-100]
  • aColor (list of 4 float between 0 and 1, optional.) – The frame color. Default to [0.196, 0.196, 0.509, 0.196]
  • aDisplayTitle (boolean, optional) – True to display the frame title. Default to True
Returns:

The SBSGUIObject created

 createFrameAroundNodes(aNodeList, aFrameTitle='Frame', aCommentText='', aColor=None, aDisplayTitle=True)  

Create a new framed comment around the given nodes.

Parameters:
  • aNodeList (list of class:.SBSParamsGraphNode) – The nodes to include in the frame
  • aFrameTitle (str, optional) – The title of the frame. Default to ‘Frame’
  • aCommentText (str, optional) – The text of the frame. Empty by default
  • aColor (list of 4 float between 0 and 1, optional.) – The frame color. Default to [0.196, 0.196, 0.509, 0.196]
  • aDisplayTitle (boolean, optional) – True to display the frame title. Default to True
Returns:

The SBSGUIObject created

Raise:

api_exceptions.SBSImpossibleActionError

 createFxMapNode(aFxMapNode, aGUIPos = None, aParameters = None)  

Create a new FxMap node (SBSParamsGraphNode) and its associated data (SBSParamsGraphData) and add them to the FxMap graph.

Parameters:
  • aFxMapNode (FxMapNodeEnum or str) – the kind of FxMap node to create among the list defined in FxMapNodeEnum
  • aGUIPos (list of 3 float, optional) – position of the node in the graph: [x,y,z]. default value is [0,0,0]
  • aParameters (dictionary {CompNodeParamEnum : parameterValue(str)}, optional) – parameters of the FxMap node
Returns:

The new SBSParamsGraphNode object

 createIterationOnPattern(aGraphNode, aParameter, aNbIteration, aNodeUIDs, aNodeUIDs_NextPatternInput = None, aGUIOffset = None)  

Allows to create an iteration in the function defining the value of the given parameter.

Duplicate nbIteration times the given pattern of nodes, to create this kind of connection:

Pattern -> Pattern_1 -> Pattern_2 -> … -> Pattern_N

Parameters:
  • aGraphNode (SBSParamsGraphNode or str) – the FxMap node which contains the parameter definition dynamically driven
  • aParameter (CompNodeParamEnum or str) – the parameter driven by a dynamic function, on which the iteration will be created
  • aNbIteration (positive integer) – number of time the pattern must be duplicated
  • aNodeUIDs (list of str) – list of node’s UID that constitute the pattern to duplicate
  • aNodeUIDs_NextPattern (list of str, optional) – list of node’s UID that correspond to the next pattern, which must be connected to the given pattern.
  • aGUIOffset (list of 2 float, optional) – pattern position offset. Default to [150, 0]
Returns:

The list of params.SBSParamNode created if succeed

Raise:

api_exceptions.SBSImpossibleActionError

 createNavigationPin(self, aPinText, aGUIPos)  

Create a new navigation pin.

Parameters:
  • aPinText (str) – The text of the navigation pin
  • aGUIPos (list of 3 float) – The navigation pin position in the graph
Returns:

The SBSGUIObject created

 deleteComment(aComment)  

Allows to delete the given comment from the graph.

Parameters:aComment (SBSGUIObject or 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 (SBSGUIObject or str) – The frame to remove, as a Frame or an UID.
Returns:True if success
Raise:api_exceptions.SBSImpossibleActionError
 deleteNavigationPin(aNavigationPin)  

Allows to delete the given navigation pin from the graph.

Parameters:aNavigationPin (SBSGUIObject or 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 mParamsGraphNodes and mParamsGraphDatas list, and delete all the connection from and to that node in the graph.

Parameters:aNode (SBSParamsGraphNode or str) – The node to remove, as a SBSParamsGraphNode or an UID.
Returns:True if success
Raise:api_exceptions.SBSImpossibleActionError
 disconnectNodes(aTopNode, aBottomNode, aTopNodeOutput = None)  

Disconnect the given nodes: aTopNode(on the output aTopNodeOutput) -> aBottomNode. If the top node output is None, all connections will be removed.

Parameters:
  • aTopNode (SBSCompNode) – Top node
  • aBottomNode (SBSCompNode) – Bottom node
  • aTopNodeOutput (OutputEnum or str, optional) – Identifier of the output of the top node
Returns:

Nothing

Raise:

api_exceptions.SBSImpossibleActionError

 duplicateNode(aNode, aGUIOffset = None)  

Duplicate the given node, generate a new UID and add the node to the graph. Duplicate also the SPSParamsGraphData associated to this node

Parameters:
  • aNode (SPSParamsGraphNode or str) – the node to copy (may be identified by its UID)
  • aGUIOffset (list of 2 float, optional) – node position offset. Default to [150, 0]
Returns:

The new SPSParamsGraphNode object

Raise:

api_exceptions.SBSImpossibleActionError

 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.

Parameters:other (SBSObject) – The SBSObject to compare to
Returns:True if the two SBSObject are similar according to their definition.
 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
 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
 getAllNavigationPins()  

Get all the navigation pins defined in the graph

Returns:a list of SBSGUIObject
 getAllNodesOfKind(aFxMapNode)  

Search for all SBSParamsGraphNode of the given kind (Quadrant, Switch or Iterate).

Parameters:aFxMapNode (FxMapNodeEnum str) – kind of FxMap node to look for
Returns:a list of SBSParamsGraphNode containing all filters of the given kind.
 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
 getCommentsAssociatedToNode(aNode)  

Get the list of comments associated to the given node

Parameters:aNode (SBSParamsGraphNode or str) – The node to consider, as a SBSParamsGraphNode or given its UID
Returns:a list of SBSGUIObject
 getNode(aNodeUID)  

Get the SBSParamsGraphNode object with the given UID

Parameters:aNodeUID (str) – uid of the node to get
Returns:The SBSParamsGraphNode object if found, None otherwise
 getNodeAssociatedToComment(aComment)  

Get the node associated to the given comment.

Parameters:aComment (SBSGUIObject) – The comment to consider
Returns:the SBSParamsGraphNode if found, None otherwise
 getNodeData(aDataUID)  

Get the SBSParamsGraphData object with the given UID

Parameters:aDataUID (str) – uid of the data to get
Returns:The SBSParamsGraphData object if found, None otherwise
 getNodeList(aNodesList = None)  

Get all the nodes of this FxMap graph, or look for the given nodes if aNodesList is not None

Parameters:aNodesList (list of str or list of SBSParamsGraphNode, optional) – list of node to look for
Returns:A list of SBSParamsGraphNode included in the FxMap graph
 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 SBSParamsGraphNode
 getParamsGraphDataList()  

Get the list of SBSParamsGraphData of this graph

Returns:A list of SBSParamsGraphData
 getUidIsUsed(aUID)  

Check if the given uid is already used in the context of this paramsGraphData

return: True if the uid is already used, False otherwise

 isAPathBetween(self, aTopNode, aBottomNode)  

Check if there is a path from the top node to the bottom node with the current connections.

Parameters:
  • aTopNode (SBSNode) – The left node
  • aBottomNode (SBSNode) – The right node
Returns:

True if a path is found, False otherwise

 parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)  

Parse recursively the given xml node to retrieve the content of the SBSObject.

Parameters:
  • aContext (Context) – execution context
  • aDirAbsPath (str) – the absolute directory containing the current parsed package (.sbs file)
  • aSBSParser (SBSParser) – the substance parser
  • aXmlNode (xml.etree.ElementTree) – the xml node to parse
 reframeAroundNodes(aFrame, aNodeList)  

Move and resize a frame to be around the given nodes.

Parameters:
  • aFrame (SBSGUIObject) – The frame to edit
  • aNodeList (list of class:.SBSParamsGraphNode) – The nodes to include in the frame
Raise:

SBSImpossibleActionError

 setRootNode(aNode)  

Set the root node of the FxMap graph

Parameters:aNode (SBSParamsGraphNode or str) – the node to set as root, or its UID
Returns:The SBSParamsGraphNode corresponding to the root node, False if not found
Raise:api_exceptions.SBSImpossibleActionError
 write(aSBSWriter, aXmlNode)  

Write recursively the content of the SBSObject into the given xml node.

Parameters:
  • aSBSWriter (SBSWriter) – the substance writer
  • aXmlNode (xml.etree.ElementTree) – the xml node to fill
 class compnode.paramgraph.SBSParamsGraphData(aIdentifier='', aUID='', aType='', aInherit=None, aParameters=None)  

Bases: compnode.common.SBSCompImplWithParams

Class that contains information on a paramsGraphData as defined in a .sbs file. Refers to parameter set of FxMaps.

Members:
  • mIdentifier (str): data identifier.
  • mUID (str): data unique identifier in the /paramsGraphDatas/ context.
  • mType (str, optional): node type, among the list of available FxMap node identifiers (sbsfxmapnodes)
  • mInherit (str, optional): uid of the inherited data if exists (/paramsGraphData/uid).
  • mParameters (list of SBSParameter): parameters definition.
 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.

Parameters:other (SBSObject) – The SBSObject to compare to
Returns:True if the two SBSObject are similar according to their definition.
 getDefinition()  

Get the FxMap node definition (Inputs, Outputs, Parameters)

Returns:a CompNodeDef object
 getDisplayName()  

Get the display name of this node

Returns:the display name as a string
 getParameterValue(aParameter)  

Find a parameter with the given name/id among the overloaded parameters and the default node parameters, and return its value.

Parameters:aParameter (CompNodeParamEnum or str) – Parameter identifier
Returns:The parameter value if found (string or SBSDynamicValue, None otherwise
 getUidIsUsed(aUID)  

Check if the given uid is already used in the context of this SBSObject.

Parameters:aUID (str) – UID to check
Returns:True if the uid is already used, False otherwise
Raise:AttributeError if the function getUidIsUsed in not properly overloaded on this SBSObject
 hasIdenticalParameters(self, other)  

Allows to check if two nodes has the same parameters defined with the same values.

Parameters:other (SBSCompImplWithParams) – the node to compare with
Returns:True if the two nodes has the same parameters, False otherwise
 parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)  

Parse recursively the given xml node to retrieve the content of the SBSObject.

Parameters:
  • aContext (Context) – execution context
  • aDirAbsPath (str) – the absolute directory containing the current parsed package (.sbs file)
  • aSBSParser (SBSParser) – the substance parser
  • aXmlNode (xml.etree.ElementTree) – the xml node to parse
 setDynamicParameter(aParameter, aRelativeTo = None)  

Set the given parameter as dynamic, to init its params.SBSDynamicValue. If Inheritance is None, the default Inheritance for this node is set.

Parameters:
Returns:

the SBSDynamicValue object if succeed, None otherwise

Raise:

api_exceptions.SBSLibraryError

 setParameterValue(aParameter, aParamValue)  

Set the value of the given parameter to the given value, if compatible with this type of FxMap graph node

Parameters:
Returns:

True if succeed, False otherwise

 unsetParameter(aParameter)  

Unset the given parameter so that it is reset to its default value.

Parameters:aParameter (CompNodeParamEnum or str) – identifier of the parameter to set
Returns:True if succeed, False otherwise
Raise:api_exceptions.SBSLibraryError
 write(aSBSWriter, aXmlNode)  

Write recursively the content of the SBSObject into the given xml node.

Parameters:
  • aSBSWriter (SBSWriter) – the substance writer
  • aXmlNode (xml.etree.ElementTree) – the xml node to fill
 class compnode.paramgraph.SBSParamsGraphNode(aGUIName=None, aUID='', aType='', aDisabled=None, aConnections=None, aData='', aGUILayout=None, aParentGraph=None)  

Bases: pysbs.sbscommon.nodes.SBSNode

Class that contains information on a paramsGraphNode as defined in a .sbs file Refers to a FxMap graph node.

Members:
  • mGUIName (str): name of the node.
  • mUID (str): node unique identifier in the /paramsGraphNodes/ context.
  • mType (str): node type, among the identifiers available for the FxMap node definition (sbsfxmapnodes)
  • mDisabled (str, optional): this node is disabled (“1” / None).
  • mConnections (list of SBSConnection): input (parameter of type ENTRY_PARAMETER) connections list. connRef are nodes unique identifier references (/paramsGraphNode/uid).
  • mData (str): uid of the data associated to this node (/paramsGraph/paramsGraphDatas/), where the parameters are defined.
  • mGUILayout (SBSGUILayout): GUI position/options.
 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.

Parameters:other (SBSObject) – The SBSObject to compare to
Returns:True if the two SBSObject are similar according to their definition.
 getConnectedNodesUID()  

Get the UIDs of the nodes connected to this node.

Returns:The UIDs as a list of string
 getConnectionOnPin(aPinIdentifier)  

Get the connection defined on the given input.

Parameters:aPinIdentifier (str) – identifier of the input pin (for SBSCompNode, SBSParamNode and MDLNode) or of the output pin(for SBSParamsGraphNode)
Returns:a SBSConnection object corresponding to the connection defined on the given pin. None otherwise
 getConnections()  

Get the connections defined on this node.

Returns:a list of SBSConnection
 getConnectionsFromNode(aLeftNode)  

Get all the connections coming from the given left node.

Parameters:aLeftNode (SBSNode or str) – The node to look for in the incoming connections of this node, as an object or a UID
Returns:a list of SBSConnection
 getData()  

Get the data associated to this node

Returns:a SBSParamsGraphData object if found, None otherwise
 getDefinedParameters()  

Get the list of parameters defined on this node.

Returns:the list of SBSParameter specified on this node.
 getDefinition()  

Get the FxMap node definition (Inputs, Outputs, Parameters)

Returns:a CompNodeDef object
 getDisplayName()  

Get the display name of this node

Returns:the display name as a string
 getDynamicParameters()  

Get the list of dynamic parameters defined on this node.

Returns:the list of SBSParameter specified on this node that have a dynamic function.
 getInputDefinition(self, aInputIdentifier=None)  

Get the input definition corresponding to the given identifier.

Parameters:aInputIdentifier (InputEnum or str, optional) – The identifier to get. If let None, the primary input will be returned
Returns:the input definition as a CompNodeInput if found, None otherwise
 getOffsetPosition(aOffset = None)  

Compute the position of this node offset by the given offset

Parameters:aOffset (list of 2 float, optional) – the offset to apply to the node’s current position. Default to [0,0]
Returns:the offset position
 getParameterValue(aParameter)  

Find a parameter among the data (SBSParamsGraphData) with the given name/id, and return its value.

Parameters:aParameter (CompNodeParamEnum or str) – Parameter identifier
Returns:The parameter value if found, None otherwise
 getPosition()  

Get the position of this node in the graph GUI.

Returns:a list of 3 float
 getRect()  

Return the rectangle of this node.

Returns:The rectangle as a Rect
 getUidIsUsed(aUID)  

Check if the given uid is already used in the context of this SBSObject.

Parameters:aUID (str) – UID to check
Returns:True if the uid is already used, False otherwise
Raise:AttributeError if the function getUidIsUsed in not properly overloaded on this SBSObject
 hasAReferenceOnDependency(aDependency)  

Check if this node directly references the given dependency. For instance if it instantiates a graph or a resource included in this dependency.

Parameters:aDependency (str or SBSDependency) – The dependency to look for (UID or object)
Returns:True if this node references this dependency, False otherwise
 hasAReferenceOnInternalPath(aInternalPath)  

Check if this node references the given internal path (pkg:///). For instance if it instantiates the graph or the resource pointed at the given path.

Parameters:aInternalPath (str) – The internal path to look for
Returns:True if this node references the given internal path, False otherwise
 isConnectedTo(aBottomNode)  

Check if the node is connected to the given node, in the direction aLeftNode -> self

Parameters:aBottomNode (SBSParamsGraphNode or str (UID)) – The node to look for in the connections of this node.
Returns:True if the nodes are connected, False otherwise
 isDocked()  

Check if this node is docked.

Returns:True if this node is docked, None otherwise
 parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)  

Parse recursively the given xml node to retrieve the content of the SBSObject.

Parameters:
  • aContext (Context) – execution context
  • aDirAbsPath (str) – the absolute directory containing the current parsed package (.sbs file)
  • aSBSParser (SBSParser) – the substance parser
  • aXmlNode (xml.etree.ElementTree) – the xml node to parse
 removeConnectionOnPin(aInput)  

Remove the connection on the given input pin.

Parameters:aPinIdentifier (InputEnum or FunctionInputEnum or str) – identifier of the input pin (for SBSCompNode and SBSParamNode) or of the output pin(for SBSParamsGraphNode) to disconnect
Returns:True if a connection is removed, False otherwise
 removeConnectionsFrom(aBottomNode)  

Remove the connection between this node and aBottomNode (in the direction self -> aBottomNode)

Parameters:aBottomNode (SBSParamsGraphNode or str (UID)) – The node to look for in the connections of this node.
Returns:Nothing
 setDynamicParameter(aParameter)  

Set the given parameter as dynamic, to init its params.SBSDynamicValue.

Parameters:aParameter (CompNodeParamEnum or str) – identifier of the parameter
Returns:the SBSDynamicValue object if succeed, None otherwise
 setParameterValue(aParameter, aParamValue)  

Find a parameter among the data (SBSParamsGraphData) with the given name/id, and set it to the given value.

Parameters:
Returns:

True if succeed, False otherwise

 setParentGraph(aParentGraph)  

Allows to set the reference to the parent graph.

Parameters:aParentGraph (SBSGraph) – The parent Graph of this node
 setPosition(aPosition)  

Set the position of this node in the graph GUI.

Parameters:aPosition (a list of 3 float) – The position to set
 unsetParameter(aParameter)  

Unset the given parameter so that it is reset to its default value.

Parameters:aParameter (CompNodeParamEnum or str) – identifier of the parameter to set
Returns:True if succeed, False otherwise
 write(aSBSWriter, aXmlNode)  

Write recursively the content of the SBSObject into the given xml node.

Parameters:
  • aSBSWriter (SBSWriter) – the substance writer
  • aXmlNode (xml.etree.ElementTree) – the xml node to fill

Get help faster and easier

New user?