For IntParam and FloatParam, which may have ranges, check before loading
the node that the non-null ranges are of the same type as the attribute.
If at least a range is not correct (e.g. "(0, 10, 0.1)" for a FloatParam,
for which "(0.0, 10.0, 0.1)" is expected), then the node is rejected (in
the same manner as when a default value is deemed invalid).
At Meshroom's launch, check that every node we attempt to load has a
valid description, i.e. that every parameter has a default value that
matches its parameter's type.
If there is at least one parameter with an incorrect default value,
the node is not loaded and a corresponding message will be displayed.
This prevents the user from loading erroneous nodes that may lead to
unexpected behaviours (such as a change of a node's UID between the
moment when it is written and the moment it is loaded).
Fix default values for:
- DepthMap: refineSigma (FloatParam); use float instead of int
- ImageMasking: hsvMaxSaturation (FloatParam); use float instead
of int
- ImageMasking: hsvMaxValue (FloatParam); use float instead of
int
- Meshing: estimateSpaceMinObservationAngle (FloatParam); use
float instead of int
- PanoramaInit: yawCW (BoolParam); use bool instead of int
Fix the parameters with default values that do not correspond to
the parameters' types. For CameraInit, all the default values of
FloatParams that are set with integers are replaced with actual
float values.
These default values with an erroneous type would cause changes
in the CameraInit's UID when the intrinsics' default values were
written (with values of the correct type) and when they were
loaded (with values of the wrong type).
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).
If a node is being hovered when the user performs the paste, an
offset is added to the mouse's position, both in the horizontal and
vertical directions. This aims at avoiding a complete overlap with
the nodes on top of which the clipboard content is pasted.
The mouse's position is the top-left corner of a zone in which all
the selected nodes will be pasted. The bottom-right corner of that
zone is (x, y), with x the maximum of the selected nodes' position
along the x-axis and y the maximum of the selected nodes' position
along the y-axis.
The nodes relative position to one another - if positions are provided -
is preserved.
If no node in the selection has a specified position, the nodes will
be pasted from left to right alphabetically, with the top-left corner
of the first node at the mouse's position.
If several nodes are described in the clipboard and are supposed to
be connected with each other, reconnect them together, but do not
attempt to reconnect them to the graph they were copied from, even if
it is the current graph.
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.
If a node of type "CameraInit" is double-clicked in the Graph Editor,
the Image Gallery group index will immediately be updated to display
the corresponding node's information.
If an attribute is a link, when checking whether its value is
the default value, only the resolved value should be compared
with the default one. Otherwise, the attribute's "isDefault"
property will always evaluate to True, even when a non-default
link has been provided.
This issue was especially evident with input File attributes,
for which the default value is generally '' (empty string); if a
link was set as a value (thus non-empty), its unresolved value
would still be '', thus setting the "isDefault" property to True.