Commit graph

4510 commits

Author SHA1 Message Date
Yann Lanthony
f8f03b0bd5 [core] Graph: improve uid conflicts check on deserialization
Only perform uid check when we have both a serialized and a computed
UID.
If the node has not been serialized with a UID, it means that it does not
expect to match a specific value on deserialization.
2025-02-06 16:46:04 +01:00
Yann Lanthony
6b75dcb356 [core][graphIO] Introduce PartialGraphSerializer
Add a new serializer class to manage partial graph serialization logic,
ensuring to remove link expressions on attributes refering to nodes
that are not in the subset of nodes to serialize.
2025-02-06 16:46:04 +01:00
Yann Lanthony
01d67eb33d [graphIO] Introduce graph serializer classes
Move the serialization logic to dedicated serializer classes.
Implement both `GraphSerializer` and `TemplateGraphSerializer`
to cover for the existing serialization use-cases.
2025-02-06 16:46:04 +01:00
Yann Lanthony
a665200c38 [core] Introducing new graphIO module
Move Graph.IO internal class to its own module, and rename it to `GraphIO`.
This avoid nested classes within the core Graph class, and starts decoupling
the management of graph's IO from the logic of the graph itself.
2025-02-06 16:46:04 +01:00
Yann Lanthony
3064cb9b35 [core] CompatibilityNode: do not use link expressions as default values for unknown File attributes
When creating a compatibility description for an unknown attribute, do not
consider a link expression as the default value for a File attribute.
This is breaking how the link expression solving system works, as it's resetting
the attribute to its default value after applying the link.
If that expression is kept as the default value, it can be re-evaluated several
times incorrectly.
Added a test case that was failing before that change to illustrate the issue.
2025-02-06 16:46:04 +01:00
Yann Lanthony
4aec741a89 [core] Graph: add importGraphContent API
Extract the logic of importing the content of a graph within a graph instance from
the graph loading logic.
Add `Graph.importGraphContent` and `Graph.importGraphContentFromFile`
methods.
Use the deserialization API to load the content in another temporary graph instance,
to handle the renaming of nodes using the Graph API, rather than manipulating
entries in a raw dictionnary.
2025-02-06 16:46:04 +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
Yann Lanthony
c883c53397 [core] Refactor nodeFactory function
Rewrite `nodeFactory` to reduce cognitive complexity,
while preserving the current behavior.
2025-02-06 16:46:04 +01:00
Yann Lanthony
75db9dc16c [tests] Add extra compatibility tests
Add a new test suite for graph template loading.
2025-02-06 16:46:04 +01:00
Yann Lanthony
025e0e3322 [core] Move nodeFactory to its own module 2025-02-06 16:46:04 +01:00
Fabien Servant @ TCS
ebf2270d48
Merge pull request #2665 from alicevision/fix/attrValueChangedConnection
Fix: Improve large project file loading performance
2025-02-06 15:55:35 +01:00
mhog
43ecfa7e6f
Merge pull request #2617 from alicevision/dev/mayaScript
Export Maya .mel Script
2025-02-06 11:47:02 +01:00
Fabien Servant @ TCS
8a8cb8be88
Merge pull request #2645 from alicevision/dev/extractMetadataWithExifTool
Extract more metadata using exifTool
2025-02-05 14:20:10 +01:00
Fabien Servant
534b95e771 Add log 2025-02-05 14:17:56 +01:00
Yann Lanthony
37a813e08a [core] Propagate Attribute.valueChanged to the owning Node through a Slot
Connecting the valueChanged signal to a lambda causes performance
issues with a large number of attributes when using the Pyside backend.
Connecting that signal to an intermediate Slot part of the Attribute class
improves performance dramatically.
Note: This has no comparable impact on the standalone backend.
2025-02-05 11:54:49 +01:00
Fabien Servant
696ec16277 Change node names for experimental pipeline 2025-02-03 13:45:32 +01:00
Fabien Servant
7e82fb2fab Add outputViewsAndPoses to sfmExpanding 2025-02-03 13:29:40 +01:00
Fabien Servant
ad61a0141e add SfM Nodes to meshroom types list 2025-02-03 13:16:18 +01:00
Fabien Servant
b989ac0c30 Photogrammetry pipelines experimental 2025-02-03 11:09:54 +01:00
Fabien Servant
8cd9752587 Output are now alembic files 2025-02-03 11:09:53 +01:00
Fabien Servant
176e2a8c4c New tracking experimental pipelines 2025-02-03 11:09:53 +01:00
Vivek
910736b3d7
Merge pull request #2659 from alicevision/ci/codecov-tests
[ci] Codecov: enable support for test run reports
2025-02-03 10:41:41 +05:30
Fabien Castan
91885afe11
Merge pull request #2658 from alicevision/dev/maskProcessing
Mask processing node
2025-01-31 20:38:31 +01:00
Vincent Demoulin
baa2e220ed [Node] ExtractMetadata: Add option to update sfmData 2025-01-31 15:56:13 +01:00
Vincent Demoulin
3e854e7b38 [Node] ExtractMetadata: Replace os.system with subprocess.Popen 2025-01-31 11:29:29 +01:00
Yann Lanthony
cf189fd57b
Merge pull request #2637 from alicevision/dev/optimRecentProjects
[ui] Refactor the access to the list of recent project files
2025-01-30 17:34:34 +01:00
Vincent Demoulin
f1d68b660c [node] extractMetadata: Add explicit error messages 2025-01-30 17:18:58 +01:00
Fabien Servant
fad39ee1f6 Mask processing node 2025-01-30 09:09:18 +01:00
Yann Lanthony
0f1cde127b [ci] Codecov: enable support for test run reports 2025-01-28 16:27:47 +01:00
Yann Lanthony
e51bb93bf0
Merge pull request #2650 from alicevision/fix/CrashingEdge
[ui][fix] Edge: Fixing an issue with mouse event on Custom EdgeMouseArea causing Crash
2025-01-27 12:22:42 +01:00
waaake
870dcf4edb [ui] Edge: Updated curveScale to use standard property binding for EdgeMouseArea 2025-01-27 16:48:00 +05:30
Fabien Castan
2eb30fec15
Merge pull request #2652 from alicevision/dev/NodeLayout
Enable Fitting of selected Nodes in the Graph Editor when Fit is invoked
2025-01-27 08:40:59 +01:00
Fabien Castan
2bd98c34fe
Merge pull request #2654 from alicevision/dev/sfmMultiMerge
Enable merge of multiple sfmDatas
2025-01-27 08:36:10 +01:00
Yann Lanthony
bd2b8926e7
Merge pull request #2655 from alicevision/fix/crashIntrinsics
[ImageGallery] Intrinsics table: Always fully instantiate the model before populating it
2025-01-24 10:37:25 +01:00
Fabien Servant
b6913084ee Enable merge of multiple sfmDatas 2025-01-23 16:09:35 +01:00
waaake
49ceb6e78c [ui] Edge: Removed Qt.binding on curveScale 2025-01-23 10:42:28 +05:30
waaake
3a0d167bce [ui][fix] Edge: Updated Overridden geometryChanged -> geometryChange
With Qt6 the geometryChanged method was updated to be called as geometryChange and with that update QQuickItem was not getting internal updateShape to get invoked upon updates
2025-01-23 10:41:52 +05:30
Candice Bentéjac
7c9a869d99 [ImageGallery] Use palette's colors for the text of the intrinsics display 2025-01-22 20:14:20 +01:00
Candice Bentéjac
f1a83628a6 [ImageGallery] Do not fill intrinsics model until it has been instantiated
In some cases, like when opening the most recent file from the command
line, switching the color palette or hot reloading, the intrinsics
might be parsed and ready to populate the intrinsics' `TableModel` while
the model itself is being instantiated.

