Commit graph

212 commits

Author SHA1 Message Date
Fabien Castan
1ca83fc6a9 [ui] Check if node types are available before using them 2025-03-26 11:33:13 +00:00
Fabien Castan
426855baa6 [ui] ensure all node types used in the UI are declared
Avoid qml errors when accessing non-existing nodes.
The entry exist in the dict and we retrieve a null node.
2025-03-24 18:12:27 +01:00
Fabien Castan
3f69724788 Add some typing and str format 2025-03-24 00:07:58 +01:00
mhog
ff921d622a
Merge pull request #2664 from alicevision/dev/changeDefaultSfm
Create new pipeline for testing modular sfm
2025-02-14 09:04:15 +01:00
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
Fabien Servant
ad61a0141e add SfM Nodes to meshroom types list 2025-02-03 13:16:18 +01:00
Candice Bentéjac
d797692a25
Merge pull request #2533 from alicevision/dev/anamorphicFocal
[Viewer3D] Apply the pixel aspect ratio for the Frame Overlay
2024-11-28 18:28:55 +01:00
Fabien Servant
7f72f81289 Field of view functions works for tall images 2024-11-27 13:23:35 +01:00
Fabien Servant
0bf2c41524 Use pixel aspect ratio for 3d viewer 2024-11-26 15:30:09 +01:00
Candice Bentéjac
579371fd7c [qt6] Replace all PySide2/shiboken2 imports by PySide6/shiboken6 2024-11-07 18:08:54 +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
78fb0114e4 [ui] Create empty graph and handle new Camera Init or KeyFrameSelection 2024-08-26 16:21:27 +02:00
Aurore LAFAURIE
1038806ccd [ui] By default no pipeline is provided and we can create empty project 2024-08-26 16:21:27 +02:00
Aurore LAFAURIE
f326d45024 [ui] Better handling of thumbnails for Homepage
We need to check and create the thumbnail if it does not exist.
2024-08-26 16:21:27 +02:00
Aurore LAFAURIE
5b92df328f Implementation of Homepage 2024-08-26 16:21:26 +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
d98d7f259e [ui] setSfm only depends on nodes with category "sfm" and CameraInit should be set only if it is different from the currrent one 2024-07-23 12:09:12 +02:00
Aurore LAFAURIE
60b067210b [ui] Fix Camera Init Group Index should stay the same at adding or removing CameraInit events 2024-07-22 17:23:34 +02:00
Candice Bentéjac
cfb44d8b54 [ui] Add currentViewPath property
Add a property that contains the path of the image that is currently
displayed in the viewer. If no image is displayed, the property is set
with an empty string.

