Commit graph

135 commits

Author SHA1 Message Date
Candice Bentéjac
579371fd7c [qt6] Replace all PySide2/shiboken2 imports by PySide6/shiboken6 2024-11-07 18:08:54 +01:00
Aurore LAFAURIE
1ec8c9c7ad [ui] Fix Collapse error
It comes from the update of the edges so we need to update the array of allSrc correctly.
2024-09-02 17:08:04 +02:00
Aurore LAFAURIE
0d346ab2da [ui] Value of current edge iteration and TaskManager protected 2024-09-02 17:08:04 +02:00
Aurore LAFAURIE
0d397b4baf [ui] Reset ListAttribute connected as for loop remove also edges in one element of undo stack 2024-09-02 17:08:03 +02:00
Fabien Castan
f84654b2ae [ui] Graph.canExpandForLoop: fix corner case 2024-09-02 17:08:03 +02:00
Fabien Castan
2456350dc5 [ui] Graph: fix expand/collapse 2024-09-02 17:08:03 +02:00
Aurore LAFAURIE
1f995c23d6 [ui] While expanding for loop, first reconnect to first element of list and then expand 2024-09-02 17:08:01 +02:00
Aurore LAFAURIE
019e137386 [ui/core] First version of For Loop implementation
If you connect a list to an attribute, you can iterate over the list as a for loop
2024-09-02 17:08:01 +02:00
Aurore LAFAURIE
78fb0114e4 [ui] Create empty graph and handle new Camera Init or KeyFrameSelection 2024-08-26 16:21:27 +02:00
Fabien Castan
438b84a8bc [ui] update the dynamic output attributes when the status of a chunk has changed 2024-07-18 23:54:08 +02:00
Aurore LAFAURIE
887844541c Compute or Submit selected nodes 2024-07-17 16:08:00 +02:00
Candice Bentéjac
48e4c68e61 [ui] Graph: Connect all chunks when setting a graph for the first time
This was initially done after a call to `graph.update()`, but as the
calls to the entire update have been reduced to avoid processing stuff
we do not need to process, the chunks are never connected when opening
a project, meaning the progress bar remains invisible until an explicit
call to `graph.update()` is done.
2024-07-01 11:53:00 +01:00
Fabien Castan
d5e356c0aa [core] New dynamic output attributes 2024-06-15 19:47:29 +02:00
Fabien Castan
df70f99256 [ui] remove useless duplicated graph updates 2024-06-15 19:32:42 +02:00
Aurore LAFAURIE
155a9e3bd9 [ui] Update of accessor for intrinsics in removeImage 2024-05-14 11:53:00 +02:00
Aurore LAFAURIE
c50d3cc9e7 [ui] Add removeImage function in Python to check for intrinsic still used 2024-05-13 09:48:24 +02:00
Fabien Servant
a0dc87c19b Bug threadpool 2023-12-29 12:28:33 +01:00
Candice Bentéjac
66ffe017a4 [ui] Rename "Clear Images" actions into "Remove All Images"
Update the names of the commands that remove images in the "File"
menu to match with those in the Image Gallery menu.

"Clear Images" becomes "Remove All Images" and "Clear All Images" becomes
"Remove Images From All CameraInit Nodes".
2023-10-11 18:07:18 +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
Fabien Castan
ce2085faad
Merge pull request #1744 from alicevision/dev/internalAttributes
Add internal attributes in "Notes" tab
2023-03-05 13:46:47 +01:00
Fabien Castan
ea323edb83
Merge pull request #1897 from alicevision/dev/improveClearImages
[ui] Improve "Clear Images" action's behaviour and performance
2023-03-03 20:12:25 +01:00
Candice Bentéjac
5bc269bfda [ui] Distinguish monitorable and monitored chunks
When all the chunks were always monitored, no distinction was needed
between chunks that could be monitored and chunks that were monitored.

Now that the minimal refresh mode exists, the distinction is needed.
In particular, when only some chunks are being monitored, it is necessary
to know precisely which ones are to be able to match correctly the status
files with the polled times.
2023-03-01 16:13:58 +01:00
Candice Bentéjac
7c43446452 [ui] Graph: remove unused Python imports 2023-02-28 17:07:57 +01:00
Candice Bentéjac
c3108bc16f [ui] Add a minimal auto-refresh mode for the file watcher
The default auto-refresh mode of the file watcher checks, every 5 seconds,
every single chunk's status, which may be overkill. Instead of simply
disabling the file watcher, this commit adds a third option that checks,
every 5 seconds, the status of submitted and running chunks. If no chunk
is currently submitted or running, then the file watcher's thread keeps
on running but does nothing.

Additionally, the file watcher is automatically disabled by default if
Meshroom is started without a submitter.
2023-02-28 17:07:57 +01:00
Candice Bentéjac
84715b5105 [ui] Add a button to disable/enable the file watcher
By default, the file watcher polls every single node's file every 5
seconds, independently from their status. This commit adds a button
in the GraphEditor to disable or enable the file watcher at will.
2023-02-28 17:07:56 +01:00
Candice Bentéjac
99b82e601f Ignore "Publish" nodes when loading a template unless specified otherwise
This commit adds an option to the "load" method, "publishOutputs", that
determines whether "Publish" nodes in a template project file should be
ignored during the graph's creation.

