If some internal attributes are saved in the templates, their description
should be checked just like the input attributes to ensure there are no
conflicts.
Non-default internal attributes need to be written in the templates,
but the "internalInputs" entry in the dictionary should not be written
at all if all the internal attributes are set to their default values.
"hasAttribute" was previously never called before attempting to
access an attribute. With the addition of internal attributes, we
want to check the attribute's/internal attribute's before accessing
it to avoid KeyError exceptions. "hasAttribute" (and the newly added
"hasInternalAttribute") would not parse the attribute's name before
checking for its existence, meaning that errors could be generated for
list or group attributes as their checked name could contain other
elements (e.g. "featuresFolder[0]" for a ListAttribute named
"featuresFolder").
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.
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.
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.
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.
Add calibrationMethod as parameter at sampling.
Link calibrationMethod parameter of calib node to sampling node's calibrationMethod parameter in both HDR pipelines.
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.