User Guide Cancel

sbsgenerator | 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

sbsgenerator

Module sbsgenerator aims to provide useful functions to create/duplicate/connect SBSObjects

 sbsgenerator.createCompFilterNode(aParentGraph, aFilter, aParameters = None, aInheritance = None)  

Create a new compositing node filter with the given parameters. For a Bitmap or Svg node, use createResourceNode instead.

Parameters:
  • aParentGraph (SBSGraph) – graph which will contain the created CompFilter node
  • aFilter (FilterEnum or str) – type of filter to create
  • aParameters (dictionary in the format {parameterName(CompNodeParamEnum) : parameterValue(str)}, optional) – parameters of the filter node
  • aInheritance (dictionary with the format {parameterName(CompNodeParamEnum) : parameterInheritance(ParamInheritanceEnum)}, optional) – Inheritance of the parameters
Returns:

The new SBSCompNode object

 sbsgenerator.createCompInstanceNode(aParentGraph, aGraph, aDependency, aPath, aParameters = None, aInheritance = None)  

Create a new compositing node instance with the given parameters.

Parameters:
  • aParentGraph (SBSGraph) – graph which will contain the created comp instance node
  • aGraph (SBSGraph) – graph to instantiate in the compositing node
  • aDependency (SBSDependency) – dependency associated to the referenced object (himself or external)
  • aPath (str) – path of the graph definition
  • aParameters (dictionary in the format {parameterName(CompNodeParamEnum) : parameterValue(str)}) – parameters of the filter node
  • aInheritance (dictionary with the format {parameterName(CompNodeParamEnum) : parameterInheritance(ParamInheritanceEnum)}) – Inheritance of the parameters
Returns:

The new SBSCompNode object

 sbsgenerator.createCurveParamsArray(aCompFilter, aCurveDefinition)  

Create the hierarchy of SBSObject necessary to describe the given gradient key values.

Parameters:
Returns:

the new SBSParamsArray if success, None otherwise

 sbsgenerator.createEmbeddedSVG(aSBSDocument, aResourcePath, aResourceGroup = 'Resources', aIdentifier = None, aAttributes = None, aCookedQuality = None)  

Process the given resource: Create a new SBSResource in the folder ResourceGroup if the resource is not already in. Create the SBSGroup ResourceGroup if necessary. Create the dependency ‘?himself’ if necessary.

Parameters:
  • aSBSDocument (SBSDocument) – reference document
  • aResourcePath (str) – relative or absolute path to the resource
  • aResourceGroup (SBSGroup or str, optional) – SBSGroup or identifier of the group where the resource will be added (the group is created if necessary). Default to ‘Resources’. Put None to create the resource at the root of the package.
  • aIdentifier (str, optional) – Identifier of the resource. If None, the identifier is taken from the resource path
  • aAttributes (dictionary in the format {AttributesEnum : value(str)}, optional) – attributes of the resource
  • aCookedQuality (float between 0 and 1, optional) – bitmap compression quality (only for BITMAP and SVG). Default value is 0
Returns:

The new SBSResource object

 sbsgenerator.createFunction(aParentObject, aFunctionIdentifier)  

Create a new function.

Parameters:
  • aParentObject (SBSObject) – reference to the parent object that will contain this function
  • aFunctionIdentifier (str) – name of the function
Returns:

The new SBSFunction object

 sbsgenerator.createFunctionInstanceNode(aSBSDynamicValue, aFunction, aPath, aDependency)  

Create a new function node instance of the given function, and set the parameters.

Parameters:
  • aSBSDynamicValue (SBSDynamicValue) – the dynamic value which will contain the created ParamNode
  • aFunction (graph.SBSFunction) – the function that will be instantiated with the instance node
  • aPath (str) – path of the function definition
  • aDependency – dependency associated to the referenced object (himself or external)
  • aDependencySBSDependency
Returns:

The new SBSParamNode object

 sbsgenerator.createFunctionNode(aSBSDynamicValue, aFunction, aParameters = None)  

Create a new function node (SBSParamNode) with the given parameters.

Parameters:
  • aSBSDynamicValue (SBSDynamicValue) – the dynamic value which will contain the created ParamNode
  • aFunction (FunctionEnum or str) – type of function to create
  • aParameters (dictionary in the format {parameterName(FunctionEnum) : parameterValue(str)}) – parameters of the function node
Returns:

