Commit graph

53 commits

Author SHA1 Message Date
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
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
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
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
Candice Bentéjac
61e0482a21 Add an offset to the position of pasted nodes if a node is hovered
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.
2022-09-08 15:21:57 +02:00
ChemicalXandco
ecb1662b6b [ui] GraphEditor: highlight the edge that will be deleted when it is replaced with another edge 2021-06-04 19:59:49 +01:00
Fabien Castan
18be350e6f
Merge pull request #1227 from ChemicalXandco/box_select
[ui] add support for selecting multiple nodes at once
2021-05-03 23:42:11 +02:00
ChemicalXandco
975ee5e414 [ui] GraphEditor: fix node highlight radius 2021-03-29 16:37:21 +01:00
Fabien Castan
e5ad4b2e64 [ui] GraphEditor: improve readOnly behavior on attributes 2021-01-22 14:53:57 +01:00
Fabien Castan
078120696a [ui] GraphEditor: fix some readOnly regarding CompatibilityNodes 2021-01-22 14:30:33 +01:00
ChemicalXandco
c253e7d363 [ui] add support for selecting multiple nodes at once 2021-01-15 18:16:45 +00:00
Fabien Castan
8ef793a488 [ui] GraphEditor: output attributes are never read-only
Also allow to expand attributes list on a locked node.
2020-12-28 19:01:36 +01:00
Fabien Castan
ecf10a65f7 [ui] GraphEditor: visualize edges between params (non File attributes) 2020-12-18 01:13:54 +01:00
Fabien Castan
bfdf2eae8b [ui] GraphEditor: use globalExecMode method 2020-12-02 19:56:23 +01:00
Julien-Haudegond
827e98a83a [ui] Node: improve duplicates' button ToolTip 2020-09-05 13:14:25 +02:00
Julien-Haudegond
95c7a9b87f [ui] Node: move compatibility badge inside the node icon bar 2020-09-02 15:39:31 +02:00
Julien-Haudegond
06b821349f [ui] Node: duplicates button improvement but still perf issues
As described in the comment, for an unknown reason, the icon seems to make the UI slow in some cases but not always.
2020-08-27 16:28:23 +02:00
Julien-Haudegond
ae7daf0365 [ui] GraphEditor: fix binding warnings 2020-08-24 15:34:51 +02:00
Julien-Haudegond
79e1c69d5d Merge remote-tracking branch 'origin/develop' into dev/nodesAndTaskManager 2020-08-24 15:19:31 +02:00
Julien-Haudegond
12de900e96 [ui] fix binding warnings when closing Meshroom 2020-08-17 17:50:44 +02:00
Julien-Haudegond
d838e7866a [ui] Node: fix slowness due to QML function calls with a lot of nodes
Instead of calling the duplicateList function for each node, at each modification, it is called only when we press the button.
2020-08-13 11:45:52 +02:00
Julien-Haudegond
de83294446 [ui] Node: change how duplicate nodes are displayed 2020-08-12 18:05:07 +02:00
Julien-Haudegond
ff7f8b3e36 [core/ui] add a locked property on nodes
Add locked property on core nodes and update UI in the same commit because both parts are very dependent for this change.
2020-08-11 13:08:47 +02:00
Yann Lanthony
991aca989b Merge develop into dev/nodesAndTaskManager 2020-01-24 14:54:08 +01:00
Yann Lanthony
61866708ac [ui] Node: improve node UI
* unify colors and spacing
* simplify status icon display
* remove duplicated code
2020-01-24 11:41:58 +01:00
Yann Lanthony
e2ef6520d7 [ui] Node: improve attribute display
* display filled pin when attribute has output connections
* start removing duplicated code
* tweak sizing/spacing 
* fix anchor errors
2020-01-24 11:37:59 +01:00
Yann Lanthony
97e18e02e1
[ui] Node: only display File attributes as Node attribute pins 2019-12-13 19:27:15 +01:00
Fabien Castan
65c472fe50
[ui] GraphEditor: change node background color 2019-11-29 11:34:15 +01:00
Fabien Castan
72e0e64e27
[ui] GraphEditor: fix QML errors
- fix anchors/layout/padding conflicts
- fix references to non-existing variables
- fix anchors to a position and not to an object
2019-11-29 11:34:15 +01:00
Fabien Castan
bbe40e0bc6
[ui] GraphEditor: use node label in duplicates tooltip 2019-11-29 11:34:15 +01:00
Lee Geertsen
72c0606b1b
[UI] Add node name to top bar, push icons right + add radius on node 2019-11-29 11:34:15 +01:00
Lee Geertsen
f4e5e84478
Redesign node UI, added state icons and separate inputs and outputs 2019-11-29 11:34:10 +01:00
Yann Lanthony
05854ed897 [ui] UIGraph: add hoveredNode property + node hovering visual feedback
* keep track of currently hovered node in UIGraph on Python side
* Node: show border on hover + make MouseArea contain everything else to always get hover events, even when cursor is over children attribute pins
2018-12-07 16:07:42 +01:00
Yann Lanthony
7db4beea89 [ui] use Node label in GraphEditor 2018-11-19 15:17:37 +01:00
Yann Lanthony
713ca7c6a3 [ui] GraphEditor: simplify attributes connection
* make Drag/DropArea overflow on the attribute's label to be more tolerant when connecting attributes
* add visual feedback when hovering interactive areas
* tweak spacings between attributes
2018-07-27 19:12:53 +02:00
Yann Lanthony
e6e2c18aa8 [ui] Node: add selected property + selection border
* use more efficient selection border instead of slightly changing header's color
* require activeFocus when selected
2018-07-26 22:50:42 +02:00
Yann Lanthony
f415745a4a [ui] make Nodes moves undoable
Handle nodes move and auto-layout on Python side by using GraphLayout and MoveNodeCommand.

