User Guide Cancel

sbscleaner | Substance 3D Automation ToolKit

sbscleaner

sbscleaner.cleanSubstance(aSBSDocument, aCleanGraphNodes = True, aCleanFunctionNodes = True, aCleanGraphParameters = True, aCleanFunctionParameters = True)
sbscleaner.cleanSubstance(aSBSDocument, aCleanGraphNodes = True, aCleanFunctionNodes = True, aCleanGraphParameters = True, aCleanFunctionParameters = True)
 sbscleaner.cleanSubstance(aSBSDocument, aCleanGraphNodes = True, aCleanFunctionNodes = True, aCleanGraphParameters = True, aCleanFunctionParameters = True)  
Global clean function, that allows to clean:
  • Clean the useless compositing nodes in the graphs (Substance and MDL)
  • Clean the useless function nodes in the functions and all dynamic values (dynamic nodes parameters, pixel processor function)
  • Clean the useless graph input parameters
  • Clean the useless function input parameters
  • Clean the dependencies unused in the package
Parameters:
  • aSBSDocument (SBSDocument) – the substance to clean
  • aCleanGraphNodes (bool, optional) – True to clean the useless compositing nodes in the substance graphs. Default to True
  • aCleanFunctionNodes (bool, optional) – True to clean the useless function nodes in the functions. Default to True
  • aCleanGraphParameters (bool, optional) – True to clean the useless compositing nodes in the substance graphs. Default to True
  • aCleanFunctionParameters (bool, optional) – True to clean the useless compositing nodes in the substance graphs. Default to True
  • aCleanUnusedDependencies (bool, optional) – True to clean the dependencies unused in the package. Default to True
sbscleaner.cleanUnusedDependencies(aSBSDocument)
sbscleaner.cleanUnusedDependencies(aSBSDocument)
 sbscleaner.cleanUnusedDependencies(aSBSDocument)  

Remove all the unused dependencies in the given package.

Parameters:aSBSDocument (SBSDocument) – the substance to clean
sbscleaner.cleanUselessNodesInDynamicValue(aDynamicValue)
sbscleaner.cleanUselessNodesInDynamicValue(aDynamicValue)
 sbscleaner.cleanUselessNodesInDynamicValue(aDynamicValue)  

Delete all the useless nodes in the given dynamic value, meaning the ones that are not connected to the output node.

Parameters:aDynamicValue (SBSDynamicValue) – the graph to clean
sbscleaner.cleanUselessNodesInFunction(aFunction)
sbscleaner.cleanUselessNodesInFunction(aFunction)
 sbscleaner.cleanUselessNodesInFunction(aFunction)  

Delete all the useless nodes in the given function, meaning the ones that are not connected to the output node.

Parameters:aFunction (SBSFunction) – the graph to clean
sbscleaner.cleanUselessNodesInGraph(aGraph)
sbscleaner.cleanUselessNodesInGraph(aGraph)
 sbscleaner.cleanUselessNodesInGraph(aGraph)  

Delete all the useless nodes in the given graph, meaning the ones that are not connected to an output.

Parameters:aGraph (SBSGraph) – the graph to clean
sbscleaner.cleanUselessNodesInMDLGraph(aGraph)
sbscleaner.cleanUselessNodesInMDLGraph(aGraph)
 sbscleaner.cleanUselessNodesInMDLGraph(aGraph)  

Delete all the useless nodes in the given MDL graph, meaning the ones that are not connected to an output.

Parameters:aGraph (MDLGraph) – the graph to clean
sbscleaner.cleanUselessParametersInFunction(aFunction)
sbscleaner.cleanUselessParametersInFunction(aFunction)
 sbscleaner.cleanUselessParametersInFunction(aFunction)  

Delete all the useless input parameters in the given function, meaning the ones that are not used by the dynamic function or a VisibleIf condition.

Parameters:aFunction (SBSFunction) – the graph to clean
sbscleaner.cleanUselessParametersInGraph(aGraph)
sbscleaner.cleanUselessParametersInGraph(aGraph)
 sbscleaner.cleanUselessParametersInGraph(aGraph)  

Delete all the useless input parameters in the given graph, meaning the ones that are not used by a dynamic function or a VisibleIf condition.

Parameters:aGraph (SBSGraph) – the graph to clean
sbscleaner.getUselessNodesInDynamicValue(aDynamicValue)
sbscleaner.getUselessNodesInDynamicValue(aDynamicValue)
 sbscleaner.getUselessNodesInDynamicValue(aDynamicValue)  

Get all the useless nodes in the given dynamic value, meaning the ones that are not connected to the output node.

Parameters:aDynamicValue (SBSDynamicValue) – the dynamic value to clean
Returns:the list of useless SBSParamNode
sbscleaner.getUselessNodesInFunction(aFunction)
sbscleaner.getUselessNodesInFunction(aFunction)
 sbscleaner.getUselessNodesInFunction(aFunction)  

Get all the useless nodes in the given function, meaning the ones that are not connected to the output node.

Parameters:aFunction (SBSFunction) – the graph to clean
Returns:the list of useless SBSParamNode
sbscleaner.getUselessNodesInGraph(aGraph)
sbscleaner.getUselessNodesInGraph(aGraph)
 sbscleaner.getUselessNodesInGraph(aGraph)  

Get all the useless nodes in the given graph, meaning the ones that are not connected to an output.

Parameters:aGraph (SBSGraph) – the graph to clean
Returns:the list of useless SBSCompNode
sbscleaner.getUselessNodesInMDLGraph(aGraph)
sbscleaner.getUselessNodesInMDLGraph(aGraph)
 sbscleaner.getUselessNodesInMDLGraph(aGraph)  

Get all the useless nodes in the given MDL graph, meaning the ones that are not connected to the output.

Parameters:aGraph (MDLGraph) – the graph to clean
Returns:the list of useless MDLNode
sbscleaner.getUselessParametersInFunction(aFunction)
sbscleaner.getUselessParametersInFunction(aFunction)
 sbscleaner.getUselessParametersInFunction(aFunction)  

Get all the useless input parameters in the given function, meaning the ones that are not used by the function graph.

Parameters:aFunction (SBSFunction) – the function to clean
Returns:the list of useless SBSParamInput
sbscleaner.getUselessParametersInGraph(aGraph)
sbscleaner.getUselessParametersInGraph(aGraph)
 sbscleaner.getUselessParametersInGraph(aGraph)  

Get all the useless input parameters in the given graph, meaning the ones that are not used by a dynamic function or a VisibleIf condition.

Parameters:aGraph (SBSGraph) – the graph to clean
Returns:the list of useless SBSParamInput

Get help faster and easier

New user?