Skip to content

[core] Fix dynamic attributes on loading file#3044

Draft
Alxiice wants to merge 1 commit intodevelopfrom
bugfix/loading_file_dynamic_attr
Draft

[core] Fix dynamic attributes on loading file#3044
Alxiice wants to merge 1 commit intodevelopfrom
bugfix/loading_file_dynamic_attr

Conversation

@Alxiice
Copy link
Copy Markdown
Contributor

@Alxiice Alxiice commented Mar 16, 2026

Description

The bug I got happened on the specific situation where we have :

class NodeA(desc.Node):
    outputs = [
        desc.File(
            name="out",
            label="Output",
            value=None,
        ),
    ]
    
    def process(self, node):
        node.output._setValue(str("my_file"))


class NodeB(desc.Node):
    inputs = [
        desc.File(
            name="in",
            label="a file",
            value="",
        ),
    ]
    
    outputs = [
        desc.File(
            name="out",
            label="Out",
            value="{node.in.value}",
            # or value=lambda node: str(node.in.value),

        ),
    ]

And then NodeA.out -> NodeB.in

In this case what seems to happen is :

  1. We launch meshroom and create the scene with NodeA.out -> NodeB.in.
  2. NodeA.out is set to None and NodeB.in & NodeB.out is evaluated to None
  3. We launch the NodeA process and therefore NodeA.out is filled, then NodeB.in and NodeB.out are filled too
  4. We close meshroom and reopen the same scene
  5. The param values are computed : "{node.scene.value}" is set to None at first because we haven't computed the upstream value yet
  6. NodeA.out value is loaded from the scene, NodeB.in is correctly set but NodeB.out is not correctly updated

Proposed fix

With this PR we force an update from internal params and output params after loading the scene. Loading internal params is enough for the bug I encountered but maybe we also need updateOutputAttr too.

Maybe there are better ways to do it if any reviewer have an idea let me know

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@Alxiice
Copy link
Copy Markdown
Contributor Author

Alxiice commented Mar 20, 2026

Just a small review : after discussing with @fcastan he exposed that it might lower graph performances, so we will keep this as draft for now

@Alxiice Alxiice marked this pull request as draft March 20, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant