Commit graph

1206 commits

Author SHA1 Message Date
Candice Bentéjac
7688b94ce5 [core] Raise compatibility issue if nodes miss invalidating internal attributes 2023-02-15 08:36:14 +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
930af07966 [core] Correctly load internalAttributes in compatibility mode 2023-02-15 08:36:11 +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
9bc9e2c129 Add "Notes" tab with "comment"/"invalid comment" attributes
Add two internal attributes, "Comment" and "Invalid comment", in
a specific "Notes" tab, which will contain any further internal
attribute. Internal attributes exist for all nodes.
2023-02-15 08:36:10 +00:00
Fabien Castan
1fc2b228af
Merge pull request #1896 from alicevision/fix/dragDropImages
[ui] Drag&Drop: Use a pool of threads for asynchronous intrinsics computations
2023-02-14 21:23:27 +01:00
Fabien Castan
ac27d14d79
Merge pull request #1888 from alicevision/mug/fixSyncCamView
[ui] fix "Sync Camera with Image Selection"
2023-02-14 21:05:38 +01:00
Candice Bentéjac
246843a769 [ui] Reconstruction: Use a ThreadPool for asynchronous computations
When importing images, the intrinsics were (re)built asynchronously in
a thread that was not attached to anything. The update of the intrinsics,
performed in the main thread following a signal emitted in the detached
thread, would block when there were already some existing intrinsics
because the garbage collector would destroy the thread in which the
new intrinsics had been computed while the update was ongoing.

This commit adds a ThreadPool to the Reconstruction object, and uses it
to perform the intrinsics computations asynchronously. The update of the
intrinsics thus does not remain blocked and images can be imported safely,
either though the "Import Images" menu or through drag & drop.

The "Update Intrinsics" button, which appears when the dialog to edit the
sensor database is on display, also uses the ThreadPool to recompute the
intrinsics when requested.

The "runAsync" method, which spawned a thread without attaching it to
anything, is removed. The "importImagesAsync" method, whose only goal
was to call "runAsync" on "importImagesSync", is also removed. Instead,
the pool of threads is directly used to call "importImagesSync"
asynchronously.
2023-02-14 17:26:36 +01:00
Candice Bentéjac
b5fab79e09 [ui] Import images asynchronously with the "Import Images" menu action
Loading images with the "Import Images" menu action is a blocking
operation that might freeze the app if there are many images to import.