If "publishOutputs=True", then the "Publish" nodes from the template will
be added to the graph. "Publish" nodes in a project file that is not
a template will not be affected by this and will always be added to the
graph, as any other node.

This allows to have templates that are compatible with meshroom_batch,
which requires a "Publish" node when the --output option is specified,
while not having unneeded nodes in the UI or unneeded operations:
when --output is specified in meshroom_batch, "publishOutputs=True",
otherwise it will be set to False so that the "Publish" nodes are not
executed needlessly.
2023-02-27 18:34:51 +01:00
Candice Bentéjac
43f439be88 [ui] Add a "Clear All Images" action and update "Clear Images"'s behaviour
"Clear Images" used to clear the intrinsics and viewpoints for all the
existing CameraInit nodes in the graph. There was no-user friendly way
to clear the images of a specific CameraInit node.

This commit modifies the behaviour of "Clear Images" so that it only
deletes the intrinsics and viewpoints of the current CameraInit. A new menu
action, "Clear All Images", is added in the "Advanced" sub-menu, and
deletes all the intrinsics and viewpoints for all the CameraInit nodes.

The way images are cleared is also modified: instead of removing the
intrinsics and viewpoints attributes, they are reset. To be undone
properly, a corresponding "ClearImagesCommand" has been added. This offers
a great performance increase (clearing 1000 images now takes 1s).

Tooltips have been added to make the distinction clearer for users.
2023-02-22 13:24:32 +01:00
Candice Bentéjac
7688b94ce5 [core] Raise compatibility issue if nodes miss invalidating internal attributes 2023-02-15 08:36:14 +00:00
Fabien Castan
ffca9c68e3
Merge pull request #1824 from alicevision/dev/submitterJobTitles
[submitters] Add an option to update the job title on submitters
2022-12-05 16:22:33 +01:00
Fabien Castan
8ce2ac6fe8
Merge pull request #1832 from alicevision/fix/graphLocalComputations
[ui] Correctly determine if a graph is being computed locally and update nodes' statuses accordingly
2022-12-05 16:20:58 +01:00
Candice Bentéjac
eac43c84c3 [submitters] Add an option to update the job title on submitters 2022-12-05 15:23:10 +01:00
Candice Bentéjac
6a36da61cf [ui] GraphEditor: select pipelines imported through the node menu
Add all the nodes from a pipeline imported through the node menu to the
node selection.
This involves changing the return value of ImportProjectCommand from a
boolean to a list of imported nodes.
2022-12-02 18:19:56 +01:00
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
b08f83552e [ui] Clear locally submitted nodes before loading a new graph
When loading a new graph while the opened one was locally computing nodes,
computations were automatically stopped to be able to load the new graph.
However, the computing chunks' status were not being updated before
the graphs were switched up. This meant that opening that previously
computing graph again would lead to a display in which nodes appeared to
be computing although there was no ongoing computations.
2022-11-28 10:06:57 +01:00
Candice Bentéjac
1cd4ffc081 [ui] Take session ID into account when checking if graphs are computed locally 2022-11-28 10:02:50 +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
Loïc Vital
d0fcb67d1c [ui] rename Import Scene to Import Project for coherent naming 2022-09-23 11:22:36 +02:00
Fabien Castan
27faf9f77c
Merge pull request #1758 from alicevision/dev/copyPasteNode
Support copying/pasting a node in the Graph Editor
2022-09-08 17:42:12 +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
9f1b866e78 Paste the selected nodes relatively to the mouse's position
The mouse's position is the top-left corner of a zone in which all
the selected nodes will be pasted. The bottom-right corner of that
zone is (x, y), with x the maximum of the selected nodes' position
along the x-axis and y the maximum of the selected nodes' position
along the y-axis.

The nodes relative position to one another - if positions are provided -
is preserved.

If no node in the selection has a specified position, the nodes will
be pasted from left to right alphabetically, with the top-left corner
of the first node at the mouse's position.
2022-09-06 15:40:59 +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
c44b2a8c00 Add "minimal" mode for template files
Add a specific option to save a graph as a template ("Save As
Template") in "minimal" mode.

This mode only saves, for each node in the graph, the input and
output attributes whose values differ from the default ones. Any
attribute that is not serialized in the saved template file is
assumed to have its default value.
If a conflict is detected on a node when opening the template
file, it is logged but solved automatically.

The goal of this minimal mode is to prevent template files from
needing an update every single time a modification (may it be
minor or major) is done on a node description. Templates can
thus follow node changes and still be usable.
2022-09-06 09:43:19 +02:00
Candice Bentéjac
a33f79e4d7 Import a scene from an .mg file into the current graph
Add an "Import Scene" (Ctrl+Shift+I) option in the File menu
that allows to select an existing .mg file and import it in the
current graph.

The imported scene will automatically be placed below the lowest
existing node along the Y axis.
2022-08-31 10:50:35 +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
Candice Bentéjac
819d9e3e70 Prevent duplication/removal a node more than once in the same action 2022-07-28 14:13:38 +02:00
Candice Bentéjac
c4c8b5c8d5 [ui] Vertically align duplicated nodes correctly
When a node is duplicated more than once in a single "duplicate"
operation, it happens that several of the duplicated nodes
overlap. This patch takes into account all the newly duplicated
(and already moved) nodes before moving them into their final
position.
2022-07-28 14:13:38 +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