Skip to content

Commit f870290

Browse files
committed
[core] node: Correctly use fullSize instead of nbChunks to set chunks from cache
1 parent 351b73d commit f870290

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

meshroom/core/node.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ def nbChunks(self):
185185
nbBlocks = self.chunks.nbBlocks if self.chunks else -1
186186
return nbBlocks
187187

188+
@property
189+
def fullSize(self):
190+
fullSize = self.chunks.fullSize if self.chunks else -1
191+
return fullSize
192+
188193
def getChunkRanges(self):
189194
if not self.chunks:
190195
return []
@@ -2282,7 +2287,7 @@ def __createChunks(self, ranges):
22822287
for c in self._chunks:
22832288
c.statusChanged.connect(self.globalStatusChanged)
22842289
logging.debug(f"Created {len(self._chunks)} chunks for node: {self.name}")
2285-
else:
2290+
else:
22862291
for chunk, range in zip(self._chunks, ranges):
22872292
chunk.range = range
22882293
except RuntimeError:
@@ -2307,7 +2312,7 @@ def createChunksFromCache(self):
23072312
""" Create chunks when a node cache exists. """
23082313
try:
23092314
# Get size from cache
2310-
size = self._nodeStatus.nbChunks
2315+
size = self._nodeStatus.fullSize
23112316
self.setSize(size)
23122317
ranges = self._nodeStatus.getChunkRanges()
23132318
self.__createChunks(ranges)

0 commit comments

Comments
 (0)