Commit graph

198 commits

Author SHA1 Message Date
Yann Lanthony
7eab289d30 [core] Graph: initial refactoring of graph loading API and logic
* API
Instead of having a single `load` function that exposes in its API
some elements only applicable to initializing a graph from a templates,
split it into 2 distinct functions: `load` and `initFromTemplate`.
Apply those changes to users of the API (UI, CLI), and simplify Graph
wrapper classes to better align with those concepts.

* Deserialization
Reduce the cognitive complexity of the deserizalization process
by splitting it into more atomic functions, while maintaining the
current behavior.
2025-02-06 16:46:04 +01:00
Candice Bentéjac
9af6adeba9 [qt6][ui] Limit useless calls to recentProjectFiles when opening dialogs
This prevents emitting signals that lead to countless updates when a
single one is necessary, thus causing some freezes in the interface.
2024-11-21 11:19:38 +00:00
Candice Bentéjac
5a0b1c0c95 [qt6][qml] Clean-up code and harmonize comments 2024-11-07 18:15:37 +01:00
Candice Bentéjac
54b59d0c5e [qt6][qml] Push Application on the stack before loading the project
This prevents crashes when the project is done loading but
`Application` is not yet ready.
2024-11-07 18:13:29 +01:00
Candice Bentéjac
e97575a901 [qt6][qml] Remove QtQuick.Window imports
`QtQuick.Window` does not exist anymore with Qt6. QQuickWindow is now
directly part of the QtQuick module.
2024-11-07 18:13:27 +01:00
Candice Bentéjac
595e8f6c7a [qt6][qml] Do not explicitly set a Palette value with a QPalette 2024-11-07 18:09:04 +01:00
Candice Bentéjac
0e71f2a520 [qt6] Update versions for all the imported modules
Qt3D.Extras cannot be updated to 2.6 yet, otherwise there are errors.
2024-11-07 18:09:01 +01:00
Candice Bentéjac
6d845376eb [qt6] Use JS functions format to declare explicit parameters in slots
This fixes all the "Injection of parameters into signal handlers
is deprecated. Use JavaScript functions with formal parameters instead."
warnings.
2024-11-07 18:08:59 +01:00
Candice Bentéjac
1b9e75cd4f [qt6] Replace Qt.labs.settings with QtCore.Settings 2024-11-07 18:08:58 +01:00
Candice Bentéjac
d5cfdb1e85 [qt6] Re-enable alternative base and keyboard shortcut to switch to it 2024-11-07 18:08:57 +01:00
Candice Bentéjac
96a70c04ff [qt6] Remove imports of QML modules that do not exist anymore with Qt6.6 2024-11-07 18:08:55 +01:00
Aurore LAFAURIE
a6170d1e66 [main] Fix imagesFolder variable in order to save when gallery is not empty 2024-09-16 15:06:01 +02:00
Aurore LAFAURIE
f78efe69fb [ui] Open project from browser in homepage & quick adjustments
Modification of tooltips, ensure computing is false before going back to homepage...
2024-09-09 15:06:51 +02:00
Candice Bentéjac
06ed3cb7cf [ui] Add property to detect if the main window is closing 2024-09-05 09:36:17 +02:00
Candice Bentéjac
d89aec0250 [ui] Rename general and UI settings components 2024-09-03 10:51:49 +01:00
Candice Bentéjac
d1b728c68b [ui] Remove unused QML imports from main.qml 2024-09-03 10:46:05 +01:00
Candice Bentéjac
e0120fd287 [ui] Improve separation between main and Application
All the actions, file dialogs and message dialogs that are specific to
the application are removed from `main.qml` and placed instead in
`Application.qml`.

Only elements and functions related to the main window remain in
`main.qml`. As such, the `ensureSaved` and `ensureNotComputing` functions,
used when closing the main window, remain in `main.qml`.

Message dialogs that may be opened by these functions however are moved
to `Application.qml` as they are application-specific and can't be opened
on the homepage.

