Commit graph

158 commits

Author SHA1 Message Date
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
Candice Bentéjac
2b232b0c85 Viewer2D: Update list of loaded node's outputs when they are en/dis-abled
When a node with viewable output attributes is loaded, the combo box  of
the 2D Viewer lists these attributes. As some of these attributes are
enabled or disabled, they need to be added or removed from that list,
without needing to load another node first, or to unload the node.

This commit connects the signal that is emitted when an output attribute
with a viewable output is enabled or disabled to the slot that reloads
the currently loaded node (and thus updates the list).
2023-06-09 14:22:59 +02:00
Fabien Castan
25c12bbc51
[core] Node: hasInternalAttribute does not support groups and lists
hasInternalAttribute() should not support more cases than internalAttribute()
2023-02-22 12:04:00 +01:00
Candice Bentéjac
311ab9cb40 [core] Add a property to ignore an attribute during the UID computation
By default, an attribute that belongs to the UID group 0 is taken into
the node's UID computation independently from its value, as long as it is
enabled.

When such an attribute is added to a node's list of attributes, it
automatically invalidates all computations made for this node prior to
its addition.

This commits adds a new attribute property, "uidIgnoreValue". This property
determines whether the attribute must be taken into consideration during
the node's UID computation: if the value of the attribute is the same as
"uidIgnoreValue", then it should be ignored; otherwise, it should be taken
into account. By default, "uidIgnoreValue" is set to "None", meaning that
any attribute that may be considered during the UID computation will be
taken into account.

In the context of the internal attributes, "uidIgnoreValue" is set to empty
string, so the "invalidation" attribute will not automatically
invalidate 100% of the nodes from existing graphs until its value is set
to a non-empty string.
2023-02-17 15:34:39 +01:00
Candice Bentéjac
4b7a548687 Notify changes in internal attributes' properties
The "label", "color" and "comment" properties are not constant anymore,
their changes in value are notified with the internalAttributesChanged()
signal, like the "invalidation" property.

This implies that the connection on "internalAttributesChanged" on the
QML side is not needed anymore.
2023-02-15 08:36:16 +00:00
Candice Bentéjac
492e4d5dd0 [core] Add property for the invalidation message from internal attributes 2023-02-15 08:36:15 +00:00
Candice Bentéjac
7688b94ce5 [core] Raise compatibility issue if nodes miss invalidating internal attributes 2023-02-15 08:36:14 +00:00
Candice Bentéjac
3689c12e9c [core] Check existence of group or list attributes correctly
"hasAttribute" was previously never called before attempting to
access an attribute. With the addition of internal attributes, we
want to check the attribute's/internal attribute's before accessing
it to avoid KeyError exceptions. "hasAttribute" (and the newly added
"hasInternalAttribute") would not parse the attribute's name before
checking for its existence, meaning that errors could be generated for
list or group attributes as their checked name could contain other
elements (e.g. "featuresFolder[0]" for a ListAttribute named
"featuresFolder").
2023-02-15 08:36:13 +00:00
Candice Bentéjac
1015ea448a [ui] Add an icon and tooltip on a node's header if it has a comment
If the "Comments" internal attribute is filled, add a corresponding
icon in the node's header, as well as a tooltip that contains the
comment.
2023-02-15 08:36:13 +00:00
Candice Bentéjac
b645db99f7 [core] Include internal attributes in the UIDs computation 2023-02-15 08:36:12 +00:00
Candice Bentéjac
930af07966 [core] Correctly load internalAttributes in compatibility mode 2023-02-15 08:36:11 +00:00
Candice Bentéjac
21d01acc9a Add "color" as an internal attribute
Setting this attribute allows the user to change the color
of a node, either by directly providing an SVG color name or an
hexadecimal color code, or by picking a color with the selector.
2023-02-15 08:36:11 +00:00