Commit graph

272 commits

Author SHA1 Message Date
Aurore LAFAURIE
c3ab36deb0 [ui] Cut option available in GraphEditor 2024-05-06 17:11:54 +02:00
Aurore LAFAURIE
0a770f474f [ui] Disabled behavior applied to all types of parameters and attributes
Disabled behavior applied to all types of parameters and attributes
2024-04-19 17:16:21 +02:00
Aurore LAFAURIE
8d0dc4d62e [ui] Usage of Colors palette
Use of Colors palette instead of Qt palette because doesn't work by now
for disabled elements (until Qt6).
2024-04-19 17:16:21 +02:00
Aurore LAFAURIE
1b55dc8649 [ui] Attribute becomes grey in graph editor and attribute editor when connected but disabled
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.
2024-04-19 17:16:20 +02:00
Candice Bentéjac
6f1ac9a06e [ui] Hide disabled File attributes and their edges but keep the connections
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.
2024-04-19 17:16:20 +02:00
Aurore LAFAURIE
f3027d1988 [ui] Visible property handles the show of an output attribute in the node in the GraphEditor 2024-04-12 15:43:35 +02:00
Aurore LAFAURIE
27aceb33e1 [ui] fix : invalide value when reopening AttributeEditor 2024-04-09 14:46:25 +02:00
Candice Bentéjac
3f3f2e647d [GraphEditor] Use attribute.values for the model
Following the modifications that introduce the dynamic choices, we use
the list of attributes instead of the description of the attributes.
2024-04-09 14:46:25 +02:00
Aurore LAFAURIE
9007dbdbfd [ui] Validate value even if not in values of ComboBox, Arrow Keys Navigation and Case insensitive 2024-04-08 17:46:57 +02:00
Aurore LAFAURIE
57a02fc50c Filter text reset when attribute reset 2024-04-08 17:46:56 +02:00
Aurore LAFAURIE
c439c5a06e Add FilterComboBox.qml and update AttributeItemDelegate.qml 2024-04-08 17:46:31 +02:00
Candice Bentéjac
9edfc39b48
Merge pull request #2350 from alicevision/dev/dynamicChoices
[core] Add new type of ChoiceParam that changes dynamically
2024-04-08 13:52:24 +01:00
Candice Bentéjac
04a7191b15 [ui] Simplify error dialog titles and capitalize first letters 2024-04-05 18:06:23 +02:00
Aurore LAFAURIE
dea13eb48a [ui] Warning dialog when project and images are dropped
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.
2024-03-28 16:42:17 +01:00
Aurore LAFAURIE
498fd6cbd2 [core] Add new type of ChoiceParam that changes dynamically according to other values
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.
2024-03-28 12:06:40 +01:00
Aurore LAFAURIE
67fbf1b00f [ui] drag&drop: common behavior for graph editor and image gallery
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
2024-03-28 11:28:29 +01:00
Candice Bentéjac
e9d80611c7 [GraphEditor] Clean-up: Harmonize syntax across all files 2023-11-06 16:28:22 +01:00
Candice Bentéjac
b916a923e1 [GraphEditor] AttributeItemDelegate: Fix binding loop warning 2023-11-06 16:28:20 +01:00
Abdelrahman AL MAROUK
af8eabfa97 [ui] add searchbar for graph nodes 2023-09-01 09:03:39 +02:00
Abdelrahman AL MAROUK
b5093ac3a0 [ui] improve atts filtering and add search bar ...
...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
2023-08-30 16:21:11 +02:00
Abdelrahman AL MAROUK
6c2e9eb583 [ui] add option to only show modified attributes
In node attributes' editor, add an option to only show the modified
attributes (that are not output nor linked attributes)
2023-08-30 15:39:28 +02:00
Loïc Vital
363115b201 [ui] AttributeItemDelegate: remove redundant error icon 2023-08-21 16:46:38 +02:00
Candice Bentéjac
1e14b2c5a0 [ui] GraphEditor: Flag an attribute's label when its value is invalid
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.
2023-08-21 16:30:11 +02:00
Candice Bentéjac
08382bbaa3 [ui] GraphEditor: Check for parent's existence in ChunksListView 2023-07-24 11:55:54 +02:00
Candice Bentéjac
0e2aaa1c50 [ui] GraphEditor: Use nodes' label instead of type for CompatibilityManager
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.
2023-07-24 11:55:10 +02:00
Candice Bentéjac
49c11a9b9a NodeEditor: Add the default name of the node next to the label
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.
2023-07-20 16:28:33 +02:00
Candice Bentéjac
6fdbf66607 [GraphEditor] AttributeEditor: fix dynamic setting of attributes' height
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.
2023-07-04 12:04:15 +02:00
Candice Bentéjac
091346cbb8 [qml] Optimize QML files and fix syntax warnings
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
2023-07-04 12:04:14 +02:00
Candice Bentéjac
4eac23a52d [GraphEditor] Prevent accessing null objects 2023-07-03 12:11:36 +02:00
Candice Bentéjac
7888ab7195 [GraphEditor] Qt5.15: fix binding loop warning on "height" attribute 2023-07-03 12:11:35 +02:00
Candice Bentéjac
8c494198e0 [qml] Qt5.15: Update syntax for slots
Slots now need to be written as function; the previous syntax is
deprecated.
2023-07-03 12:11:33 +02:00
Candice Bentéjac
62ba08447d [qml] Qt5.15: Upgrade all remaining modules
The upgrade concerns the following modules:
- QtCharts
- QtPositioning
- QtLocation
- QtGraphicalEffects
- QtQml
2023-07-03 12:11:32 +02:00
Candice Bentéjac
9b5dd40b02 [qml] Qt5.15: Upgrade all QtQuick modules 2023-07-03 12:11:29 +02:00
Candice Bentéjac
91b604574a [ui] CompatibilityManager: Update message and check for null nodes model 2023-06-16 09:02:59 +02:00
Candice Bentéjac
b5638fe034 [ui] Display icon for nodes with 3D outputs
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).
2023-06-13 14:45:59 +02:00
Candice Bentéjac
f2767aec33 [ui] GraphEditor: Add a "preview" icon when the node's output can be loaded
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.
2023-06-09 17:32:05 +02:00
Fabien Castan
63bb3fcf2a
Merge pull request #1812 from alicevision/dev/fileWatcherStatus
Add new file watcher behaviours
2023-03-05 14:08:05 +01:00
Candice Bentéjac
614f831457 [ui] Force nodes' status update before performing a submit/compute/delete
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.
2023-03-02 19:13:00 +01:00
Candice Bentéjac
6381371e7d Display the invalidation and comment messages in the internal attributes' tooltip
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.
2023-02-15 08:36:16 +00:00
Candice Bentéjac
4b7a548687 Notify changes in internal attributes' properties
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.
2023-02-15 08:36:16 +00:00
Candice Bentéjac
1015ea448a [ui] Add an icon and tooltip on a node's header if it has a comment
If the "Comments" internal attribute is filled, add a corresponding
icon in the node's header, as well as a tooltip that contains the
comment.
2023-02-15 08:36:13 +00:00
Candice Bentéjac
930af07966 [core] Correctly load internalAttributes in compatibility mode 2023-02-15 08:36:11 +00:00
Candice Bentéjac
21d01acc9a Add "color" as an internal attribute
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.
2023-02-15 08:36:11 +00:00
Candice Bentéjac
330382ab0c Add "label" as an internal attribute
Setting the "label" internal attribute allows to give a custom
label to replace the node's default label.
2023-02-15 08:36:10 +00:00
Candice Bentéjac
9bc9e2c129 Add "Notes" tab with "comment"/"invalid comment" attributes
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.
2023-02-15 08:36:10 +00:00
Fabien Castan
d18e8397c6
Merge pull request #1862 from alicevision/dev/externComputeIcon
[ui] Display nodes computed in another Meshroom instance as "Computed Externally"
2023-01-22 18:10:16 +00:00
Sarah Brood
56fe514582
[ui] GraphEditor: use maxZoom to fit on nodes (#1865) 2023-01-18 11:49:03 +00:00
Candice Bentéjac
45d3f202fc Display the "Computed Externally" icon whenever the node runs externally
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.
2023-01-05 16:44:55 +01:00
Fabien Castan
a2f559f48a
Merge pull request #1839 from alicevision/dev/fixQmlWarnings
[ui] Fix all "TypeError" QML warnings
2022-12-06 11:38:16 +01:00
Candice Bentéjac
02383c68b3 [ui] Check that objects accessed by QML properties are not null before accessing them
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.
2022-12-06 11:04:50 +01:00