Move the attributeChanged callback logic within Node, as this
is a Node level mecanism (callbacks being declared on the node desc).
This commit also moves the attribute valueChanged signal outside of
the Attribute's constructor.
This seems to be the root cause to undesired side-effects breaking Qt's evaluation
system, data model access and consequently Meshroom's UI.
This will allow to simplify node descriptions as most of the attributes
are generally invalidating. Only non-invalidating attributes will need
to state explicitly `invalidate=False`.
For output attributes, which must not be invalidating, `invalidate` will
be automatically set to `False` at the attribute-level if it is set to
`True` in the description.
The UID system based on a UID index is removed and replaced by a single
UID per node.
Attributes will be included in the UID computation if the `invalidate`
is set to `True` in their description. This replaces the `uid=[]` /
`uid=[0]` element of the description.
If a node's description contains invalid operations in its `onNodeCreated`
method, exceptions are thrown without being caught and cause Meshroom
to crash.
These calls are now safely tried and any encountered exception is handled.
If the edges of a node to submit include an `InputNode` (which cannot
be computed), then that node should be excluded from the list of edges
to process as if that node had already been computed.
This allows to submit any type of graph involving `InputNode` to the farm.
For dynamic output attributes, the UID does not depend on the attribute
value.
In particular, when loading a project file, the UIDs are updated first,
and the node status and the dynamic output values are not yet loaded, so
we should not read the attribute value.
internalAttributes are managed on the Meshroom side, not at the node
level. So there is no reason to call the upgrade of internalAttributes
on the node description.
Add new type of ChoiceParam that changes dynamically according to other
values.
When value of an attribute is changed onAttributeChanged is called,
allowing to have unique reaction within node files.
Also add of callDesc function to be able to have other functions such as
onNodeCreated at creation of node.
For instance, on the Meshing node "outputMesh" param expression is:
value="{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}",
So the extension here should not contains quotes.
We have the problem of spaces in file paths, choices (like colorspace),
etc.
An empty list is not send to the command line.
An empty string is send to the command line as "".
Add new unit test to ensure it follows the expected rules.