Re-write the computability status of the current node selection
as properties within the node menu component.
Note that this should be further improved to better scale with the size
of the selection, as it requires to traverse the graph for each node.
Avoid having the node context menu always evaluating the current
state of the selected nodes for its own display, by dynamically
creating it on demand with a Loader.
Use callbacks for recomputing/resubmitting actions, instead of
storing state in the UI components.
Switch selection management backend to a QItemSelectionModel,
while keeping the current 'selectedNodes' API for now.
Use DelegateSectionBox for node selection in the graph, and
rewrite the handling of node selection / displacement.
Fixed the issue where navigation arrows on the Filtering was allowing to set an index even when the search had null as the result.
Accepted signal on the Seach invokes the function rather than invoking the sigal for the button
The color selector in the Graph Editor provides a quick way to color nodes with predefined palette of colors.
Added Command to allow the Coloring to be undone and redone using QUndoStack
Editing the pins manually was useful when trying to hide fully the
connection whenever there was an edge connected to an attribute that
was disabled. Disabled attributes now have a special display if they are
connected, meaning both ends of the edge do not need artificial updates.
When an edge is removed, the pins it is connected to are
updated depending on their status while the edge is getting destroyed. When the window is
closing, all the components are being destroyed while the QML context is being invalidated: no function call to components that are being destroyed should be made in that context.
This commit checks whether there is a node in the graph before trying
to determine the size and position of the bounding box. If the graph is
empty, an bounding box set with 0s is returned.
This commit effectively hides a node's attributes when they are disabled.
If these attributes have connections, the edges representing these
connections are hidden but not destroyed. When the edges are hidden, if
one of the connected attributes is still enabled, its pin becomes empty as
if it was not connected to anything.
If the disabled attribute is re-enabled and the connection has not been
broken (if the enabled attribute on the other side of the edge has not
been reconnected to another attribute, for example), the edge re-appears.
If the connection has been broken, then the attribute will be unconnected.
Hidden connections are saved in project files and taken into account when
a project file containing some is loaded.
Warning dialog when project and images are dropped, both for
ImageGallery and GraphEditor.
Counter of meshroom projects and compare to actual list of files
dragged.
In Image Gallery :
- drop 1 .mg open the scene
- drop images either create new camera or augment the reconstruction
In Graph Editor :
- drop 1 .mg open the scene
- drop images create new camera at position of mouse
This commit addresses warnings that were raised by QtCreator's linter:
- IDs declared more than once
- variables declared more than once in the same scope
- type coercions
- variables declared as "var" when their type is known
- unclosed "case" in switch-case
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.