- Substance 3D home
- Home
- Command Line Tools
- Command Line overview
- sbsbaker
- sbscooker
- sbsmtools
- sbsmutator
- sbsrender
- sbsupdater
- Command Line overview
- Pysbs - Python API
- Pysbs - Python API overview
- Getting started
- General topics
- Examples
- API Content
- API Content overview
- Substance definitions
- Common interfaces
- compnode
- context projectmgr
- graph
- mdl
- modelgraphindex
- modelannotationnames
- modelgraph
- modelgraphgenerator
- modelgraphimplementation
- modelnodenames
- modeloperand
- modulegraphindex
- moduleannotation
- moduleconnection
- modulegraph
- modulegraphgenerator
- modulegraphimplementation
- modulegraphlibrary
- modulegraphregister
- modulenode
- modulenodeimplementation
- modulenodeinstance
- moduleoperand
- moduleoutputbridging
- moduleparaminput
- params
- projectmgrdoc
- sbsarchive
- sbscommon
- sbspreset
- sbsproject
- substance
- Libraries
- sbsenum
- sbslibrary
- sbsbakerslibrary
- Helpers
- Execution context
- API Change log
- Samples
- Setup and Getting Started
- Integrations
- Substance Maya toolset
- Changelog overview
modulegraphgenerator
Module modelgrapgenerator factory module to create various models entities
modulegraph.modulegraphgenerator.createConnection(aModuleRegister, aNodeLeft: modulenode.ModuleNode, aNodeRight: modulenode.ModuleNode, aOutputIdentifer: str=None, aInputIdentifer: str=None)
Connect two nodes by their outputs to inputs, in model graph all inputs are operands. If output and input identifier are not set first of each will be used. Currently there is no type check during the connection, so as long as the output and input exists the connection will be done but could be not valid for the evaluation.
Parameters: |
|
---|---|
Returns: | the connection object |
Return type: |
modulegraph.modulegraphgenerator.createEmptyNode(aGraph: modulegraph.ModuleGraph, aPos=(0, 0, 0))
Create an empty node, the basic shell that will received the implementation
Parameters: |
|
---|---|
Returns: |
modulegraph.modulegraphgenerator.createFeatureVersion(aModuleRegister, aDoc)
Add a new FeatureVersion object to the doc :param aDoc: the document where the FeatureVersion will be created :type aDoc: SBSDocument
:return: FeatureVersionOption
modulegraph.modulegraphgenerator.createGraph(aModuleRegister, aDoc, aIdentifier: str, aAttrName='mModuleGraphs', aParentFolder=None)
Create a basic module graph
Parameters: |
|
---|---|
Returns: |
modulegraph.modulegraphgenerator.createGraphAnnotation(aModuleRegister, aGraph: modulegraph.ModuleGraph, aKey: str, aValue)
Create an Annotation object and add it to the given graph Annotation handle graph information attributes like description, author, tags…
Parameters: |
|
---|---|
Returns: | annotation obj |
Return type: |
modulegraph.modulegraphgenerator.createNode(aGraph: modulegraph.ModuleGraph, aNodeId: str, aPos=(0, 0, 0))
Top def to create an atomic node (not an instance) by given a node id createNode(aModelgraph, “Structure::NodeBool”)
Parameters: |
|
---|---|
Returns: |
modulegraph.modulegraphgenerator.createNodeImplementation(aModuleRegister, aNodeId: str)
Create the node implementation object, the implementation class is retrieve by the register or use the default one ModuleNodeImplementation
Parameters: | aNodeId (str) – the node identifier to retrieve info from register |
---|---|
Returns: | the Node Implementation instance |
Return type: | ModuleNodeImplementation |
modulegraph.modulegraphgenerator.createOperandValue(aModuleRegister, aNodeId: str, aOperandName: str, aValue=None)
Create ModuleOperand
the corresponding operand from a node id and operand name :param aNodeId: the node identifier to retrieve info from register :type aNodeId: str :param aOperandName: the operand name :type aOperandName: str :param aValue: a value to give to the new operand :return: the operand instance :rtype: ModuleOperand
modulegraph.modulegraphgenerator.createOutputBridgings(aModuleRegister, aNodeImpl: modulenodeimplementation.ModuleNodeImplementation, aNodeId: str, aName: str)
Create OutputBridgings node, the outputs. From a node id and an output name :param aNodeImpl: A node implementation object :type aNodeImpl: ModuleNodeImplementation
:param aNodeId: the node identifier to retrieve info from register :type aNodeId: str :param aName: output name :type aName: str :return: output bridging instance :rtype: ModuleOutputBridging
modulegraph.modulegraphgenerator.exposeNode(aModuleRegister, aGraph: modulegraph.ModuleGraph, aNode: modulenode.ModuleNode, aIdentifier: str, aDescription: str= '', aInGroup: str='', aDisplayName: str='', aGammaType: str='', aGraphDefinitionId: str=None, aSoftRange=None, aHardRange=None)
Expose as a graph input parameter a constant node
Parameters: |
|
---|---|
Returns: |