mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 00:38:41 +02:00
Ignore "Publish" nodes when loading a template unless specified otherwise
This commit adds an option to the "load" method, "publishOutputs", that determines whether "Publish" nodes in a template project file should be ignored during the graph's creation. If "publishOutputs=True", then the "Publish" nodes from the template will be added to the graph. "Publish" nodes in a project file that is not a template will not be affected by this and will always be added to the graph, as any other node. This allows to have templates that are compatible with meshroom_batch, which requires a "Publish" node when the --output option is specified, while not having unneeded nodes in the UI or unneeded operations: when --output is specified in meshroom_batch, "publishOutputs=True", otherwise it will be set to False so that the "Publish" nodes are not executed needlessly.
This commit is contained in:
parent
fd5fc8e3ba
commit
99b82e601f
4 changed files with 24 additions and 18 deletions
|
@ -488,9 +488,9 @@ class Reconstruction(UIGraph):
|
|||
self.load(p, setupProjectFile=False)
|
||||
|
||||
@Slot(str, result=bool)
|
||||
def load(self, filepath, setupProjectFile=True):
|
||||
def load(self, filepath, setupProjectFile=True, publishOutputs=False):
|
||||
try:
|
||||
status = super(Reconstruction, self).loadGraph(filepath, setupProjectFile)
|
||||
status = super(Reconstruction, self).loadGraph(filepath, setupProjectFile, publishOutputs)
|
||||
# warn about pre-release projects being automatically upgraded
|
||||
if Version(self._graph.fileReleaseVersion).major == "0":
|
||||
self.warning.emit(Message(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue