Commit graph

53 commits

Author SHA1 Message Date
Candice Bentéjac
b470078667 [tests] Add checks on internal attributes in the templatesVersion test
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.
2023-02-15 08:36:14 +00:00
Candice Bentéjac
10844747f0 [core] Do not write outputs, internal folder and parallelization in templates
For every node, the only information that is kept when saving a
template are the non-default input attributes' values as well as the
node's position.

The unit test checking the templates' nodes is updated to stop taking
outputs into account.
2022-10-21 16:54:17 +02:00
Candice Bentéjac
02f87ff634 [tests] Add a unit test to check for templates' versions
This test checks that there is no compatibility issue with the nodes
saved in the template files. It fails when an upgrade of a templates is
needed. Any template can still be opened even if its nodes are not up-to-
date, as they will be automatically upgraded.
2022-10-21 16:20:12 +02:00
Candice Bentéjac
5b45182bcb [tests] Check that UIDs are identical when writing and loading a graph 2022-09-26 18:18:14 +02:00
Fabien Castan
dd5aadd875
Merge pull request #1738 from alicevision/fix/undoDuplicatedNodes
Fix node duplication/removal behaviour
2022-08-01 15:56:48 +02:00
Candice Bentéjac
b77274a027 Store all duplicates of a node correctly upon their creation
Duplicates used to be stored in a dictionary with an entry being
"parent node": "duplicated node". On occasions where a single
parent node was duplicated more than once, the latest duplicated
 node erased the previous one(s), and these older ones were
"lost": after being created, there was no trace left of their
existence in the duplication operation. Undoing that duplication
operation was thus leaving these duplicated nodes out and not
removing them.

Duplicated nodes are now stored as "parent node": [list of
duplicated nodes] to keep track of all the created nodes,
effectively removing them upon an "undo".
2022-07-28 14:13:31 +02:00
Candice Bentéjac
8fb0c778d1 Add support for external pipelines using project files
- Support loading external pipelines as templates with project files
- Add template files for some standard pipelines
- Remove the hard-coded generation of new pipelines
- Update multiviewPipeline test: the multiviewPipeline test relied on the hard-coded generation of
pipelines.
2022-07-12 14:56:24 +02:00
Fabien Castan
18be350e6f
Merge pull request #1227 from ChemicalXandco/box_select
[ui] add support for selecting multiple nodes at once
2021-05-03 23:42:11 +02:00
ChemicalXandco
55b16bc6d3 [tests] update node duplication test 2021-02-03 22:29:31 +00:00
Fabien Castan
37d3008f9e [core] rename nodesOfType 2021-01-22 13:12:29 +01:00
Julien-Haudegond
37c758c8da [core/tests] Graph: default startNodes parameter in dfsOnDiscover() 2020-09-04 15:39:27 +02:00
Julien-Haudegond
b567d8ff5c [core] Graph: change default reverse direction in dfsOnDiscover() 2020-09-04 12:42:05 +02:00
Julien-Haudegond
208749d897 [core] Graph: change signature of dfsOnDiscover() 2020-09-04 12:22:20 +02:00
Julien-Haudegond
f8bd40ad38 [core] Graph: rename nodesFromNode() to dfsOnDiscover() 2020-09-04 11:49:45 +02:00
Julien-Haudegond
5722ef56ed [tests] Graph: add new test with nodesFromNode() 2020-09-02 12:44:20 +02:00
Fabien Castan
b760a1f4f6 [tests] fix param change 2020-07-16 10:07:39 +02:00
Grégoire De Lillo
236e3e19b0 [tests] compatibility : Add list of groups update test 2020-02-20 17:13:29 +01:00
Yann Lanthony
4f2c4d80b9 [tests] multiviewPipeline: add de/serialization testing 2019-02-01 16:04:09 +01:00
Yann Lanthony
2a0b695ea7 [core] more thorough compatibility issues detection
* add 'matchDescription' method on desc.Attribute.
* desc.ListAttribute/desc.GroupAttribute: 'matchDescription' ensure that value perfectly match element/group description. Enable recursive checking for child attributes.
* nodeFactory: detect DescriptionConflicts in pre-process pass by checking that serialized node's attributes perfectly match their descriptions
* CompatibilityNode.attributeDescFromNameAttribute: consider link expressions as valid values
* test_compatibility: more complete description conflicts unit testing
2019-02-01 16:03:21 +01:00
Yann Lanthony
dd3d9cd54b [core][ui] add upgradeAllNodes methods
+ check if node is upgradable in UpgradeNodeCommand
2018-07-20 17:55:30 +02:00
Yann Lanthony
30cd8001fd [core][graph] update nodes computability on topology change
CompatibilityNodes introduce a new notion of computability per node.
An uncomputed (and therefore uncomputable) CompatibilityNode blocks the computation of all its successor.

* update nodes computability on topology change (in addition to min/max depth)
* evaluate leaves computability to determine if the whole graph can be processed
2018-07-19 13:50:45 +02:00
Yann Lanthony
2952e11691 [core] move duplicateNode methods to core.graph
handle this low-level operation engine side

* fix ListAttribute children links duplication
* handle CompatibilityNode duplication
* move corresponding unit test in test_graph.py
* [ui] add DuplicateNodeCommand
2018-07-19 13:50:45 +02:00
Yann Lanthony
33eb7f3a7f [core] introduce CompatibilityNode for improved scene compatibilities
Improve node serialization/deserialization to be able to recreate the exact same node in the graph when loading a meshroom project, even if the corresponding node's description has changed or does not exist anymore. This allows to recover already computed data on disk, without being impacted by changed uids. CompatibilityNode also provides an on-demand upgrade system to turn into a Node that meets the current node description (if possible).
 