The new SBSParamNode object

 sbsgenerator.createGUIObject(aParentObject, aObjectType, aGUIName, aGUIPos, aSize, aTitle = None, aColor = None, aIsTitleVisible = False, aIsFrameVisible = False)  
Parameters:
  • aParentObject (SBSGraph or SBSFunction) – The parent graph / function that will contain the GUI object
  • aObjectType (GUIObjectTypeEnum) – Kind of GUI Object to create
  • aGUIName (str) – The GUI object textual content
  • aGUIPos (list of 3 float) – The position of the GUI object
  • aGUIDependency (str, optional) – The GUI dependency value (‘NODE?’), if this GUI object is linked to another object in the graph
  • aSize (list of 2 float) – The size of the GUI object
  • aTitle – The title of the GUI object (only for framed comments)
  • aColor (list of 4 float, optional) – The color of the GUI object (only for framed comments)
  • aIsTitleVisible (boolean, optional) – True to display the title of a framed comment. Default to False
  • aIsFrameVisible (boolean, optional) – True in case of a framed comment. Default to False
Returns:

The SBSGUIObject created

 sbsgenerator.createGradientMapParamsArray(aCompFilter, aKeyValues)  

Create the hierarchy of SBSObject necessary to describe the given gradient key values.

Parameters:
  • aCompFilter (SBSCompFilter) – the Gradient map filter
  • aKeyValues (list of GradientKey) – the gradient map key values to set
Returns:

the new SBSParamsArray if success, None otherwise

 sbsgenerator.createGraph(aParentObject, aGraphIdentifier, aParameters = None, aInheritance = None)  

Create a new graph.

Parameters:
  • aParentObject (SBSDocument or SBSContent) – reference to the parent object that will contain this graph
  • aGraphIdentifier (str) – name of the graph
  • aParameters (dictionary with the format {parameterName(CompNodeParamEnum) : parameterValue(str)}, optional) – parameters of the graph (among the sbslibrary.sbslibclasses.BaseParameters only)
  • aInheritance (dictionary with the format {parameterName(CompNodeParamEnum) : parameterInheritance(ParamInheritanceEnum)}, optional) – Inheritance of the parameters
Returns:

The new SBSGraph object

 sbsgenerator.createGroup(aParentObject, aGroupIdentifier)  

Create a new group.

Parameters:
  • aParentObject (SBSObject) – reference to the parent object that will contain this graph
  • aGroupIdentifier (str) – name of the group
Returns:

The new SBSGroup object

 sbsgenerator.createIcon(aIconAbsPath)  

Create a SBSIcon from the given image path

Parameters:aIconAbsPath (str) – The absolute path of the image to set
Returns:The SBSIcon object created
 sbsgenerator.createImportedBitmap(aSBSDocument, aResourcePath, aResourceGroup = 'Resources', aIdentifier = None, aAttributes = None, aCookedFormat = None, aCookedQuality = None)  

Process the given resource: Create a new SBSResource in the folder ResourceGroup if the resource is not already in. Create the SBSGroup ResourceGroup if necessary.

Parameters:
  • aSBSDocument (SBSDocument) – reference document
  • aResourcePath (str) – relative or absolute path to the resource
  • aResourceGroup (SBSGroup or str, optional) – SBSGroup or identifier of the group where the resource will be added (the group is created if necessary). ‘Resources’ by default. Put None to create the resource at the root of the package.
  • aIdentifier (str, optional) – Identifier of the resource. If None, the identifier is taken from the resource path
  • aAttributes (dictionary in the format {AttributesEnum : value(str)}, optional) – attributes of the resource
  • aCookedFormat (BitmapFormatEnum, optional) – bitmap format (JPEG/RAW) (only for BITMAP). Default value is RAW
  • aCookedQuality (float between 0 and 1, optional) – bitmap compression quality (only for BITMAP and SVG). Default value is 0
Returns:

The new SBSResource object

 sbsgenerator.createImportedResource(aSBSDocument, aResourceTypeEnum, aResourcePath, aResourceGroup = 'Resources', aIdentifier = None, aAttributes = None)  

Process the given resource (font, light profile or bsdf measurement): Create a new SBSResource in the folder ResourceGroup if the resource is not already in. Create the SBSGroup ResourceGroup if necessary.

