Commit graph

89 commits

Author SHA1 Message Date
Candice Bentéjac
c2570ca0fb [ui] GraphEditor: Import pipeline on the mouse's position with the node menu
If a pipeline is imported with the node menu instead of the "Import
Project" action from the File menu, the top-left "corner" of the graph
should be placed on the mouse's position.
The position of pipelines imported with the "Import Project" menu
remains unchanged: they are automatically placed below the lowest
node in the current graph.
2022-12-02 18:13:17 +01:00
Candice Bentéjac
04ab813cef [ui] GraphEditor: Add a "Pipelines" category in the node menu
Artificially add a "Pipelines" category in the node menu. The category
contains the list of available pipeline templates. Selecting a pipeline
instead of a regular node type "creates" the pipeline in the GraphEditor
(using the "import project" functionality). The imported pipeline is
by default placed under the current graph.

This commit does not include enabling the search for pipelines from the
"Pipelines" category in the search bar.
2022-11-29 18:14:30 +01:00
Loïc Vital
0795e40ef6 [ui] check mouse is in graph editor 2022-11-03 10:33:19 +01:00
Loïc Vital
cf3e2b3573 [ui] prevent default tab behavior (change focus to next element) 2022-11-02 15:25:24 +01:00
Loïc Vital
c5294eb364 [ui] open node menu with tab 2022-11-02 13:31:52 +01:00
Candice Bentéjac
021770a424 [ui] Center pasted nodes in GraphEditor when it does not contain the mouse
When using the Edit > Paste menu, or when pressing Ctrl+V while the Graph
Editor has the focus but the mouse is not contained in it, there is no
current mouse position in the GraphEditor so the position that is provided
to the "pasteNodes" function is the last known mouse position, which is
oftentimes on the border of the GraphEditor.

This commit automatically sets the mouse's position to the center of
the GraphEditor, and "builds" the zone containing the pasted nodes around
it.
2022-10-03 11:13:52 +02:00
Candice Bentéjac
58784fb6ff [ui] Restrain the "copy/paste nodes" shortcuts to the GraphEditor
If a Ctrl+C or Ctrl+V shortcut is performed outside the GraphEditor,
the performed action should not be a copy or a paste of the nodes, but
the own copy/paste of the current element (e.g. if a Ctrl+C is made on
on the NodeEditor, then the copied element should be the one selected
in the NodeEditor, not the currently selected node).
2022-09-26 09:56:28 +02: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
Candice Bentéjac
6bb0ad4508 Add a "Paste Node(s)" option in the nodes' right click menu
The "Paste Node(s)" option copies the selected nodes to the
clipboard (as does the "Copy Node(s)" option) and immediately
pastes them into the graph.
2022-09-06 11:20:25 +02:00
Candice Bentéjac
d06acf6722 Reconnect copied/pasted nodes together but not to the graph
If several nodes are described in the clipboard and are supposed to
be connected with each other, reconnect them together, but do not
attempt to reconnect them to the graph they were copied from, even if
it is the current graph.
2022-09-06 11:13:29 +02:00
Candice Bentéjac
ede24713d0 Add "Copy" and "Paste" actions in the "Edit" menu
Also add a "Copy Node(s)" option in the nodes' right click menu.
2022-08-25 11:32:37 +02:00
Candice Bentéjac
e11452efdb Extend copy/paste support to selections containing multiple nodes 2022-08-25 11:08:57 +02:00
Candice Bentéjac
5b65866e49 [ui] Paste a node on the mouse's position
When creating a node with a "paste" operation, place the node
on the mouse's position in the graph instead of default position (0,0).

