compnode_common module
Module compnode.common provides the definition of SBSCompOutput, SBSOutputBridging and
SBSCompImplWithParams, which are used in the other modules in compnode
- class compnode.common.SBSCompImplWithParams(aParameters=None)
Bases:
SBSObjectThis class allows to gather the parameter management for classes
SBSCompFilter,SBSCompInstance,SBSCompInputBridgeandSBSParamsGraphData- Members:
mParameters (list of
SBSParameter): input parameters list.
- 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.
- abstractmethod getDefinition()
Get the definition of the node (Inputs, Outputs, Parameters)
- Returns:
a
CompNodeDefobject
- abstractmethod getDisplayName()
Get the display name of this node
- Returns:
the display name as a string
- getParameterValue(aParameter)
Find a parameter with the given name/id among the overloaded parameters and the default node parameters, and return its value.
- Parameters:
aParameter (
CompNodeParamEnumor str) – Parameter identifier- Returns:
The parameter value if found (string or
SBSDynamicValue, None otherwise
- getUidIsUsed(aUID)
Check if the given uid is already used in the context of this SBSObject.
- Parameters:
aUID (str) – UID to check
- Returns:
True if the uid is already used, False otherwise
- Raise:
AttributeError if the function getUidIsUsed in not properly overloaded on this SBSObject
- hasIdenticalParameters(self, other)
Allows to check if two nodes has the same parameters defined with the same values.
- Parameters:
other (
SBSCompImplWithParams) – the node to compare with- Returns:
True if the two nodes has the same parameters, False otherwise
- parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
- setDynamicParameter(aParameter, aRelativeTo=None)
Set the given parameter as dynamic, to init its params.SBSDynamicValue. If Inheritance is None, the default Inheritance for this node is set.
- Parameters:
aParameter (
CompNodeParamEnumor str) – identifier of the parameteraRelativeTo (
ParamInheritanceEnum) – Inheritance of the parameter
- Returns:
the
SBSDynamicValueobject if succeed, None otherwise- Raise:
api_exceptions.SBSLibraryError
- setParameterValue(aParameter, aParamValue, aRelativeTo=None)
Set the value of the given parameter to the given value, if compatible with this node.
- Parameters:
aParameter (
CompNodeParamEnumor str) – identifier of the parameter to setaParamValue (
SBSDynamicValueor any parameter type) – value of the parameteraRelativeTo (
ParamInheritanceEnum) – Inheritance of the parameter. Default is ABSOLUTE
- Returns:
True if succeed, False otherwise
- Raise:
api_exceptions.SBSLibraryError
- unsetParameter(aParameter)
Unset the given parameter so that it is reset to its default value.
- Parameters:
aParameter (
CompNodeParamEnumor str) – identifier of the parameter to set- Returns:
True if succeed, False otherwise
- Raise:
api_exceptions.SBSLibraryError
- class compnode.common.SBSCompInputValue(aIdentifier='', aType=None)
Bases:
SBSObjectClass that contains information about an input value in a .sbs file
- Members:
mIdentifier (str): Identifier for the input value.
mType (str): Type for the value. Type definition:
ParamTypeEnum
- 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.
- getUidIsUsed(aUID)
Check if the given uid is already used in the context of this SBSObject.
- Parameters:
aUID (str) – UID to check
- Returns:
True if the uid is already used, False otherwise
- Raise:
AttributeError if the function getUidIsUsed in not properly overloaded on this SBSObject
- parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
- class compnode.common.SBSCompOutput(aUID='', aCompType=None)
Bases:
SBSObjectClass that contains information on a compositing node output as defined in a .sbs file
- Members:
mUID (str): node output unique identifier in the /compNodes/compOutputs/ context.
mCompType (str): return type of the output (color or grayscale). Type definition:
ParamTypeEnum
- 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.
- getUidIsUsed(aUID)
Check if the given uid is already used in the context of this SBSObject.
- Parameters:
aUID (str) – UID to check
- Returns:
True if the uid is already used, False otherwise
- Raise:
AttributeError if the function getUidIsUsed in not properly overloaded on this SBSObject
- parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
- class compnode.common.SBSOutputBridging(aUID='', aIdentifier='')
Bases:
SBSObjectClass that contains information on an output bridging as defined in a .sbs file
- Members:
mUID (str): uid of the compositing node output (/compNode/compOutputs/compOutput/uid).
mIdentifier (str): graph definition output identifier (/graph/graphOutputs/graphOutput/identifier)
- 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.
- getUidIsUsed(aUID)
Check if the given uid is already used in the context of this SBSObject.
- Parameters:
aUID (str) – UID to check
- Returns:
True if the uid is already used, False otherwise
- Raise:
AttributeError if the function getUidIsUsed in not properly overloaded on this SBSObject
- parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.