Commit graph

112 commits

Author SHA1 Message Date
Yann Lanthony
6bb70895f3 [core] remove ABCMeta metaclass for Python 2 compatibility
mixing ABCMeta and QObject inheritance is problematic when using Python 2
2018-07-24 15:06:15 +02:00
Fabien Castan
9e06fd9661 [core] generic functions to create "writing" filepath and rename the file
* only try to remove the file on windows
* only except for specific exception
* use the same functions to create the statistics file
2018-07-24 14:32:24 +02:00
Fabien Castan
c6531bcc7b [core] multiple trials to replace the status file to avoid file conflicts on windows
On Windows, attempting to remove a file that is in use causes an exception to be raised. So we may need multiple trials.
2018-07-21 14:50:07 +02:00
Yann Lanthony
f5d11a8a7a [node] CompatibilityNode: expose additional properties
* add 'issueDetails' to get a comprehensive text about the issue
2018-07-19 13:50:45 +02:00
Yann Lanthony
52d1d1fb89 [core] node_factory: del old 'attributes' key from serialized node dict 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
1af3a16d81 [core] CompatibilityNode: recursively build List/GroupAttribute descriptions 2018-07-19 13:50:45 +02:00
Yann Lanthony
1d309136ec [core][node] serialization: rename 'attributes' to 'inputs' 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
67ac4bf2ca [core] split uids computation + cache override in updateInternals
* add _computeUids internal method + store computed uids in a dedicated dict
* cache override:
  * add optional cacheDir parameter on updateInternal method to override graph cache directory
  * _buildCmdVars always update member variable '_cmdVars' 
  * CameraInit: ensure node does not belong to a graph and use updateInternals with temp cache directory
2018-07-19 13:50:45 +02:00
Yann Lanthony
727950afef [core] take attributes name into account when computing node's uids
two different attributes with the same value must participate differently to the computed uid
2018-07-19 13:50:45 +02:00
Yann Lanthony
1f675a0e42 [core] split graph.py into separate modules
core.graph is now splitted into: 
  * graph.py
  * node.py
  * attribute.py
2018-06-26 12:19:14 +02:00