Commit graph

169 commits

Author SHA1 Message Date
Candice Bentéjac
daa6e48f2c [core] Catch exception for calls to optional descriptor method on node creation
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.
2024-08-19 18:29:23 +02:00
Fabien Castan
a3bd0fe326 [core] node dynamic output: more precise warnings 2024-07-18 23:52:50 +02:00
Candice Bentéjac
5b07f9a393 [core] Exclude edges from InputNode nodes in dfsToProcess
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.
2024-07-02 12:18:35 +02:00
Fabien Castan
2d950758e3 [core] Propagate only if the node is already in a graph 2024-06-28 20:31:04 +02:00
Fabien Castan
3cc67fddfb [core] Propagate the onAttributeChanged notification to connected attributes 2024-06-28 19:56:47 +02:00
Fabien Castan
a82fe3927b [core] BaseNode: add property isInputNode 2024-06-28 19:54:48 +02:00
Aurore LAFAURIE
7af0997a73 [core] Add support for imageList as output in SequencePlayer 2024-06-20 11:54:30 +02:00
Aurore LAFAURIE
3eb90322a8 [core] Add detection of sequence semantic output 2024-06-20 11:54:29 +02:00
Fabien Castan
01874e52d3 [core] fix: uid keys are integers
During the serialization to JSON, dict keys are converted to string. We
need to convert them back to int.
2024-06-16 21:20:18 +02:00
Fabien Castan
cc6f75f2d4 [core] update UID computation to take into account the particular case of dynamic output attributes
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.
2024-06-16 19:05:03 +02:00
Fabien Castan
0e5be25d97 [core] remove duplicate call to updateOutputAttr
The update is done at the same place as the status update.
This is a duplicate that is not needed.
2024-06-16 18:58:00 +02:00
Fabien Castan
972d5751e1 [core] in case of CompatibilityNode the dynamic output attributes does not exist as they are not saved in the project
So we always check if they exist before accessing them.
2024-06-16 18:56:38 +02:00
Fabien Castan
77571dca38 [core] init nodes uids from project file 2024-06-16 18:54:37 +02:00
Fabien Castan
d5e356c0aa [core] New dynamic output attributes 2024-06-15 19:47:29 +02:00
Fabien Castan
bb1dde0569 [core] only format arguments if the default value is not None 2024-06-15 18:05:25 +02:00
Fabien Castan
2621fece29 [core] node: set internal attributes from the constructor 2024-06-15 18:05:24 +02:00
Fabien Castan
c972e402e7 [core] node: do not ask the node to upgrade internalAttributes
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.
2024-06-15 18:05:24 +02:00
Fabien Castan
1dd1fdf0c5 [core] node: more explicit log 2024-06-15 18:05:24 +02:00
Fabien Castan
379e674967 [core] node: set the attribute value from the constructor 2024-06-15 18:05:24 +02:00
Fabien Castan
80238ab2da [core] change level of verbosity for Compatibility nodes
Compatibility nodes are properly displayed in the UI, no need to
continue to have a high level of verbosity for that.
2024-06-15 17:12:21 +02:00
Fabien Castan
c986b4a134 [common] DictModel get does not raise errors as in Python
getr raises an error if the key does not exist
2024-06-15 17:10:46 +02:00
Aurore LAFAURIE
f3626a83c8 [core] elapsedTime set only once at the end of the process to avoid repetition of code 2024-06-11 12:11:12 +02:00
broods
a21a1c9962 [ui] update condition on node start time computation 2024-06-11 11:18:29 +02:00
broods
a5de8b86dc [ui] change SubmittedOrRunning function to only Running, string computation, function naming 2024-06-11 11:18:28 +02:00
broods
a29061efd5 [ui] add node computation on error status 2024-06-11 11:18:28 +02:00
broods
0adbcd1c47 [ui] add node computation time in real time in node editor
[ui] add node computation time in real time in node editor