If the mouse is placed on an existing node, the pasted node will be
placed on the mouse's position plus an offset so that the pasted node
does not directly overlap with the existing node.
2022-08-19 12:02:09 +02:00
Candice Bentéjac
ddda62a652 Add node to graph with Ctrl+V if valid node content is in the clipboard
Attempt to paste the clipboard's content in the graph when Ctrl+V is
pressed. If the clipboard contains a valid node description, add the
corresponding node to the graph.
Otherwise, do nothing.
2022-08-19 12:00:16 +02:00
Candice Bentéjac
751bad96c6 Copy selected node's content to the clipboard when Ctrl+C is pressed
When Ctrl+C is pressed while a node selected, its content is formatted
to JSON and copied to the system's clipboard.
2022-08-19 11:31:31 +02:00
luz paz
f4dcf6557f Fix various typos in the source code
## Description
Fix various typos in the source code. This includes user facing code, documentation, and source comments. This PR has not been tested.
Closes #1605
2022-01-22 07:39:05 -05: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
fdfabf0066 [ui] GraphEditor: use entire node selection when handling '_ from here' operations 2021-04-18 14:33:17 +01:00
ChemicalXandco
e8a5491178 [ui] GraphEditor: select duplicated nodes and select following nodes on alt + left click 2021-04-14 23:14:51 +01:00
ChemicalXandco
e18f815af9 [nodes] add node categories 2021-02-14 17:03:42 +00:00
ChemicalXandco
3d33134ca9 [ui] add support for node categories 2021-02-14 16:12:39 +00:00
ChemicalXandco
55b16bc6d3 [tests] update node duplication test 2021-02-03 22:29:31 +00:00
ChemicalXandco
acf1bf2116 [ui] grapheditor: explicitly pass selected nodes argument 2021-01-26 21:13:16 +00:00
ChemicalXandco
aef50d9bde [ui] GraphEditor: fix error when node is clicked with control and not selected 2021-01-22 22:49:44 +00:00
Fabien Castan
078120696a [ui] GraphEditor: fix some readOnly regarding CompatibilityNodes 2021-01-22 14:30:33 +01:00
ChemicalXandco
6f50f652c2 [ui] GraphEditor: fix cursor shape
cursor is only 'closed hand'  when scrolling the graph
2021-01-15 20:16:14 +00:00
ChemicalXandco
c253e7d363 [ui] add support for selecting multiple nodes at once 2021-01-15 18:16:45 +00:00
Fabien Castan
ecf10a65f7 [ui] GraphEditor: visualize edges between params (non File attributes) 2020-12-18 01:13:54 +01:00
Julien-Haudegond
bd4c816e5b [ui] GraphEditor: fix edges removing when nodes are locked 2020-09-05 13:25:58 +02:00
Julien-Haudegond
44821a1c5e [ui] GraphEditor: move stop/cancel computation check into a Python slot 2020-08-26 15:52:00 +02:00
Julien-Haudegond
a00c82cd2f [ui] GraphEditor: check sessionUid for stop/cancel computation 2020-08-26 15:33:45 +02:00
Julien-Haudegond
044ef1710f [ui] GraphEditor: enable stop/cancel computation only on locked nodes 2020-08-25 11:11:00 +02:00
Julien-Haudegond
79e1c69d5d Merge remote-tracking branch 'origin/develop' into dev/nodesAndTaskManager 2020-08-24 15:19:31 +02:00
Julien-Haudegond
f41565f26b [ui] Graph: stop and cancel node computation 2020-08-20 16:20:55 +02:00
Julien-Haudegond
a3e0d530b4 [core/ui] fix typo and syntax 2020-08-20 15:07:29 +02:00
Julien-Haudegond
12de900e96 [ui] fix binding warnings when closing Meshroom 2020-08-17 17:50:44 +02:00
Julien-Haudegond
02b9e34ba4 [ui] GraphEditor: fix delete data issue with duplicate nodes 2020-08-12 18:30:26 +02:00
Julien-Haudegond
041cb8b81a [ui] GraphEditor: fix delete key issue 2020-08-12 10:31:06 +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
Lee Geertsen
70509f5dd2
Delete old readOnly property on GraphEditor 2019-11-29 11:34:15 +01:00
Lee Geertsen
3ff5ba8d54
[core] Submit and Compute buttons are disabled if needed 2019-11-29 11:34:15 +01:00
Lee Geertsen
3c32aaeecd
Fix problem for removing edge while computing 2019-11-29 11:34:10 +01:00
Lee Geertsen
6d83985b39
Lock Nodes and Edges during computing 2019-11-29 11:34:10 +01:00
Lee Geertsen
f4e5e84478
Redesign node UI, added state icons and separate inputs and outputs 2019-11-29 11:34:10 +01:00
Lee Geertsen
c00db25c23
Don't lock graph and node editor while computing nodes
Add possibilty to, while computing nodes:
add more nodes to the task manager,
edit, duplicate and remove nodes without breaking the tasks that are submitted
2019-11-29 11:34:10 +01:00
Yann Lanthony
28e7e64f3d [ui] show unsaved project warning dialog also when computing from GraphEditor 2019-01-30 09:48:37 +01:00
Yann Lanthony
2990129e0f [ui] GraphEditor: display ClosedHandCursor while dragging 2019-01-07 18:47:20 +01:00
Yann Lanthony
b46a2dbba1 [ui] Controls: add SearchBar component + better keyboard focus handling
* use it in MetadataListView and GraphEditor 'add Node' menu
* GraphEditor: forward MenuItem key events to searchBar to be able to continue editing the filter even if it lost active focus
2019-01-07 16:48:17 +01:00
Yann Lanthony
b5c985b3fb [ui] GraphEditor: solo 3D media with Double Click + Control modifier
* allow to solo a 3D media from the GraphEditor by double clicking on a node or an attribute with the Control modifier pressed
* consistent with Viewer3D.MediaLibrary behavior (solo on Ctrl+Click on visibility button)
* handle supported file extensions in Viewer3DSettings
2019-01-07 16:19:42 +01:00