Parameters:
  • aSBSDocument (SBSDocument) – reference document
  • aResourceTypeEnum (ResourceKindEnum) – resource kind, among FONT/LIGHT_PROFILE/M_BSDF
  • aResourcePath (str) – relative or absolute path to the resource
  • aResourceGroup (SBSGroup or str, optional) – SBSGroup or identifier of the group where the resource will be added (the group is created if necessary). Default to ‘Resources’. Put None to create the resource at the root of the package.
  • aIdentifier (str, optional) – Identifier of the resource. If None, the identifier is taken from the resource path
  • aAttributes (dictionary in the format {AttributesEnum : value(str)}, optional) – attributes of the resource
Returns:

The new SBSResource object

 sbsgenerator.createInputNode(aParentGraph, aIdentifier, aColorMode = sbsenum.ColorModeEnum.COLOR, aAttributes = None, aUsages = None, aSetAsPrimary = False, aParameters = None, aInheritance = None, aGroup = None, aVisibleIf = None)  

Create a new compositing node input with the appropriate color. Declare it as PrimaryInput if this is the first input node. Declare the new SBSParamInput

Parameters:
  • aParentGraph (SBSGraph) – graph which will contain the created Output node
  • aIdentifier (str) – output identifier
  • aColorMode (ColorModeEnum, optional) – color or grayscale. Default is color
  • aAttributes (dictionary in the format {AttributesEnum : value(str)}, optional) – attributes of the output node
  • aUsages (dictionary in the format: {UsageEnum : {UsageDataEnum : string}, optional) – usages of this output
  • aSetAsPrimary (bool, optional) – True to define this input as the PrimaryInput of the graph. Even if False, the input will be set as the PrimaryInput if this is the first input of the graph. Default to False
  • aParameters (dictionary {parameter(CompNodeParamEnum) : parameterValue(str)}, optional) – parameters of the input node
  • aInheritance (dictionary with the format {parameterName(CompNodeParamEnum) : parameterInheritance(ParamInheritanceEnum)}, optional) – Inheritance of the parameters
  • aGroup (str, optional) – GUI group name. Can uses path with ‘/’ separators.
  • aVisibleIf (str, optional) – Condition of visibility of this input
Returns:

The new SBSCompNode object

 sbsgenerator.createInputParameter(aUID, aIdentifier, aWidget, aDefaultValue = None, aOptions = None, aDescription = None, aLabel = None, aGroup = None, aUserData = None, aVisibleIf = None)  

Create a SBSParamInput with the given parameters.

Parameters:
  • aUID (str) – UID of the input parameter
  • aIdentifier (str) – identifier of the input parameter
  • aWidget (WidgetEnum) – widget to use for this parameter
  • aDefaultValue (str, optional) – default value
  • aIsConnectable (bool, optional) – Whether this parameter can be connected for value computation
  • aOptions (dictionary in the format {WidgetOptionEnum: value(str)}, optional) – options
  • aDescription (str, optional) – textual description
  • aLabel (str, optional) – GUI label for this input parameter
  • aGroup (str, optional) – string that contains a group name. Can uses path with ‘/’ separators.
  • aUserData (str, optional) – user tags
  • aVisibleIf (str, optional) – string boolean expression based on graph inputs values
Returns:

The created SBSParamInput object

Raise:

api_exceptions.SBSImpossibleActionError

 sbsgenerator.createIterationOnPattern(aParentObject, aNbIteration, aNodeUIDs, aNodeUIDs_NextPattern = None, aForceRandomSeed = False, aIncrementIteration = False, aGUIOffset = None)  

Duplicate NbIteration times the given pattern of compositing nodes, and connect each pattern with the previous one to create this kind of connection:

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

It allows to completely define the way two successive patterns are connected.

For instance, provide aNodeUIDs = [A, B, C] and aNodeUIDs_NextPattern = [A’], if the pattern is A -> B -> C, and if C is connected to A’

If aNodeUIDs_NextPattern is let empty, the function will try to connect the successive patterns by the most obvious way, respecting the input / output type (color / grayscale)

Parameters:
  • aParentObject (SBSGraph or SBSDynamicValue) – reference SBSObject where the iteration is 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 inputs of the next pattern, which must be connected to the given pattern. Default to []
  • aForceRandomSeed (bool, optional) – specify if a different random seed must be generated for each iteration. Default to False
  • aIncrementIteration (bool, optional) – specify if the parameter ‘iteration’ must be incremented at each iteration. Default to False
  • aGUIOffset (list of 2 float, optional) – pattern position offset. Default to [150, 0]
Returns:

The list of SBSCompNode objects created (including the nodes given in aNodeUIDs_NextPattern), None if failed

Raise:

api_exceptions.SBSImpossibleActionError

 sbsgenerator.createLinkedResource(aSBSDocument, aResourcePath, aResourceTypeEnum = sbsenum.ResourceTypeEnum.BITMAP, aResourceGroup = 'Resources', aIdentifier = None, aAttributes = None, aCookedFormat = None, aCookedQuality = None, isUDIM = False, aForceNew = False)  

Process the given resource: Create a new SBSResource in the folder ResourceGroup if the resource is not already in. Create the SBSGroup ResourceGroup if necessary.

Parameters:
  • aSBSDocument (SBSDocument) – reference document
  • aResourcePath (str) – relative or absolute path to the resource
  • aResourceTypeEnum (ResourceTypeEnum) – type of the resource (BITMAP/SVG/SCENE). Default is BITMAP
  • aResourceGroup (SBSGroup or str, optional) – SBSGroup or identifier of the group where the resource will be added (the group is created if necessary). ‘Resources’ by default. None to put the resource at the root of the package.
  • aIdentifier (str, optional) – Identifier of the resource. If None, the identifier is taken from the resource path
  • aAttributes (dictionary in the format {AttributesEnum : value(str)}, optional) – attributes of the resource
  • aCookedFormat (BitmapFormatEnum, optional) – bitmap format (JPEG/RAW) (only for BITMAP). Default value is RAW
  • aCookedQuality (float between 0 and 1, optional) – bitmap compression quality (only for BITMAP and SVG). Default value is 0
  • isUDIM (bool, optional) – (only for SCENE) True to use UDIMs on this scene resource. Default to False
  • aForceNew (bool, optional) – True to force the resource creation even if it is already included in the package. Default to False
  • isRelToPackage (bool, optional) – the given path is relative, if isRelToPackage is True it is relative to the sbs package otherwise it is relative to cwd.
Returns:

The new SBSResource object

 sbsgenerator.createMDLGraph(aParentObject, aGraphIdentifier)  

Create a new MDL graph with an output node.

Parameters:
  • aParentObject (SBSDocument or SBSContent) – reference to the parent object that will contain this graph
  • aGraphIdentifier (str) – name of the graph
  • aCreateOutputNode (bool) – True to create the output node. Default to True
Returns:

The new SBSGraph object

 sbsgenerator.createMDLNode(aParentGraph, aPath, aParameters = None)  

Create a new MDL node with the given parameters.

Parameters:
  • aParentGraph (MDLGraph) – graph which will contain the created MDL node
  • aImplementationKind (MDLImplementationKindEnum) – kind of mdl node implementation to create
  • aPath (str, optional) – mdl path of the node to create
  • aParameters (dictionary in the format {parameterName(str) : parameterValue(str)}, optional) – parameters of the mdl node
  • aCstAnnotations (dictionary in the format {annotation(MDLAnnotationEnum),annotationValue(str)}, optional) – for a constant: annotations of the mdl node
  • aCstIsExposed (bool, optional) – for a constant: defines if this constant is exposed as an input parameter of the graph
  • aCstName (str, optional) – for a constant: name of the constant. If None, a name is affected by default using the constant type
  • aCstValue (any type, optional) – for a constant: value of the constant
  • aCstTypeModifier (MDLTypeModifierEnum) – for a constant: type modifier to set. Default to ‘auto’
  • aInstanceOfGraph (BaseGraph) – for a Substance or MDL graph instance: the instantiated graph
  • aInstanceDependency (SBSDependency) – for a Substance or MDL graph instance: the associated dependency
Returns:

The new MDLNode object

Raise:

SBSImpossibleActionError

 sbsgenerator.createOutputNode(aParentGraph, aIdentifier, aAttributes = None, aOutputFormat = sbsenum.TextureFormatEnum.DEFAULT_FORMAT, aMipmaps = None, aUsages = None, aGroup = None, aVisibleIf = None)  

Create a new compositing node output. Declare the new SBSRootOutput and SBSGraphOutput

Parameters:
  • aParentGraph (SBSGraph) – graph which will contain the created Output node
  • aIdentifier (str) – output identifier
  • aAttributes (dictionary in the format {AttributesEnum : value(str)}, optional) – attributes of the output node
  • aOutputFormat (TextureFormatEnum, optional) – output format. default value is DEFAULT_FORMAT
  • aMipmaps (MipmapEnum, optional) – default value is FULL_PYRAMID
  • aUsages (dictionary in the format: {UsageEnum : {UsageDataEnum : string}, optional) – usages of this output
  • aGroup (str, optional) – GUI group of this output
  • aVisibleIf (str, optional) – Condition of visibility of this output
Returns:

The new SBSCompNode object

 sbsgenerator.createPreset(aParentGraph, aLabel, aUsertags=None)  

Create a new empty preset with the given label and usertags.

Parameters:
  • aParentGraph (SBSGraph) – The graph associated to the preset to create
  • aLabel (str) – The label of this preset
  • aUsertags (str, optional) – The usertags of this preset
Returns:

the created preset as a SBSPreset

 sbsgenerator.createResourceNode(aFilter, aSBSDocument, aParentGraph, aResourcePath, aParameters = None, aInheritance = None, aResourceGroup = 'Resources', aCookedFormat = None, aCookedQuality = None, aAttributes = None)  

Create a new ‘bitmap’ node using the provided resourcePath. Create the referenced resource if necessary.

Parameters:
  • aFilter (FilterEnum) – Filter type: BITMAP or SVG
  • aSBSDocument (SBSDocument) – reference document
  • aParentGraph (SBSGraph) – graph which will contain the created Bitmap node
  • aResourcePath (str) – internal (pkg:///MyGroup/MyResourceIdentifier), relative (to the current package) or absolute path to the bitmap resource to use as resource
  • aParameters (dictionary in the format {parameterName(CompNodeParamEnum) : parameterValue(str)}, optional) – parameters of the Bitmap node
  • aInheritance (dictionary with the format {parameterName(CompNodeParamEnum) : parameterInheritance(ParamInheritanceEnum)}, optional) – Inheritance of the parameters
  • aResourceGroup (SBSGroup or str, optional) – SBSGroup or identifier of the group where the resource will be added (the group is created if necessary). Default to ‘Resources’. Put None to create the resource at the root of the package.
  • aCookedFormat (BitmapFormatEnum, optional) – resource bitmap format (JPEG/RAW). default value is RAW
  • aCookedQuality (float between 0 and 1, optional) – resource bitmap compression quality. default value is 0
  • aAttributes (dictionary in the format {AttributesEnum : value(str)}, optional) – attributes of the resource
  • aAutodetectImageParameters (bool, optional) – Autodetect and set resolution and bitdepth for the bitmap. Default to False
Returns:

The new SBSCompNode object

Raise:

api_exceptions.SBSImpossibleActionError

 sbsgenerator.createSBSDocument(aContext, aFileAbsPath, aGraphIdentifier = None, aParameters = None, aInheritance = None)  

Create a new sbs document.

Parameters:
  • aContext (Context) – initialized context (contains alias information)
  • aFileAbsPath (str) – destination file of the sbs document (.sbs extension)
  • aGraphIdentifier (str, optional) – name of the graph to create by default. if None, no graph is created
  • aParameters (dictionary with the format {parameterName(CompNodeParamEnum) : parameterValue(str)}, optional) – parameters of the graph (among the sbslibrary.sbslibclasses.BaseParameters only)
  • aInheritance (dictionary with the format {parameterName(CompNodeParamEnum) : parameterInheritance(ParamInheritanceEnum)}, optional) – Inheritance of the parameters
Returns:

The new SBSDocument object

 sbsgenerator.createSBSParamInputFromSBSARInput(aParentGraph, aSBSARInput, aIdentifier=None, aLabel=None, aDefaultValue=None)  

Create a SBSParamInput by giving a SBSARInput. If an identifier, label or default value is not given the aSBSARInput’s values will be used instead.

Parameters:
  • aParentGraph (SBSGraph) – the graph that will receive the parameter
  • aSBSARInput (SBSARInput) – An input from a SBSAR file. SBSParamInput attributes will be derived from it.
  • aIdentifier (str) – given if the new SBSParamInput’s identifier must be different than the aSBSARInput’s identifier
  • aLabel (str) – given if the new SBSParamInput’s label must be different than the aSBSARInput’s label
  • aDefaultValue (str) – given if the new SBSParamInput’s default value must be different than the aSBSARInput one
Returns:

SBSParamInput

 Adobe

Get help faster and easier

New user?