[bin] meshroom_batch: Save the graph once it has been all set up and resolved #2095
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue in
meshroom_batch
which led its executions with the--submit
argument to fail with the following key errors:In order to prevent this, if the
--save
argument has been provided, the graph should be saved outside of theGraphModification
event, once it has been set up entirely and resolved. If it is saved within theGraphModification
, UIDs are not yet available when it is written on disk, so the dictonaries that should be filled with them are empty.This does not cause any issue for the rest of the execution of
meshroom_batch
if the graph is to be computed locally, since the UIDs will be computed right after (but they still will never be written in the project file).However, when submitting the graph to a renderfarm, the project file is loaded again. If it does not contain any UID:
UidConflict
compatibility issue;