If unexposed attributes (ie. attributes that are located in the lower
side of a node, and hidden by default) are connected, they are meant
to remain visible even if the lower part of that node is hidden.
This was working fine for any attribute that was not a `ListAttribute`,
as the check was made on whether the attribute's value was a link to
another attribute. For `ListAttributes`, whose value is actually a list
of values, this was not working as nested links were not checked.
Instead of relying on the `isLink` property, we now use `isLinkNested`:
for regular attributes, this is equivalent to using `isLink`, but for
`ListAttributes`, the full list of values will be checked.
This fixes the following QML warnings that may appear when performing
lots of operations on edges:
`Unable to assign [undefined] to QString/bool`
These warnings do not seem to have any functional impact on the connection
processes.
If attribute is disabled but has output connections, it becomes grey.
If the connection is removed while being disabled, it hides itself.
Both is working in GraphEditor on the nodes and in the AttributeEditor.
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.
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
The tooltip that is displayed when hovering over the icon specifies
which loader will be used, depending on the type of output attribute
(either the Image/2D viewer, or the 3D viewer).
If the node has been computed (i.e. its status is `SUCCESS`) and has at
least one output that can be loaded in the 2D viewer, then display an icon
with a tooltip that indicates that double-clicking the node allows to load
it and its outputs in the 2D Viewer.
The tooltip now displays both the invalidation message, followed by the
comments. The invalidation message is displayed first in bold font,
followed by an empty line and the comments in regular font.
The tooltip now appears if at least one of the invalidation or comment
messages exists.
The invalidation and comment messages are formatted with HTML tags prior
to their display. The descriptions of both attributes is also updated
to indicate which one is displayed in bold or regular font.
The "label", "color" and "comment" properties are not constant anymore,
their changes in value are notified with the internalAttributesChanged()
signal, like the "invalidation" property.
This implies that the connection on "internalAttributesChanged" on the
QML side is not needed anymore.
Setting this attribute allows the user to change the color
of a node, either by directly providing an SVG color name or an
hexadecimal color code, or by picking a color with the selector.
A node running externally used to mean it was running on a submitter.
This definition has been extended and a node is now considered to be
external if it is running on a submitter or running in another instance
of Meshroom. The "Computed Externally" is updated to reflect that
change.
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.