[ui] add node computation time in real time in node editor
2024-06-11 11:18:28 +02:00
Fabien Castan
7bc07bdaad
Minor comment update 2024-06-07 17:49:08 +02:00
Aurore LAFAURIE
869e54f084 [core] Build cmdVars according to enabled attributes 2024-06-07 17:25:19 +02:00
Fabien Castan
d2ad818b2c [core] all parameter types could now be used as output attribute 2024-05-27 22:03:43 +02:00
Aurore LAFAURIE
3a199d7973 [core] Computing and submitting take nonComputing into account + Comment
When computing or submitting a graph, if nodes are not computable they do not send warning that nodes had trouble.
2024-05-27 22:03:42 +02:00
Aurore LAFAURIE
82dc3fb294 [core] Implementation of InputNode that doesn't need computation 2024-05-27 22:03:42 +02:00
Fabien Castan
d9b4b26a69
Merge pull request #2382 from alicevision/dev/pushButtonAttribute
[core/ui] Add support for PushButton attribute
2024-05-17 20:11:40 +02:00
Aurore LAFAURIE
862c5506a9 [core] Remove of saving PushButton behavior 2024-05-15 17:15:46 +02:00
Aurore LAFAURIE
5d70a51285 [core] Set internal attributes when copy/pasting nodes 2024-04-26 15:56:26 +02:00
Aurore LAFAURIE
bb8b544550 [core] PushButton Description Conflict handled for function descripted 2024-04-25 17:01:54 +02:00
Aurore LAFAURIE
eb1a0faf97 [core] PushButton attribute implemented
Add PushButtonParam class and implement onAttributeClicked method
2024-04-24 15:29:08 +02:00
Aurore LAFAURIE
c27281c9c1 [core] Renaming and documentation added
Renaming and documentation added to onAttributeChanged and
optionalCallOnDescriptor.
2024-03-29 11:36:09 +01:00
Aurore LAFAURIE
498fd6cbd2 [core] Add new type of ChoiceParam that changes dynamically according to other values
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.
2024-03-28 12:06:40 +01:00
Matthieu Hog
bd21a977b2 added ply to list of supported files 2024-02-13 10:27:57 +01:00
Fabien Castan
c6d0933d4f [core] Value need to be exposed without quotes to allow to compose simple expressions
For instance, on the Meshing node "outputMesh" param expression is:
value="{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}",

So the extension here should not contains quotes.
2024-02-02 20:14:15 +01:00
demoulinv
a7fc167512 [core] String formatting of parameters with/without quotes to deal with spaces in strings
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.
2024-02-01 18:28:51 +01:00
Candice Bentéjac
f51bf18a25 [core] Only update the running chunk to STOPPED when stopping computations
Chunks of that node that are already in the `SUCCESS` state will not be
updated, and those that are `SUBMITTED` but not `RUNNING` will be reset
to `NONE`.
2023-11-24 17:10:53 +01:00
Candice Bentéjac
49c11a9b9a NodeEditor: Add the default name of the node next to the label
If a node has a user-set label (defined through the internal attributes
of the node), its default name (the one that is displayed if no label
has been set) will be displayed next to it.

This allows to find quickly the correspondence between the node's label
and its type / how it is referred to in the current graph's file.
2023-07-20 16:28:33 +02:00
Loïc Vital
b6e22398f5
Merge pull request #2038 from alicevision/fix/nodeTypeInUid
[core] Include the node's type in the UID computation
2023-06-16 15:58:57 +02:00
Candice Bentéjac
7cb13905a1 [core] Handle UidConflict compatibility issues in node factory
The `UidConflict` is not detected per se within the node factory as a
node's UID cannot be computed accurately from there, since its expressions
(which may impact the UID computation) have not been resolved yet.

Instead, the `UidConflict` is detected externally, and the information
is transferred to the node factory, which will create a corresponding
compatibility node with the regular process.

The created `UidConflict` compatibility node will be handled by the
Compatibility Manager like any other compatibility node.
2023-06-15 19:08:52 +02:00
Candice Bentéjac
85021dbd08 [core] Add a description for the UidConflict compatibility issue 2023-06-15 18:29:41 +02:00
Candice Bentéjac
55d30ee1e3 [core] Add the node's type in the UID computation
This prevents getting the same UID for two nodes which are of different
types but have an identical list of attributes.
2023-06-13 15:00:10 +02:00
Candice Bentéjac
0c22bbb097 [core] Add property to know if node's outputs can be loaded in 3D Viewer 2023-06-13 14:45:59 +02:00
Candice Bentéjac
58748021aa [core] Notify changes on the enabled property of output attributes 2023-06-12 12:42:43 +02:00
Candice Bentéjac
36609bfc3b [core] Add property to know if node's outputs can be loaded in 2D Viewer
Add a property that is set to True if at least one of the node's output
attributes has the "image" semantic and can thus be loaded in the 2D
Viewer.
2023-06-09 17:32:05 +02:00