Documentation for Substance Automation Toolkit is now included in the SAT package. You can access the documentation by opening html-doc.zip inside your downloaded SAT package.
sbsimpactmanager
class sbsimpactmanager.DependencyStatus(absolute_file_path='', relative_file_path='')
Bases: object
Class that contains information of the dependency
- Members:
-
- absolute_file_path (str, optional): absolute file path of the dependency
- relative_file_path (str, optional): relative file path of the dependency
- file_readable (bool): is file readable
- file_exist (bool): is file exist
file_exist
file_readable
class sbsimpactmanager.SBSImpactManager(aContext=None)
Bases: object
Class used to provide useful functions to propagate changes done a Substance on all the Substances within a particular tree
confirm(promptMsg=None, defaultResponse=False)
Prompts for yes or no response from the user.
| Parameters: |
|
|---|---|
| Returns: | True for yes and False for no. |
declareSBSMoved(self, aContext, oldPath, newPath, withinTree, interactiveMode = True, stopOnException = True)
Allows to declare the fact a substance has been move from the oldPath to the newPath.
This will update all the Substance files (.sbs) in the given tree that had a dependency on the Substance that had been moved.
| Parameters: |
|
|---|---|
| Returns: | the list of updated Substance paths |
getAllSubstancesInTree(rootPath, excludeAutosave=True, excludeFolders=None)
Get all the Substance files (.sbs) within a particular tree
| Parameters: |
|
|---|---|
| Returns: | the Substance files as a list of absolute paths |
getAllSubstancesWithDependencyOn(self, aContext, substancePath, withinTree, stopOnException = True)
Get all the Substances (.sbs) that have a dependency on the given Substance (.sbs or .sbsar), within the given tree.
| Parameters: |
|
|---|---|
| Returns: | the list of referencing Substances as |
getErrorPackages()
Allows to get the list of packages that raised error during the last impact propagation
| Returns: | The list of packages path in error as a list string |
|---|
getSBSTreeDependencies(aSubstancePath, escapeDefaultSbs=False, checkMissingFile=False, escapeMismatchVersion=False)
Return a tree under a dict form of all aSubstancePath’s dependencies recursively. The tree schema
{"/a/sbs/file.sbs":
{<impactmanager.'DependencyStatus' (/a/dep/file.sbs)>:
[{<impactmanager.'DependencyStatus' (/another/dep/file.sbs)>:
[]
}]
}
}
Each key is a DependencyStatus and value a list of dependencies dict DependencyStatus The result tree is also store in self.dependenciesTree member
| Parameters: |
|
|---|---|
| Returns: | dict |
getSBSTreeDependenciesForAllSubstanceInTree(aRootPath, excludeFolders=None, escapeDefaultSbs=False, checkMissingFile=False, escapeMismatchVersion=False)
For all sbs files found in the aRootPath’s tree, getSBSTreeDependencies will be run.
| Parameters: |
|
|---|---|
| Returns: | list |
getUpdatedPackages()
Allows to get the list of packages updated with the last impact propagation
| Returns: | The list of packages path as a list string |
|---|
reset()
Reset the exporter to its initial state
sbsimpactmanager.imRawInput(s)
Function used to specify the input used by the interactive mode of SBSImpactManager. By default it uses the Python standard input, but it can be redefined to mock the standard input.