This ensures that each node's status is correct before being computed,
submitted, or before having its data deleted. This is especially useful
when the File Poller is in minimal node, and only monitors the nodes that
are currently submitted or running.
If a graph is being opened in two different instances of Meshroom, and
computations are started on it in one of the instances, the other one will
not be aware of it (as the signals indicating computations have started
will have been emitted in the first instance, so no chunk will be added
to the monitoring in the second one). By forcing the update of the statuses
before actually starting computations or deleting data, we ensure that
there will not be any computational conflicts (same nodes submitted twice
in farm, for example) and that the users can know at all times what they
are doing without manually triggering a refresh.
This is not critical for the "Delete Data" part, as the action can already
be triggered even with there is no data to delete, but is still useful
to keep the displayed nodes as up-to-date with their actual status as
possible.
The default auto-refresh mode of the file watcher checks, every 5 seconds,
every single chunk's status, which may be overkill. Instead of simply
disabling the file watcher, this commit adds a third option that checks,
every 5 seconds, the status of submitted and running chunks. If no chunk
is currently submitted or running, then the file watcher's thread keeps
on running but does nothing.
Additionally, the file watcher is automatically disabled by default if
Meshroom is started without a submitter.
By default, the file watcher polls every single node's file every 5
seconds, independently from their status. This commit adds a button
in the GraphEditor to disable or enable the file watcher at will.
Prior to saving the images' locations across sessions, if no image had
been yet imported but a project file with images had been opened, the
default base folder for the session became the project images' location.
The location of dropped images back then was never saved.
Now that the locations from the "Import Images" are saved across session,
the possibilities of having no location saved have drastically decreased.
The three cases where it can happen are the following:
- the user has never opened Meshroom before (or the user has been using
Meshroom without ever using "Import Images")
- the user has cleared their Meshroom settings
- the 3 saved locations have become invalid
For these three cases, the default base folder is either set to the
location of the first dropped image or to the opened project's images.
That location is NOT saved for later sessions. Using the "Import Images"
action is necessary for the location to be saved.
Save up to 3 folder locations from which images have been imported.
These folder locations will be saved across Meshroom sessions, in
a similar fashion as the "Recent Files" entries.
If no folder location has been saved (or if all saved folder locations
are invalid), we fall back to the default behaviour: if a project with
images has been opened before the "Import Images" action is called, then
the base folder will be the folder containing the opened project's
images.
If a project has already been opened before the "Import Images" dialog
is opened for the first time, and if the opened project has imported
images, use the location of these images' folder as the base folder for
the "Import Images" dialog.
If the opened project has no imported images, the base folder will remain
identical to the other dialogs' until images are imported.
This commit changes the folder in which the "Import Images" dialog
opens: it used to be opened in the folder in which the last .mg file
had been opened, and it now opens in the folder from which the last
images were imported.
The location of the last imported images is saved, and used specifically
when opening the "Import Images" dialog, as opposed to all the other
dialogs which open in the folder of the last opened .mg file.
- Remove the "New" menu; the "Ctrl+N" shortcut remains valid to create
new default pipelines
- Move the "Save As Template" and "Import Project" actions into an
"Advanced" menu; their behaviour and shortcuts remain unchanged
- Add menu separators between the "Open" and "Save" functionalities,
the "Save" and "Import Images" functionalities, the "Import Images"
and "Advanced" functionalities, and the "Advanced" and "Quit"
functionalities.
Some QML properties access exposed Python objects that may or may not
be null upon their access. When these objects are accessed while null,
QML issues "TypeError" warnings. These warnings have no functional
impact as QML correctly handles trying to access null objects, but can
spam the logs.
This commit aims at fixing all these warnings by checking that the
Python objects are not null before being accessed.
If a Ctrl+C or Ctrl+V shortcut is performed outside the GraphEditor,
the performed action should not be a copy or a paste of the nodes, but
the own copy/paste of the current element (e.g. if a Ctrl+C is made on
on the NodeEditor, then the copied element should be the one selected
in the NodeEditor, not the currently selected node).
Add a specific option to save a graph as a template ("Save As
Template") in "minimal" mode.
This mode only saves, for each node in the graph, the input and
output attributes whose values differ from the default ones. Any
attribute that is not serialized in the saved template file is
assumed to have its default value.
If a conflict is detected on a node when opening the template
file, it is logged but solved automatically.
The goal of this minimal mode is to prevent template files from
needing an update every single time a modification (may it be
minor or major) is done on a node description. Templates can
thus follow node changes and still be usable.
Add an "Import Scene" (Ctrl+Shift+I) option in the File menu
that allows to select an existing .mg file and import it in the
current graph.
The imported scene will automatically be placed below the lowest
existing node along the Y axis.
The "New Pipeline" menu is automatically filled with the list
of the project files that were found dynamically. Pipelines can thus
be initialized with templates without restarting Meshroom app.
## Description
Fix various typos in the source code. This includes user facing code, documentation, and source comments. This PR has not been tested.
Closes#1605
Computing: lock the undo stack at the current index to avoid going back too far and potentially alter computing process.
Submitting: clear the undo stack.