This commit performs the import asynchronously (similarly to what is done
when images are dropped in the Image Gallery): Meshroom remains unusable
while the images are imported and the intrinsics built (which is a wanted
behaviour), but it does not freeze at all.
2023-02-14 17:23:29 +01:00
Loïc Vital
e9a75c812c [ui] FeaturesViewer: make time window spinbox editable 2023-02-13 18:28:58 +01:00
Loïc Vital
ece2371166 [ui] display track endpoints option in features viewer 2023-02-13 18:01:45 +01:00
mugulmd
aea6eb19ab [ui] 3D image overlay: use autoTransform to avoid shrinking when resizing viewer 2023-02-09 03:45:13 -08:00
Fabien Castan
334bfc8b00
Merge pull request #1861 from alicevision/mug/thumbnailCache
[ui] Thumbnail cache
2023-02-09 11:08:09 +00:00
mugulmd
c758bf043b [ui] thumbnail cache: use thread pool to manage thread lifetime automatically 2023-02-09 01:50:38 -08:00
Fabien Castan
db8d00e901 [ui] ImageGallery thumbnails: no need for caching and expensive smooth resizing 2023-02-08 21:50:04 +01:00
Fabien Castan
db8b3873e3 [ui] ImageGallery: do not reduce thumbnail resolution
As we rely on the thumbnails cache, the images are already downscaled at
a small resolution. So there is no more need to force a max resolution
on the Qml Image.
2023-02-08 18:20:54 +01:00
mugulmd
a52aeabedb [ui] 3D viewer: correct field of view using orientation tag 2023-02-06 08:37:30 -08:00
mugulmd
7e4b1a77ac [ui] factorize exif orientation transform in utility functions 2023-02-06 08:16:42 -08:00
mugulmd
205ff22b74 [ui] apply orientation tag to 3d scene to match 2d viewer 2023-02-06 06:09:37 -08:00
Candice Bentéjac
6579ed3797 [Viewer] Check if active node's "input" attribute exists before accessing it 2023-02-03 10:58:16 +01:00
mugulmd
21f43075f0 [ui] fix transform used for camera in 3D viewer 2023-02-01 09:22:18 -08:00
mugulmd
9b0be36278 [ui] improve thumbnails quality 2023-01-26 05:10:35 -08:00
mugulmd
c48233141a [ui] ThumbnailCache: asynchronous cache cleaning 2023-01-23 06:29:15 -08:00
mugulmd
2f72f9e7d1 [ui] ImageDelegate: increase thumbnail timer to 5s 2023-01-23 06:28:30 -08:00
Fabien Castan
d18e8397c6
Merge pull request #1862 from alicevision/dev/externComputeIcon
[ui] Display nodes computed in another Meshroom instance as "Computed Externally"
2023-01-22 18:10:16 +00:00
Fabien Castan
40b182efc5
Merge pull request #1864 from alicevision/dev/saveImportImagesFolder
[ui] Use the location of the most recently imported images as the base folder for the "Import Images" dialog
2023-01-22 18:07:56 +00:00
Fabien Castan
922ee7b652 [ui] app: temporary workaround for qInstallMessageHandler 2023-01-20 08:37:31 +01:00
Sarah Brood
56fe514582
[ui] GraphEditor: use maxZoom to fit on nodes (#1865) 2023-01-18 11:49:03 +00:00
mugulmd
dd235dcbf1 [ui] clear thumbnail requests when changing viewpoints 2023-01-17 07:11:32 -08:00
mugulmd
ae3184decc [ui] send thumbnail request with timer to avoid deadlocks 2023-01-17 07:00:17 -08:00
mugulmd
3f96778f2a [ui] ThumbnailCache: check if thumbnail has been created by another thread 2023-01-17 03:09:39 -08:00
mugulmd
374b9abb77 [ui] ThumbnailCache: replace thread pool with custom thread spawning
This is so we can control in which order the requests are handled, as we want LIFO ordering instead of FIFO for smoother interaction.
2023-01-17 02:53:03 -08:00
mugulmd
0926b20d43 [ui] fallback for dispatching thumbnails in case cellID changed 2023-01-17 02:42:35 -08:00
Candice Bentéjac
3d0bc9eff3 [ui] Remove unused variables related to QSettings 2023-01-16 16:29:41 +01:00
Candice Bentéjac
d745c07f14 [ui] Change "Import Images" base folder behaviour if no location is saved
Prior to saving the images' locations across sessions, if no image had
been yet imported but a project file with images had been opened, the
default base folder for the session became the project images' location.
The location of dropped images back then was never saved.

Now that the locations from the "Import Images" are saved across session,
the possibilities of having no location saved have drastically decreased.
The three cases where it can happen are the following:
- the user has never opened Meshroom before (or the user has been using
Meshroom without ever using "Import Images")
- the user has cleared their Meshroom settings
- the 3 saved locations have become invalid

For these three cases, the default base folder is either set to the
location of the first dropped image or to the opened project's images.
That location is NOT saved for later sessions. Using the "Import Images"
action is necessary for the location to be saved.
2023-01-16 16:06:00 +01:00
mugulmd
7e371edc61 [ui] ThumbnailCache: resolve default cache dir in initialize method 2023-01-16 06:45:59 -08:00
mugulmd
80174e22af [ui] ImageGallery: faster thumbnail dispatch using caller ID 2023-01-16 06:21:48 -08:00
Candice Bentéjac
1b5e33c9ef [ui] Save the last folders of imported images across sessions
Save up to 3 folder locations from which images have been imported.
These folder locations will be saved across Meshroom sessions, in
a similar fashion as the "Recent Files" entries.
If no folder location has been saved (or if all saved folder locations
are invalid), we fall back to the default behaviour: if a project with
images has been opened before the "Import Images" action is called, then
the base folder will be the folder containing the opened project's
images.
2023-01-16 15:10:28 +01:00
Candice Bentéjac
abd9582aa7 [ui] Fix comment in "addRecentProjectFile" slot 2023-01-16 15:10:27 +01:00
Candice Bentéjac
5638cf3a75 [ui] "Import Images" dialog: Use opened project's images folder as the base folder
If a project has already been opened before the "Import Images" dialog
is opened for the first time, and if the opened project has imported
images, use the location of these images' folder as the base folder for
the "Import Images" dialog.

If the opened project has no imported images, the base folder will remain
identical to the other dialogs' until images are imported.
2023-01-16 15:10:27 +01:00
mugulmd
8551135514 [ui] ThumbnailCache: catch FileNotFoundError when removing thumbnails 2023-01-16 04:57:56 -08:00
mugulmd
7abbf1bbf3 [ui] ThumbnailCache: reduce number of system calls 2023-01-16 03:43:26 -08:00
mugulmd
a2e6a68811 [ui] ImageDelegate: check URL is not empty instead of OS call 2023-01-16 03:17:56 -08:00
mugulmd
dfb120c6d7 [ui] ThumbnailCache: limit number of worker threads to 3 2023-01-16 02:57:13 -08:00
mugulmd
268f608344 [ui] ThumbnailCache: use QStandardPath for default cache dir 2023-01-16 02:52:01 -08:00
Fabien Castan
2c7547e493
Merge pull request #1857 from alicevision/mug/exifOrientation
[ui] Viewer2D: support all Exif orientation tags
2023-01-14 21:25:34 +00:00
Candice Bentéjac
2dc0a678a1 [ui] Save folder location of the last imported images
This commit changes the folder in which the "Import Images" dialog
opens: it used to be opened in the folder in which the last .mg file
had been opened, and it now opens in the folder from which the last
images were imported.

The location of the last imported images is saved, and used specifically
when opening the "Import Images" dialog, as opposed to all the other
dialogs which open in the folder of the last opened .mg file.
2023-01-10 12:48:44 +01:00
mugulmd
cd955893e3 [ui] ImageGallery: default value for grid view cache buffer 2023-01-10 02:06:00 -08:00
mugulmd
88c85e9496 [ui] thumbnail busy indicator when loading 2023-01-10 00:31:50 -08:00