The path information is set directly from the Viewer2D when an image is
loaded to be displayed.
2024-06-27 17:28:25 +02:00
Candice Bentéjac
2bcf9d432c [core] Graph: Remove selectedViewpoint property
The information that this property conveys will be accessible at an upper
level and is thus redundant here.
2024-06-27 15:04:53 +02:00
Candice Bentéjac
2973672b20 [ui] Update the graph's viewpoint whenever the selected viewpoint changes 2024-06-20 15:47:04 +02:00
Fabien Castan
3451c3e9cd [ui] add log when loading new project file 2024-06-16 21:32:37 +02:00
Fabien Castan
09318ff055 [ui] Add missing ApplyCalibration in sfmData group 2024-06-15 19:35:02 +02:00
Fabien Castan
4e83b0dc7d [ui] resetActiveNodePerCategory only in graph updates
quit early in onCameraInitChanged to avoid useless reset of active nodes
2024-06-15 19:34:39 +02:00
Fabien Castan
df70f99256 [ui] remove useless duplicated graph updates 2024-06-15 19:32:42 +02:00
Fabien Castan
020dbecc68 [core] attribute: new initValue, independant from the resetToDefaultValue
Avoid to evaluate the default value if we don't need to.
2024-06-15 18:05:24 +02:00
Fabien Castan
d2c3ac6e26 [ui] minor: on project load failure add the fullpath to the project file in the log 2024-06-15 17:43:20 +02:00
Fabien Castan
1958b5f8c0 [ui] change the management of ActiveNodes 2024-06-15 17:41:05 +02:00
Fabien Castan
36cf19eeda [ui] Remove sfmTransfer from the sfm category for now 2024-06-15 17:15:08 +02:00
Fabien Castan
79af1d6fa7 [ui] try/except when accessing node parameters
Parameters may not exists on old project files
2024-06-15 17:14:09 +02:00
Aurore LAFAURIE
09525a364e [ui] Auto Update CameraInit when displaying node 2024-06-15 00:13:43 +02:00
Aurore LAFAURIE
dc4891cc43 [core] Prevent from getting last SfM node if graph has dirty topology 2024-06-13 17:56:59 +02:00
Aurore LAFAURIE
926db43625 [nodes/ui] Fix ExportAnimatedCamera outputs for ScenePreview use 2024-06-04 11:34:03 +02:00
Fabien Castan
45fd86e51b
Merge pull request #2396 from alicevision/fix/getLatestSfMNode
[ui/core] Fix get latest SfM node for previz
2024-06-01 11:37:21 +02:00
Fabien Castan
7e0a841ef5
Merge pull request #2398 from alicevision/dev/imageOverlayUsingExportAnimatedCamera
[ui] Use ExportAnimatedCamera output for image overlay in Viewer3D
2024-05-31 19:47:59 +02:00
Aurore LAFAURIE
e63c2df2a8 Compare last saved date before saving to prevent overwrite 2024-05-27 16:43:00 +02:00
Aurore LAFAURIE
f6332efa7e [ui] uvCenterOffset set according to principal point corrected or not + undistorted image path resolve according to output value of node 2024-05-23 12:30:00 +02:00
Aurore LAFAURIE
663b6b66d4 [ui/core] Order last node of type according to node's depth and name 2024-05-17 10:27:32 +02:00
Aurore LAFAURIE
ad7745a7c5 [ui] Undistorted images depend now also on ExportAnimatedCamera if exists 2024-05-02 14:53:49 +02:00
Aurore LAFAURIE
4e8c0c2cf8 [ui/core] Fix get latest SfM node for previz 2024-04-30 15:42:08 +02:00
Aurore LAFAURIE
5afb9cb2c8 [ui] Sync Viewer3D according to updateSelectedViewpoint 2024-04-10 19:39:36 +02:00
Candice Bentéjac
04a7191b15 [ui] Simplify error dialog titles and capitalize first letters 2024-04-05 18:06:23 +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
Fabien Servant
a0dc87c19b Bug threadpool 2023-12-29 12:28:33 +01:00
Candice Bentéjac
a606a8f83c [ui] Only update active CameraInit and its index when they are changed
Prior to this commit, when a `CameraInit` node was added to or removed
from the list of `CameraInit` nodes, the active `CameraInit` was always
reset to the first one in the list, independently from its previous
value.

This commit changes that behaviour by only modifying the active
`CameraInit` if no `CameraInit` node has been assigned yet, or if the
active `CameraInit` does not exist anymore (meaning it has been removed).

This requires to emit the `cameraInitChanged` signal every single time
the list of existing `CameraInit` nodes is modified even if the active one
is not changed, and to connect it to the ImageGallery in order to ensure
the index from the combo box always corresponds to the currently active
`CameraInit` node. Indeed, when the list of CameraInits is updated, the
model for the combo box is reset, and it needs to be re-updated with the
correct non-default value.
2023-10-03 18:11:55 +02:00
Candice Bentéjac
7fc52f2028 [ui] Check for the existence of the poses key before accessing it
When parsing the input JSON file, there might be some instances where
the `poses` key, unlike the `views` and `intrinsics` keys, does not exist.
If that is the case, an unhandled exception is raised while connections
are being made, which then causes issues for the lifetime of the Meshroom
instance.

This commit checks that the key exists before trying to access it, which
prevents raising unhandled exceptions while the active project is being
set up.
2023-09-15 17:12:39 +02:00
Loïc Vital
4c58d4b93f [ui] new concept of pickedViewId to scroll in 2D viewer without constantly updating selectedViewId 2023-07-12 09:13:51 +02:00