Add nodes computed in renderfarm to Taksmanager on open scene

This commit is contained in:
Lee Geertsen 2019-09-06 11:03:38 +02:00 committed by Yann Lanthony
parent 3c32aaeecd
commit 5aea330400
No known key found for this signature in database
GPG key ID: 519FAE6DF7A70642
2 changed files with 13 additions and 1 deletions

View file

@ -551,6 +551,9 @@ class BaseNode(BaseObject):
def alreadySubmittedChunks(self): def alreadySubmittedChunks(self):
return [ch for ch in self._chunks if ch.isAlreadySubmitted()] return [ch for ch in self._chunks if ch.isAlreadySubmitted()]
def isExtern(self):
return self._chunks.at(0).isExtern()
@Slot() @Slot()
def clearSubmittedChunks(self): def clearSubmittedChunks(self):
""" Reset all submitted chunks to Status.NONE. This method should be used to clear inconsistent status """ Reset all submitted chunks to Status.NONE. This method should be used to clear inconsistent status

View file

@ -155,7 +155,16 @@ class TaskManager(BaseObject):
self._nodesExtern = [] self._nodesExtern = []
self._nodesToProcess = [] self._nodesToProcess = []
def update(self, graph):
"""
Add all the nodes that are being rendered in a renderfarm to the taskmanager when new graph is loaded
:param graph:
:return:
"""
for node in graph._nodes:
if node.isAlreadySubmitted() and node._chunks.size() > 0 and node.isExtern():
self._nodes.add(node)
self._nodesExtern.append(node)
def submit(self, graph=None, submitter=None, toNodes=None): def submit(self, graph=None, submitter=None, toNodes=None):
""" """