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.
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.
Add new type of ChoiceParam that changes dynamically according to other
values.
When value of an attribute is changed onAttributeChanged is called,
allowing to have unique reaction within node files.
Also add of callDesc function to be able to have other functions such as
onNodeCreated at creation of node.
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
...for node attributes and 3D inspector
- add search bar for node attributes
- add search bar for 3D inspector
- improve attributes filtering by adding more flexibility
and fixing some issues
If an attribute's `validValue` is false, and it has a non-empty
`errorMessage`, the following will happen:
- An icon indicating an error will be added next to the attribute's name;
- The color of the label's background will change to red to clearly
indicate that something is wrong with the current value;
- The error message that has been set for this attribute will be displayed
in its tooltip, before its regular description.
Also extend the width of the "Node" column to ensure that all nodes,
even those with a long name, can be displayed correctly without overlapping
on the "Issue" column.
If a node has a user-set label (defined through the internal attributes
of the node), its default name (the one that is displayed if no label
has been set) will be displayed next to it.
This allows to find quickly the correspondence between the node's label
and its type / how it is referred to in the current graph's file.
By setting the height on the "onLoaded" event, no height update was
possible unless the component was unloaded (which happens when "active"
gets set to false) first and then reloaded (which happens when "active"
gets set to true). If an attribute was to be hidden (by unchecking the
"advanced attributes" checkbox, for example), its content was effectively
hidden, but as its height was not being updated, a blank block remained
in its place.
Similarly, for attributes that are filled with a lot of content after
being initialized (ChoiceParams, for example), the height was set once
at the attribute's initialization but never updated afterwards.
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.
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 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.
Add two internal attributes, "Comment" and "Invalid comment", in
a specific "Notes" tab, which will contain any further internal
attribute. Internal attributes exist for all nodes.
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.
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.