To prevent crashes, we forbid operations on the `TableModel` until it has
been fully instantiated.
2025-01-22 20:09:23 +01:00
Candice Bentéjac
935f5d07db [ImageGallery] Remove version number from Qt.labs.qmlmodels import 2025-01-22 20:03:48 +01:00
Candice Bentéjac
59afac317d [ui] app: Rewrite thumbnail retrieval and handle more exceptions 2025-01-22 15:52:22 +01:00
Candice Bentéjac
18a0bdf8f3 [ui] app: Rename _getRecentProjectFiles function
It is renamed to `_getRecentProjectFilesFromSettings`.
2025-01-22 14:50:28 +01:00
Candice Bentéjac
de7777f8b0 [ui] app: Don't read QSettings again when updating thumbnails for projects
There is no need to read the QSettings again as the content of
`self._recentProjectFiles` reflects their content accurately and they
do not store any thumbnail-related information.

QSettings will now only be read once, upon Meshroom's start.
2025-01-22 14:50:27 +01:00
Candice Bentéjac
041c643be6 [ui] app: Add a dedicated function to retrieve thumbnails
Instead of doing it directly within the `_getRecentProjectFiles` method,
add a function that attempts to retrieve a thumbnail corresponding to
an input project file path.
2025-01-22 14:50:26 +01:00
Candice Bentéjac
edfe872227 [ui] Homepage: Only request thumbnails update if Homepage is active view 2025-01-22 14:50:26 +01:00
Candice Bentéjac
73de823eb4 [ui] app: Add a slot to refresh the thumbnails of recent project files
When the list of recent project files is updated, there is no attempt
to retrieve its thumbnail as the update is said to be "minimal".

This minimal update is justified by the lack of use for the thumbnails
in the Application part of Meshroom. Thumbnails are only useful when
displaying the Homepage, hence their retrieval during Meshroom's
initialization. There is only a need to update them once we want to
display the Homepage again.

The Homepage thus requests an update of the thumbnails before setting
its model. If there have been some updates to the list of recent project
files, the reading of the QSettings is performed again and thumbnails
are retrieved whenever it is possible. Otherwise, nothing happens to
prevent useless readings.
2025-01-22 14:50:25 +01:00
Candice Bentéjac
2ab3ca24c8 [ui] app: Refactor the recentProjectFiles property
The property itself only accesses a list instead of reading the QSettings
every single time it is called.

It is set once during the application's launch with a full reading, and
is then updated without performing extra reading operations every time
a file is added to or removed from the list.
2025-01-22 14:50:25 +01:00
Yann Lanthony
1aea45efa3 [core] Node: Propagate attribute change via valueChanged signal
Propagate attribute value changes downstream using `valueChanged` signal
emission, instead of calling `_onAttributeChanged` directly.
This does not change the current core behavior, but it triggers the
property notification signal when in UI mode.
This makes changes happening upstream properly reflected in downstream nodes.
2025-01-21 18:55:59 +01:00
waaake
a5e6d61730 [ui] GraphEditor: Added Fit to Selected Nodes in the Graph
Pressing F or invoking GraphEditor.fit() now considers the selected nodes and fits/focusses on the overall selection if present, else fits/focusses all of available nodes
2025-01-21 09:45:46 +05:30
Candice Bentéjac
8640ac7e4d [ui] app: Remove unused QtCore import 2025-01-20 15:52:46 +01:00