Application dialogs that may need to be called when triggering the closure
of the main window are aliased from `Application.qml` to remain callable
through the `StackView`.
2024-09-03 10:37:07 +01:00
Candice Bentéjac
e0ec0aef55 [ui] Use correct DontUseNativeDialog option for all dialogs 2024-09-03 10:37:06 +01:00
Candice Bentéjac
cb062a4b4c [ui] Detect if the reconstruction has been set yet or reset
An `active` property is added to the `Reconstruction` object to share
whether it has been initialized or not.
2024-08-26 16:21:28 +02:00
Aurore LAFAURIE
655f83892d [ui] New button added for empty project 2024-08-26 16:21:27 +02:00
Aurore LAFAURIE
5b92df328f Implementation of Homepage 2024-08-26 16:21:26 +02:00
Fabien Castan
5c379c508c [ui] GraphEditor: highlight chunks with lighter/darker 2024-08-20 19:37:03 +02:00
Aurore LAFAURIE
ea7f51cdf2 [ui] Add project to recent projects when dropping a file 2024-07-30 11:07:45 +02:00
Aurore LAFAURIE
f166f81cb1 [ui] Fix unsaved graph and compute only a part 2024-07-19 11:31:17 +02:00
Aurore LAFAURIE
887844541c Compute or Submit selected nodes 2024-07-17 16:08:00 +02:00
Candice Bentéjac
ec98037338 [ui] Instantiate the ScriptEditor QML component in the GraphEditor 2024-07-03 08:41:39 +01:00
Fabien Castan
6edf0b654e [ui] dont use native dialog 2024-06-16 21:26:32 +02:00
Aurore LAFAURIE
e63c2df2a8 Compare last saved date before saving to prevent overwrite 2024-05-27 16:43:00 +02:00
Fabien Castan
13f2e2ad9d
Merge pull request #2399 from alicevision/dev/cutNodeGraphEditor
[ui] Cut option available in GraphEditor
2024-05-12 21:58:19 +02:00
Aurore LAFAURIE
697a8a562f [ui] Change order and put getSelectedNodes function outside specific action 2024-05-10 11:52:26 +02:00
Aurore LAFAURIE
f0e18e6db9 [ui] Add of Cut option in Edit menu 2024-05-07 13:42:36 +02:00
Aurore LAFAURIE
9b0de32930 [ui] Bounding Box are usable in other nodes, not only Meshing 2024-04-26 11:18:04 +02:00
Aurore LAFAURIE
9f96f68a95 [ui] Cosmetic modifications
Cosmetic modifications such as missing spaces.
2024-03-28 11:28:31 +01:00
Aurore LAFAURIE
b74cada8ef [ui] save after drag&drop: meshroom scenes detected as separated type of file
In FilesByType, new attribute meshroomScene allowing to detected
separately the meshroom scenes from the other types of file.
2024-03-28 11:28:30 +01:00
Aurore LAFAURIE
58e9bafa45 [ui] save after drag&drop: split of handling types and processing files
First get type of files, then either ensure the save or process files.
2024-03-28 11:28:30 +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
Matthieu Hog
5172f5190a added semantic logic to display multiple 3d objects
fixed pyhon case in boolean
2024-02-14 12:17:31 +01:00
Candice Bentéjac
e463f0dce2 [qml] Clean-up: Harmonize syntax across all files 2023-11-06 16:31:10 +01:00
Candice Bentéjac
0aba9a053f [ui] Don't load node's output in the 3DViewer if it has no 3D output 2023-10-26 17:15:51 +02: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
Candice Bentéjac
30cd13c7b3 [qml] Qt5.15: Disable the alternative palette to support disabled elements
Supporting the alternative palette (triggered with Ctrl+Shift+P) requires
a manual conversion from the QPalette to the QML palette, which does not
directly support disabled elements.

Keeping the previous palette management will support disabled elements,
but cause issues when switching to the alternative palette. Until both
can be fully supported, the alternative palette is disabled.
2023-07-04 12:10:28 +02:00
Candice Bentéjac
9e31981f03 [ui] Qt5.15: Update palette management
Manually convert the QPalette object to a QML Palette manually. The
conversion is not straight forward anymore, and not performing it
leads to an incomplete alternate (light) palette.

QML Palette in Qt 5.15 does not support yet disabled elements, the
support will only be enabled with Qt 6.
2023-07-04 12:04:16 +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
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
9570437b7f [ui] Fix "canSubmit" which relied on erroneous conditions
Remove the "canStartComputation" condition which was not used anywhere
else and was not up-to-date: since it needed more than one image and no
ongoing computations to be "True", attempting to submit several branches
of a graph would always cause it to be "False", which in turn led the
"canSubmit" condition to be "False" (causing the pop-up requesting to
save the file to appear), even though the submission should have been
possible.

The submission should be possible whenever submitters are available and
the project file has been saved.
2023-03-20 16:18:48 +01:00
Candice Bentéjac
16dfe960c6 [ui] Open a warning dialog when attempting to submit an unsaved project
A project needs to be saved in order to be submitted to the renderfarm.
Prior to this commit, attempting to submit an unsaved project would not
prompt any dialog in the UI despite the exception that was thrown on the
Python side.

A warning dialog is now opened to let the user know that the project
cannot be submitted until it is saved.
2023-03-09 18:24:38 +01:00
Candice Bentéjac
4b2857be9b [ui] Add a "Load Template" action in the "Advanced" menu
"Load Template" allows to load an .mg file as a regular project file,
without taking into account if it is a template.

If the project file is not a template, it will be opened exactly as if the
"Open File" menu had been used. If it is a template and it contains
"Publish" nodes, they will not be filtered out (whereas they will be if
the template is opened with "Open File" or through the "New" actions).
2023-03-06 11:12:05 +00: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