* Node QML component relies on underlying core.Node object's position
* MoveNodeCommand is called after a Node has been dragged
* partial/full auto-layout for specific graph operations (Duplication, Augmentation...) are now part of those operations
* serialized position in node data allows to properly restore nodes coordinates on undo/redo
* remove all layout/node moving code from QML
2018-07-26 22:46:22 +02:00
Yann Lanthony
7dfb750407 [ui] move node menu to GraphEditor + ensure computability of node
use core.graph.canCompute on current node to check if node can be computed; enable computation related MenuItem accordingly
2018-07-19 14:50:58 +02:00
Yann Lanthony
0128cd56f0 [ui] add CompatibilityBadge on CompatibilityNodes
* add badge icon on nodes in GraphEditor
* add badge banner in AttributeEditor with upgrade button when available
2018-07-19 13:50:45 +02:00
Yann Lanthony
20ef9b5a05 [ui] GraphEditor: unregister AttributePins when destroyed 2018-06-18 14:43:18 +02:00
Yann Lanthony
2f2390e465 [ui] fix Palette propagation
* bugfix: in latest PySide2 versions, application palette is not properly applied to all QtQuick Controls 2 components. Force this by exposing QApplication palette and bind it to the root ApplicationWindow.
* rename all "palette" ids to "activePalette" to avoid clashes with "palette" property on QtQuick Controls 2
* use parent component palette when it makes sense to propagate active/disabled style (instead of always using Active SystemPalette)
2018-05-28 15:30:09 +02:00
Yann Lanthony
0249706018 [ui] add missing string paths to url conversions 2018-03-21 17:24:19 +01:00
Yann Lanthony
06851f0357 [ui] GraphEditor: use Node name as objectName
* ease debugging
2018-02-12 18:50:54 +01:00
Yann Lanthony
53791cb7d8 [ui] GraphEditor: nodes duplication
* allow duplication of one node/all nodes following a node
* actions available from Node contextual menu and Alt+Click on node for multi-nodes duplication
2018-02-12 18:49:13 +01:00
Yann Lanthony
25992286d0 [ui] add partial graph submission up to a certain node 2018-02-07 14:35:50 +01:00
Yann Lanthony
907c9cbcba [ui] use signals instead of direct calls to context var '_reconstruction' 2018-02-07 14:33:30 +01:00