Commit graph

3115 commits

Author SHA1 Message Date
Fabien Castan
6db060263a
Merge pull request #1914 from alicevision/mug/rmPanoWarpOutImgs
[nodes] PanoramaWarping: remove obsolete image output attributes
2023-03-03 20:06:33 +01:00
Fabien Castan
fb2880e6de
Merge pull request #1917 from alicevision/fix/panoramaDesc
Fix the documentation related to Panorama nodes
2023-03-03 19:59:28 +01:00
Candice Bentéjac
edc453566b [pipelines] Panorama: Align the PanoramaPostProcessing nodes with the rest 2023-03-03 15:13:15 +01:00
Candice Bentéjac
da6bbefc45 [nodes] Panorama: Fix the documentation string display 2023-03-03 15:08:12 +01:00
Candice Bentéjac
8ab9007c18 [nodes] LdrToHdrMerge: Fix content of the documentation string
The string described the LdrToHdrCalibration node.
2023-03-03 13:55:47 +01:00
Candice Bentéjac
0f220067f3 [nodes] LdrToHdr: Remore references to Robertson calibration method
"Robertson" is not an available calibration method in the
LdrToHdrCalibration and LdrToHdrSampling, so it should be removed from the
nodes' documentation.
2023-03-03 11:44:02 +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
mugulmd
5dabd1d37a [nodes] PanoramaWarping: remove obsolete image output attributes 2023-03-02 02:28:23 -08: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
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
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
01be6d83c3 [Viewer] Viewer2D: Add name of the active SfM node in the SfMStats tooltips 2023-02-28 16:51:46 +01:00
Fabien Castan
95d0ca3156
[nodes] ExportAnimatedCameras: fix output params labels 2023-02-28 09:44:04 +01:00
Fabien Castan
47fcc2f9a4
Merge pull request #1903 from hammady/fix-1900
Fix missing Publish nodes in templates
2023-02-28 09:42:02 +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
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
fa86cde7c2 [nodes] KeyframeSelection: Add debug option to skip sharpness computations
Add a debug option that will, during the scores' computation, skip all the
calculations regarding sharpness. A fixed sharpness score of 1.0 will be
applied to all the frames.
2023-02-23 18:13:18 +01:00
Candice Bentéjac
fd5fc8e3ba [pipelines] Add a "Publish" node to all the templates
Follow up on the previous commit that added a "Publish" node at the end of
the photogrammetry pipeline.

Additionally, this commit updates the version of the "Publish" node used
in the photogrammetry template from 1.0 to 1.2, its most recent version.
2023-02-22 17:14:58 +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
25c12bbc51
[core] Node: hasInternalAttribute does not support groups and lists
hasInternalAttribute() should not support more cases than internalAttribute()
2023-02-22 12:04:00 +01:00
Hossam Hammady
784e60cdb7 Fix missing Publish node in photogrammetry pipeline
Closes #1900.
2023-02-22 05:42:38 +00:00
Fabien Castan
874c22946a
Merge pull request #1876 from alicevision/dev/panoramaTransform
[sfmtransform] Transformation parameter availability
2023-02-21 23:37:57 +01:00
Fabien Castan
feaae22f15
Merge pull request #1819 from alicevision/dev/largePanoramaMemoryClean
New nodes for large memory use in panoramas
2023-02-21 18:45:01 +01:00
Fabien Castan
d6e829e1cc [nodes] PanoramaPostProcessing: fix label 2023-02-21 11:03:57 +01:00
Fabien Castan
c462ea9c81 [nodes] Panorama: add semantic flag on output image files 2023-02-20 23:17:54 +01:00
Candice Bentéjac
311ab9cb40 [core] Add a property to ignore an attribute during the UID computation
By default, an attribute that belongs to the UID group 0 is taken into
the node's UID computation independently from its value, as long as it is
enabled.

When such an attribute is added to a node's list of attributes, it
automatically invalidates all computations made for this node prior to
its addition.

This commits adds a new attribute property, "uidIgnoreValue". This property
determines whether the attribute must be taken into consideration during
the node's UID computation: if the value of the attribute is the same as
"uidIgnoreValue", then it should be ignored; otherwise, it should be taken
into account. By default, "uidIgnoreValue" is set to "None", meaning that
any attribute that may be considered during the UID computation will be
taken into account.

In the context of the internal attributes, "uidIgnoreValue" is set to empty
string, so the "invalidation" attribute will not automatically
invalidate 100% of the nodes from existing graphs until its value is set
to a non-empty string.
2023-02-17 15:34:39 +01:00
Fabien Servant
9d56e40158 [panorama] new templates 2023-02-17 14:23:32 +01:00
Fabien Servant
b4c3950f40 [panorama] new nodes for large memory use 2023-02-17 14:23:32 +01:00
Fabien Castan
2f67ef3b60
Merge pull request #1879 from alicevision/dev/dcpMetadataApplication
Apply DCP metadata in imageProcessing
2023-02-16 19:20:48 +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
Fabien Castan
57b341c7de
Merge pull request #1899 from alicevision/fix/uiImageGalleryFilters
[ImageGallery] Match the filter selection with the gallery's display
2023-02-16 11:34:59 +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
1576bfd43d [ui] Check that viewpoints still exist before accessing their metadata
The metadata value of the viewpoint is meant to be a string, but if the
viewpoint attribute has already been removed and does not exist anymore,
then the metadata value becomes a PySide property.

When trying to access that property, an exception is raised. This commit
avoids raising exceptions in that case by checking that the viewpoint
attribute still exists (the metadata value is a string instance) before
accessing the metadata value.

This fixes the "Failed to parse Viewpoint metadata: 'the JSON object must
be str, bytes or bytearray, not Property'" warning raised by the exception
which occurred every single time there was a switch between cameraInit
groups that had been cleared.
2023-02-15 18:01:40 +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
68d11726f9 [ui] thumbnail cache: remove thumbnail if input image changed 2023-02-15 11:25:16 +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
492e4d5dd0 [core] Add property for the invalidation message from internal attributes 2023-02-15 08:36:15 +00:00
Candice Bentéjac
3bc9445615 [core] Internal attributes: move "invalidation" before "comment" 2023-02-15 08:36:15 +00:00
Candice Bentéjac
835e396d8d [core] Remove reference to pyCompatibility
pyCompatibility has been removed at the same time as Python 2 support.
2023-02-15 08:36:15 +00:00
Candice Bentéjac
7688b94ce5 [core] Raise compatibility issue if nodes miss invalidating internal attributes 2023-02-15 08:36:14 +00:00