Commit graph

593 commits

Author SHA1 Message Date
Candice Bentéjac
b726387534 [core] Graph: Support loading files with previous UID system
The file version is updated and support for files with an older version
is added: upon detecting that the file version is old, the old UID
keys will be detected and reformatted with new ones so the file can
be properly loaded.
2024-09-12 10:41:53 +02:00
Candice Bentéjac
9973298746 [core] Simplify invalidation status for all the attributes
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.
2024-09-12 10:41:53 +02:00
Aurore LAFAURIE
da3335ee94 [core/ui] Exposed property added to attributeDesc
Exposed is useful to display the attribute in the upper part of the node in the Graph Editor.
By default, File attributes are exposed.
2024-09-11 11:53:34 +02:00
Aurore LAFAURIE
019e137386 [ui/core] First version of For Loop implementation
If you connect a list to an attribute, you can iterate over the list as a for loop
2024-09-02 17:08:01 +02:00
Aurore LAFAURIE
5b92df328f Implementation of Homepage 2024-08-26 16:21:26 +02:00
Fabien Castan
9036a973dd
Merge pull request #2500 from alicevision/fix/exceptOnNodeCreation
[core] Catch exception for calls to optional descriptor method on node creation
2024-08-19 18:49:47 +02:00
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
d3561993ef
Merge pull request #2493 from alicevision/dev/inheritedAttributes
[core] Reference the attribute's instance type in its description
2024-08-19 17:33:21 +02:00
Candice Bentéjac
cc88120a98 [core] desc: Group properties together at the end of their class 2024-08-13 15:37:45 +02:00
Candice Bentéjac
17e8e3e315 [core] Add reference to attribute's instance type in descriptions 2024-08-13 15:34:17 +02:00
Fabien Castan
720d565557
Merge pull request #2487 from alicevision/dev/initCore
Initialize `core` plugins at different moments
2024-08-07 19:12:58 +02:00
Candice Bentéjac
91b514cac5 [core] Attribute: Directly access description's type in getType()
The attributes' descriptions already have a `type` property which is
set with `self.__class__.__name__`. Instead of performing the same call
directly within the attributes, the `type` property of the description
is used.

In case a description would not have a standard type (i.e. anything that
may differ from the class name), this information will be propagated at
the attribute level instead of being lost.
2024-08-01 19:20:04 +02:00
Candice Bentéjac
616318ace1 [core] Remove unused initPlugins method 2024-08-01 11:06:30 +01:00
Fabien Castan
a3bd0fe326 [core] node dynamic output: more precise warnings 2024-07-18 23:52:50 +02:00
Candice Bentéjac
6ee3c7936b
Merge pull request #2459 from alicevision/dev/submitOrComputeSubgraph
Compute or Submit selected nodes
2024-07-17 16:17:51 +02:00
Aurore LAFAURIE
887844541c Compute or Submit selected nodes 2024-07-17 16:08:00 +02:00
Candice Bentéjac
ad94effb98 [core] Values of ChoiceParam should be a list, Error message added for initialisation 2024-07-17 12:39:14 +02:00
Vincent Demoulin
a6be4e4938 Create Init functions for nodes, submitters and pipelines 2024-07-05 15:46:58 +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
Candice Bentéjac
2bcf9d432c [core] Graph: Remove selectedViewpoint property
The information that this property conveys will be accessible at an upper
level and is thus redundant here.
2024-06-27 15:04:53 +02:00
Fabien Castan
6b10c24f32
Merge pull request #2443 from alicevision/dev/accessCurrentFrame
Provide access to the current frame from the graph
2024-06-20 17:01:06 +02:00
Candice Bentéjac
d585b053a5 [core] Graph: Add a selectedViewpoint property
The `selectedViewpoint` property will store the attribute corresponding to
the actively selected viewpoint, if it exists. Otherwise, it will be set
to None.
2024-06-20 15:47:04 +02:00
Aurore LAFAURIE
aacacb1d65 [core] Prevent bug from onAttributeChanged when setting value of self attribute 2024-06-20 11:54:30 +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
Candice Bentéjac
154babbf5c
Merge pull request #2440 from alicevision/dev/sortToSave
File export ordering
2024-06-17 11:35:55 +02:00
Fabien Castan
8451f299ab Remove extra logging 2024-06-17 09:36:37 +02:00
Fabien Castan
620ba0c2cf [core] sort nodes by name in file export
Avoid randomness in the ordering during file export to facilitate
comparison of scene files.
2024-06-16 21:31:54 +02:00
Fabien Castan
3c4ebd9b25 [core] sort node types versions in file export 2024-06-16 21:29:23 +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
412c496804 [core] attr: ensure a unique id for each dynamic output attribute 2024-06-16 18:51:01 +02:00
Fabien Castan
695d590ea6 [core] attr: uid for dynamic output attributes use the node uid 2024-06-16 18:40:59 +02:00
Fabien Castan
c2a699e484 [core] attr: add comment 2024-06-16 18:39:34 +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
8aa76fd1d0 [core] try/except around calls to node's lambda 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
020dbecc68 [core] attribute: new initValue, independant from the resetToDefaultValue
Avoid to evaluate the default value if we don't need to.
2024-06-15 18:05:24 +02:00
Fabien Castan
0c3426250a [core] Add value type for each Attribute desc type 2024-06-15 18:05:23 +02:00
Fabien Castan
1f2fc36456 [core] Use warnings instead of raising an exception for duplicated node types 2024-06-15 17:13:06 +02:00