Update the names of the commands that remove images in the "File"
menu to match with those in the Image Gallery menu.
"Clear Images" becomes "Remove All Images" and "Clear All Images" becomes
"Remove Images From All CameraInit Nodes".
Prior to this commit, the `StructureFromMotion` and `SfMTransform` nodes'
were directly set without using the dedicated command. This meant that
the actions to set those attributes through the Image Gallery menu were
not added to the stack of commands, and could not be undone.
In addition to the existing "Remove" menu action in the Image Gallery that
deletes the currently selected image, add a "Remove All Images" menu
action that performs the same action as "Clear Images" from the "File"
menu.
The "Del" key was used as a shortcut to remove the currently selected
image when the Image Gallery has the focus, "Shift+Del" can now also be
used to remove all the images at once.
Add input String parameters to determine the name of the generated outputs.
These attributes include:
- the name of the generated output panorama
- the name of the generated output panorama preview
The base folder for these outputs remains the node's cache, only the
name of the outputs themselves can be updated.
The output attribute about the downscaled levels of the panorama is also
modified with the new name of the pyramid levels, which is a concatenation
of the generated panorama's name and the size of the current level.
When parsing the input JSON file, there might be some instances where
the `poses` key, unlike the `views` and `intrinsics` keys, does not exist.
If that is the case, an unhandled exception is raised while connections
are being made, which then causes issues for the lifetime of the Meshroom
instance.
This commit checks that the key exists before trying to access it, which
prevents raising unhandled exceptions while the active project is being
set up.
If enabled, the current state of the scene will be dumped as an SfMData
file every 3 resections. Before this option was added, the intermediate
steps were always dumped.
When all the images in the gallery are cleared using the "Clear Images" or
"Clear All Images" menu action while the "Visualize HDR images" option is
turned on, the gallery is correctly emptied and the viewer correctly reset
but the button remains turned on even though there is nothing left to show.
As it is turned on (although with a "0" count), the gallery remains in
read-only mode and no more image can be dropped until the button is
manually clicked to be turned off. Even after that, it remains clickable
instead of being disabled.
This commit ensures that the button gets disabled if the number of
viewpoints is 0 (meaning the gallery is empty). That way, the button
correctly reflects the current situation, and the gallery is ready to have
images dropped.