Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interfacename connection setting #58

Merged

Conversation

kwokcb
Copy link
Contributor

@kwokcb kwokcb commented Apr 4, 2024

Interface Connection Setting

Fixes #59

This change fixes the issue of creating both an interfacename connection and also setting a value on an input
when serizliating the input on a node in a graph. Only one should be specified to be valid.

e.g. Currently you get this for example which is invalid for "in`" on the "Add" node:

<nodegraph name="Nodegraph" xpos="-1.7653979153374229" ypos="3.8192409855171383">
    <add name="Add" type="float" xpos="3.9042865959028106" ypos="2.7340644554414775">
      <input name="in1" type="float" interfacename="in_Add" value="0" />
      <input name="in2" type="float" value="0" />
    </add>
    <output name="out_Add" type="float" nodename="Add" />
    <input name="in_Add" type="float" value="0" />
  </nodegraph>

This fix remove the value attribute to get this instead

<nodegraph name="Nodegraph" xpos="-1.7653979153374229" ypos="3.8192409855171383">
    <add name="Add" type="float" xpos="3.9042865959028106" ypos="2.7340644554414775">
      <input name="in1" type="float" interfacename="in_Add" />
      <input name="in2" type="float" value="0" />
    </add>
    <output name="out_Add" type="float" nodename="Add" />
    <input name="in_Add" type="float" value="0" />
  </nodegraph>

Note that nodename and nodegraph settings are okay since the Python calls being made explicitly
remove the value attribute for you.

@manuelkoester
Copy link
Member

Perfect, thank you Bernard!

@manuelkoester manuelkoester merged commit 6f49742 into PrismPipeline:main Apr 20, 2024
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.

Writing of interfacename connections produces invalid MaterialX
2 participants