processGraph: declare cache folder earlier

This commit is contained in:
Fabien Castan 2017-09-20 00:53:24 +02:00
parent 48fdf3600f
commit b7c22733f0

View file

@ -284,7 +284,9 @@ class Node:
def updateInternals(self): def updateInternals(self):
self._updateUid() self._updateUid()
self._cmdVars = {} self._cmdVars = {
'cache': pg.cacheFolder,
}
for uidIndex, associatedAttributes in self.attributesPerUid.items(): for uidIndex, associatedAttributes in self.attributesPerUid.items():
assAttr = [(a.attrName, a.uid()) for a in associatedAttributes] assAttr = [(a.attrName, a.uid()) for a in associatedAttributes]
assAttr.sort() assAttr.sort()
@ -293,7 +295,6 @@ class Node:
for name, attr in self.attributes.items(): for name, attr in self.attributes.items():
if attr.attributeDesc.isOutput: if attr.attributeDesc.isOutput:
attr._value = attr.attributeDesc.value.format( attr._value = attr.attributeDesc.value.format(
cache=pg.cacheFolder,
nodeType=self.nodeType(), nodeType=self.nodeType(),
**self._cmdVars) # self._cmdVars only contains uids at this step **self._cmdVars) # self._cmdVars only contains uids at this step