* new abstract class BaseNode, base class for Node and CompatibiliyNode 
* Node: serialize everything needed to spawn a CompatibilityNode with precomputed outputs: inputs, uids, parallelization settings, unresolved internal folders and outputs
* node_factory: handles node deserialization and compatibility issues to create either a Node or a CompatibilityNode
* add compatibility unit tests
2018-07-19 13:50:45 +02:00
Yann Lanthony
cf243ea488 [tests] move test nodes to tests package
avoid releasing test-related nodes
2018-07-19 13:50:45 +02:00
Yann Lanthony
346277629a [nodes] use 'desc.Node.internalFolder' in outputs values
* avoid duplicating the same string everywhere
* don't override 'internalFolder' with the same value default value in subclasses
2018-07-19 13:50:45 +02:00
Yann Lanthony
c23ec5376b [tests] ui_graph: delete graph object
unparented QObject with no QApplication causes crash after test execution if not explicitly deleted
2018-07-03 18:47:03 +02:00
Yann Lanthony
dbf2649621 [ui.graph] fix node duplication method
* duplicate all nodes before re-creating edges
* add unit test
2018-06-27 18:46:51 +02:00
Yann Lanthony
2cd724f957 [graph] ListAttribute: replace '__getitem__ by 'at'
__getitem__ is spuriously called when the object is used inside a Qt model and exposed to QML, leading to unexpected behaviors
2018-06-18 14:43:18 +02:00
Yann Lanthony
8de3d46537 [tests] fix multiviewPipeline test
isDefault is a property
2018-06-06 11:41:24 +02:00
Fabien Castan
fb549ff3df [python] use items instead of iteritems for python2/3 compatibility 2018-05-21 16:13:43 +02:00
Yann Lanthony
b596bdffca [multiview] split pipeline creation into several functions
* add 'sfmPipeline', 'mvsPipeline' and 'photogrammetryPipeline' instantiating nodes in an existing graph
* rename main function (creating a new Graph) 'photogrammetry' + create a Publish node if 'output' is specified
2018-03-21 15:53:34 +01:00
Yann Lanthony
1bc6168814 [graph] add helper methods to get nodes by type and sort them by name 2018-01-12 13:59:08 +01:00
Yann Lanthony
516f909db4 [graph] add nodesFromNode method based on reverse dfs visit
Get the whole node chain from a start node to the graph leaves following graph edges
2018-01-08 13:08:55 +01:00
Yann Lanthony
b97090430c [tests] fix multiview pipeline test 2018-01-05 12:31:24 +01:00
Yann Lanthony
e9816a6a6e [tests] fix test_multiviewPipeline
Viewpoints.image -> Viewpoints.path
2017-11-17 19:27:20 +01:00
Fabien Castan
1e4f8f8a61 Add chunk notion for parallelization and implement specific updateInternals in CameraInit node
* Add chunk notion for parallelization
* Allows Node desc to implement custom updateInternals
* CameraInit node implement a specific updateInternals to update the
input image list
* FeatureExtraction, FeatureMatching, DepthMap, DepthMapFilter:
implement parallelization
2017-11-07 15:47:14 +01:00
Yann Lanthony
16e8037fd7 [core] change Attributes declaration on Node description
Inputs and outputs Attributes are now declared in two separate lists
* no more isOutput field on Attribute description
* guarantee attributes order (was not the case in Python2 with class attributes)
* Attribute's name is now part of its description

Note: for now, input and output Attributes are still stored in a single model inside a Graph.
2017-10-31 19:47:32 +01:00
Fabien Castan
041f98ae8a [tests] tests UIDs on the multiview pipeline
* ensure that identical graphs have the same UIDs
* ensure that multiview pipeline graphs with different input images have
different UIDs on all output attributes
2017-10-31 12:12:51 +01:00
Fabien Castan
b7175e219f [tests] test multiview pipeline and List/GroupAttributes set/get 2017-10-31 12:08:58 +01:00
Fabien Castan
e0c52898cc [tests] test uid on input params with/without link 2017-10-31 10:49:30 +01:00
Fabien Castan
1af40dac9e [tests] remove useless main 2017-10-31 10:48:27 +01:00
Yann Lanthony
3b45ac1669 [tests] add tests on graph invalidation 2017-10-30 17:48:54 +01:00
Fabien Castan
e533c588dd [core] graph: add the notion of flowEdges and minMaxDepthPerNode
- flowEdges: Compute a transitive reduction of the graph to provide
node-level minimal dependencies to create an execution workflow for
renderfarm.
- minMaxDepthPerNode: compute the min and max depth per node
2017-10-24 20:22:39 +02:00
Fabien Castan
2bf95d200f [test] add more graph tests 2017-10-24 20:19:24 +02:00
Yann Lanthony
1e306f8408 rename Model to DictModel + augment API
* add "update" and "reset" methods
* core: no more default keyAttrName
* qt: if keyAttrName is empty, don't register items in internal dictionnary
2017-10-23 19:54:55 +02:00
Yann Lanthony
bc5bb96c2e [tests] fix test_depth
depth is now a property
2017-10-13 16:38:07 +02:00
Yann Lanthony
e893a3dfc6 rename package 'processGraph' to 'core' 2017-10-09 12:16:20 +02:00
Yann Lanthony
d556547d0b [tests] fix Graph import 2017-10-02 16:33:59 +02:00
Yann Lanthony
547e6c93b6 rename "types" to "common" to avoid name conflict
types is already a standard python package
2017-09-25 20:04:41 +02:00
Yann Lanthony
4cd9627263 [tests] add basic tests for data models 2017-09-25 19:13:34 +02:00