@@ -681,7 +681,7 @@ def __init__(self, nodeType: str, position: Position = None, parent: BaseObject
681681 self .dirty : bool = True # whether this node's outputs must be re-evaluated on next Graph update
682682 self ._chunks = ListModel (parent = self )
683683 self ._uid : str = uid
684- self ._cmdVars : dict = {}
684+ self ._expVars : dict = {}
685685 self ._size : int = 0
686686 self ._logManager : Optional [LogManager ] = None
687687 self ._position : Position = position or Position ()
@@ -695,7 +695,7 @@ def __init__(self, nodeType: str, position: Position = None, parent: BaseObject
695695
696696 self .globalStatusChanged .connect (self .updateDuplicatesStatusAndLocked )
697697
698- self ._staticCmdVars = {
698+ self ._staticExpVars = {
699699 "nodeType" : self .nodeType ,
700700 "nodeSourceCodeFolder" : self .sourceCodeFolder
701701 }
@@ -965,24 +965,24 @@ def _computeInternalFolder(self, cacheDir):
965965 nodeType = self .nodeType ,
966966 uid = self ._uid )
967967
968- def _buildCmdVars (self ):
968+ def _buildExpVars (self ):
969969 """
970970 Generate command variables using input attributes and resolved output attributes
971971 names and values.
972972 """
973- def _buildAttributeCmdVars ( cmdVars , name , attr ):
973+ def _buildAttributeExpVars ( expVars , name , attr ):
974974 if attr .enabled :
975975 # xxValue is exposed without quotes to allow to compose expressions
976- cmdVars [name + "Value" ] = attr .getValueStr (withQuotes = False )
976+ expVars [name + "Value" ] = attr .getValueStr (withQuotes = False )
977977
978978 if isinstance (attr , GroupAttribute ):
979979 assert isinstance (attr .value , DictModel )
980980 # If the GroupAttribute is not set in a single command line argument,
981981 # the sub-attributes may need to be exposed individually
982982 for v in attr ._value :
983- _buildAttributeCmdVars ( cmdVars , v .name , v )
983+ _buildAttributeExpVars ( expVars , v .name , v )
984984
985- self ._cmdVars = {
985+ self ._expVars = {
986986 "uid" : self ._uid ,
987987 "nodeCacheFolder" : self ._internalFolder ,
988988 }
@@ -991,16 +991,16 @@ def _buildAttributeCmdVars(cmdVars, name, attr):
991991 for name , attr in self ._attributes .objects .items ():
992992 if attr .isOutput :
993993 continue # skip outputs
994- _buildAttributeCmdVars (self ._cmdVars , name , attr )
994+ _buildAttributeExpVars (self ._expVars , name , attr )
995995
996996 # For updating output attributes invalidation values
997- cmdVarsNoCache = self ._cmdVars .copy ()
998- cmdVarsNoCache ["cache" ] = ""
997+ expVarsNoCache = self ._expVars .copy ()
998+ expVarsNoCache ["cache" ] = ""
999999
10001000 # Use "self._internalFolder" instead of "self.internalFolder" because we do not want it to
10011001 # be resolved with the {cache} information ("self.internalFolder" resolves
10021002 # "self._internalFolder")
1003- cmdVarsNoCache ["nodeCacheFolder" ] = self ._internalFolderExp .format (** cmdVarsNoCache , ** self ._staticCmdVars )
1003+ expVarsNoCache ["nodeCacheFolder" ] = self ._internalFolderExp .format (** expVarsNoCache , ** self ._staticExpVars )
10041004
10051005 # Evaluate output params
10061006 for name , attr in self ._attributes .objects .items ():
@@ -1022,8 +1022,8 @@ def _buildAttributeCmdVars(cmdVars, name, attr):
10221022 format (nodeName = self .name , attrName = attr .name ))
10231023 if defaultValue is not None :
10241024 try :
1025- attr .value = defaultValue .format (** self ._cmdVars )
1026- attr ._invalidationValue = defaultValue .format (** cmdVarsNoCache )
1025+ attr .value = defaultValue .format (** self ._expVars )
1026+ attr ._invalidationValue = defaultValue .format (** expVarsNoCache )
10271027 except KeyError as e :
10281028 logging .warning ('Invalid expression with missing key on "{nodeName}.{attrName}" with '
10291029 'value "{defaultValue}".\n Error: {err}' .
@@ -1036,7 +1036,7 @@ def _buildAttributeCmdVars(cmdVars, name, attr):
10361036 err = str (e )))
10371037
10381038 # xxValue is exposed without quotes to allow to compose expressions
1039- self ._cmdVars [name + 'Value' ] = attr .getValueStr (withQuotes = False )
1039+ self ._expVars [name + 'Value' ] = attr .getValueStr (withQuotes = False )
10401040
10411041
10421042 def createCmdLineVars (self ):
@@ -1332,7 +1332,7 @@ def updateInternals(self, cacheDir=None):
13321332 # Update command variables / output attributes
13331333 self ._computeUid ()
13341334 self ._computeInternalFolder (cacheDir )
1335- self ._buildCmdVars ()
1335+ self ._buildExpVars ()
13361336 if self .nodeDesc :
13371337 self .nodeDesc .postUpdate (self )
13381338 # Notify internal folder change if needed
0 commit comments