Commit graph

1084 commits

Author SHA1 Message Date
Candice Bentéjac
ac592f4cb2 [ui] ImageGallery: Re-parse intrinsics as soon as they are updated
When setting a temporary CameraInit node, the intrinsics of the actual
CameraInit node are used, meaning that the temporary CameraInit has all
the intrinsics information we need to fill the intrinsics table.

However, when a temporary CameraInit node is set, the parsing of the
intrinsics and the model update are not performed. If the active CameraInit
group does not change, this is not directly visible as the table keeps on
displaying the intrinsics from the actual CameraInit node.

If the active group changes, we attempt to fill the table with the
intrinsics of the temporary CameraInit node, which is being re-set for the
active group. The intrinsics are thus not available, leading to an empty
table, and the parsing is never retriggered once the temporary CameraInit
has been fully set.

Instead of re-parsing the intrinsics when the CameraInitIndex is updated,
the parsing is triggered when the intrinsics are updated, since this
ensures they will be available and its covers all the cases we could
be facing.
2023-03-15 10:00:08 +01:00
Candice Bentéjac
3e8e568bba [ui] ImageGallery: Update columns' width for the intrinsics table 2023-03-14 18:36:05 +01:00
Fabien Castan
a67f77de68
Merge pull request #1931 from alicevision/fix/updateViewer2D
[ui] Correctly update the Viewer 2D when there are temporary CameraInit nodes
2023-03-14 17:43:39 +01:00
Fabien Castan
eb6d65f938
Merge pull request #1915 from alicevision/mug/fix/metadataViewer2D
[ui] Viewer2D: fix displayed metadata
2023-03-13 19:06:47 +01:00
Candice Bentéjac
5e61a1da5a [ui] ImageGallery: Force index to -1 before setting it if there's a tempCameraInit
When there is a temporary CameraInit, it means that either the "Visualize
HDR images" or "Preprocessed images" options are enabled.

If several CameraInit groups are available, and if the currently selected
image in the GridView is the first one (index = 0), there is a possibility,
depending on the input images, that the first images in two different
groups are not identical but have the same view ID. If that happens, there
will be no update of the Viewer2D, as the selectedViewId property will not
have been modified.

By setting the selectedViewId property to -1 when there is a temporary
CameraInit and the current index in the GridView is 0, we trigger an
update of the viewer even when there is no apparent change in the view ID.
2023-03-13 15:57:24 +01:00
Fabien Castan
fe5ecc8f8f
Merge pull request #1771 from alicevision/dev/LCPManagement
Add support for Lens Camera Profiles (LCP)
2023-03-13 14:29:19 +01:00
Fabien Castan
95218570f1 [ui] ImageGallery: fix variable name distortionInitializationMode 2023-03-13 14:00:58 +01:00
mugulmd
571ef22b9d [ui] Viewer2D: handle special case of 8bit viewer for metadata 2023-03-13 04:41:42 -07:00
mugulmd
748512f38a [ui] separate viewpoint metadata from image metadata 2023-03-13 04:02:10 -07:00
Loïc Vital
14381fb42b [ui] display distoInitMode in image gallery tooltip 2023-03-10 07:58:45 +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
Loïc Vital
31b04092a0 [ui] update QML properties after changes in qtAV 2023-03-08 17:18:03 +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
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
614f831457 [ui] Force nodes' status update before performing a submit/compute/delete
This ensures that each node's status is correct before being computed,
submitted, or before having its data deleted. This is especially useful
when the File Poller is in minimal node, and only monitors the nodes that
are currently submitted or running.

If a graph is being opened in two different instances of Meshroom, and
computations are started on it in one of the instances, the other one will
not be aware of it (as the signals indicating computations have started
will have been emitted in the first instance, so no chunk will be added
to the monitoring in the second one). By forcing the update of the statuses
before actually starting computations or deleting data, we ensure that
there will not be any computational conflicts (same nodes submitted twice
in farm, for example) and that the users can know at all times what they
are doing without manually triggering a refresh.

