User Guide Cancel

modulenodeimplementation | Substance 3D Automation ToolKit

modulenodeimplementation

Module modulegraph aims to define SBSObjects that are relative to a module graph, mostly ModuleGraph.

class modulegraph.modulenodeimplementation.ModuleNodeImplementation(aPath='', aOperands=None, aOutputBridgings=None)
class modulegraph.modulenodeimplementation.ModuleNodeImplementation(aPath='', aOperands=None, aOutputBridgings=None)
 class modulegraph.modulenodeimplementation.ModuleNodeImplementation(aPath='', aOperands=None, aOutputBridgings=None)  

Bases: pysbs.common_interfaces.sbsobject.SBSObject

Abstract class used to provide an interface for derived implementation, and to ensure that each derived implementation implements the functions ‘parse’ and ‘write’

equals(other)
equals(other)
 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.
getOperand(aName)
getOperand(aName)
 getOperand(aName)  

Return the corresponding operand

Parameters:aName (str) – the operand’s name to get
Returns:ModuleOperand
Return type:ModuleOperand
getUidIsUsed(aUID)
getUidIsUsed(aUID)
 getUidIsUsed(aUID)  

Parse the CompOutputs list to find a SBSCompNode with the given uid

Parameters:aUID (str) – UID to check
Returns:True if this uid is already used, False otherwise
listOperandNames()
listOperandNames()
 listOperandNames()  

list all operand’s name

Returns:a list of name
Return type:list
listOutputNames()
listOutputNames()
 listOutputNames()  

list all output’s name

Returns:a list of name
Return type:list
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
 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
write(aSBSWriter, aXmlNode)
write(aSBSWriter, aXmlNode)
 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?