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

Add API to allow input reordering on node graphs #2116

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kwokcb
Copy link
Contributor

@kwokcb kwokcb commented Nov 15, 2024

Workflow Motivation

In order for users to specify interface ordering for node graphs they need to re-order the storage order of child inputs. Additionally, when creating new definitions (nodedef) they may which to specify the ordering of child inputs as part of definition publishing.

Proposal

Provide a simple atomic API to allow for inputs on node graphs to be re-ordered without affecting non-input child ordering.
The proposed API name is: NodeGraph::setInputOrdering() where a list all input names specifies the desired ordering.

@meshula
Copy link

meshula commented Nov 16, 2024

Would this need some work on the usd side to capture the ordering somewhere? Perhaps UsdUI or something?

@kwokcb
Copy link
Contributor Author

kwokcb commented Nov 17, 2024

Hi @meshula,
This doesn't add any additional metadata to specify the UI ordering. It's just a way to re-order inputs on a nodegraph.

Does USD already have separate specifiers for UI ordering (e.g. is this this stacking order in UsdUITokenType ?
I'm guessing from your comment it does not, but If it does then it might be worthwhile to look at the equivalent support for MaterialX as a related but separate change.

@meshula
Copy link

meshula commented Nov 17, 2024

Stacking order relates to the screen depth of nodes (this node should appear over that node if they overlap).

Reading the mx code, I see that childOrder is not a user imposed reordering of the nodes, but rather encodes a construction order. Since hdMtlx iterates that list, there's no reordering hints necessary at that end as order is implicit in that loop.

✅ #does-it-usd

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.

2 participants