This is not critical for the "Delete Data" part, as the action can already
be triggered even with there is no data to delete, but is still useful
to keep the displayed nodes as up-to-date with their actual status as
possible.
2023-03-02 19:13:00 +01:00
mugulmd
c976504280 [ui] Viewer2D: prioritize metadata from float viewer instead of sfmData 2023-03-02 03:17:37 -08:00
Candice Bentéjac
31579f3bc0 [ui] Do not disable the manual refresh button when computations are ongoing
Only disable it if it has been clicked by the user and the refresh is not
completed yet.
2023-02-28 17:07:59 +01:00
Candice Bentéjac
5156053361 [ui] Display file watcher's current status in the MaterialButton tooltip 2023-02-28 17:07:59 +01:00
Candice Bentéjac
589ead0d64 [ui] Use a third icon for the file watcher's "enabled" status
Each file watcher's status now has its own icon:
- Enabled: "published_with_changes"
- Disabled: "sync_disabled"
- Minimal: "sync"
2023-02-28 17:07:58 +01:00
Candice Bentéjac
5b4a9adbd5 [ui] Update MaterialIcons.ttf and add "published_with_changes" icon 2023-02-28 17:07:58 +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
01be6d83c3 [Viewer] Viewer2D: Add name of the active SfM node in the SfMStats tooltips 2023-02-28 16:51:46 +01:00
Candice Bentéjac
f4418f44c3 [Viewer] Viewer2D: Remove trailing whitespaces 2023-02-27 19:22:34 +01:00
Candice Bentéjac
15f963a9b5 [Viewer] Viewer2D: Load and unload SfmStats components explicitly
The SfmStatsView and SfmGlobalStats components used to be loaded once
and for all with "Component.onCompleted". With the upgrade to Qt 5.14,
it is needed to load and explicitly unload the component (by resetting its
source) for the statistics to always be correctly displayed. Otherwise,
they can be loaded and viewed only once per session; after being shown for
the first time, they are set to null and never reloaded.

This commit uses the same type of loading/unloading as all the other
components in the 2D Viewer.
2023-02-27 19:21:18 +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
Fabien Castan
69d45fde1b
Merge pull request #1898 from alicevision/fix/intrinsicsWarnings
[ui] Intrinsics: Fix warnings and exceptions
2023-02-16 19:17:31 +01:00
Fabien Castan
35954a7088
Merge pull request #1893 from alicevision/mug/fixThumbnailCache
[ui] fix thumbnail cache bugs
2023-02-16 12:19:57 +01:00
Candice Bentéjac
8e00a5be8c [ImageGallery] Match the filter selection with the gallery's display
Selecting any filter in the Image Gallery changes the displayed content of
the gallery according to the filter. Unselecting any filter automatically
switches the displayed content back to the "input images" filter (which
simply displays all the input images), but the "input images" button is
never reselected, meaning that there can be a display corresponding to a
filter without any filter being selected.

This commit prevents unselecting a filter without reselecting the one
corresponding to the display. Since the "input images" is always the
display that is reverted to, unselecting any filter automatically selects
its button.
2023-02-15 18:20:20 +01:00
Candice Bentéjac
7bdd7cf9d6 [ImageGallery] Initialize and use "attribute" properly for the intrinsics table
This commit fixes an "Unable to assign QJSValue to QObject*".

In IntrinsicDisplayDelegate, initialize the "attribute" variant to null
and set it as a parameter during the instantiation in ImageGallery.
All references to "model.display" in IntrinsicDisplayDelegate have been
replaced with a correct use of "attribute".
2023-02-15 17:32:22 +01:00
Loïc Vital
b4851d7a50 [ui] thumbnail request: stop timer after 1st trigger to avoid running endlessly in background 2023-02-15 09:39:47 +01:00
Candice Bentéjac
6381371e7d Display the invalidation and comment messages in the internal attributes' tooltip
The tooltip now displays both the invalidation message, followed by the
comments. The invalidation message is displayed first in bold font,
followed by an empty line and the comments in regular font.

The tooltip now appears if at least one of the invalidation or comment
messages exists.

The invalidation and comment messages are formatted with HTML tags prior
to their display. The descriptions of both attributes is also updated
to indicate which one is displayed in bold or regular font.
2023-02-15 08:36:16 +00:00
Candice Bentéjac
4b7a548687 Notify changes in internal attributes' properties
The "label", "color" and "comment" properties are not constant anymore,
their changes in value are notified with the internalAttributesChanged()
signal, like the "invalidation" property.

This implies that the connection on "internalAttributesChanged" on the
QML side is not needed anymore.
2023-02-15 08:36:16 +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
Candice Bentéjac
2987bf0617 [ui] Perform "Clear Images" action on the Python side instead of QML
The "Clear Images" action was performed solely on the QML side, updating
the graph with every intrinsics removal, which considerably slowed down
the whole process.

The QML action now calls a slot on the Python side, which can disable
the graph updates at every modification, thus greatly improving the speed
of the process.

As a point of comparison, clearing 511 PNG images took approximately 38s
on the QML side, against 8s on the Python side. Clearing 1000 PNG images
took 2min39 on the QML side, against 32s on the Python side.
2023-02-15 08:34:41 +00: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
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
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