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

Declare metadatas in Sdr registry #1350

Merged
merged 3 commits into from
Nov 22, 2022
Merged

Conversation

sebastienblor
Copy link
Collaborator

@sebastienblor sebastienblor commented Nov 14, 2022

Changes proposed in this pull request
This PR declares some arnold metadatas as Sdr info in the registry.
The list of supported metadatas are the following one
USD builtin metadatas :

  • page : gives the UI group to put this attribute under. It's based on the arnold metadata "ui.groups"
  • label : UI label of the parameter. Based on arnold attr metadata "label"
  • help : description of the parameter. Based on existing "desc" arnold metadata
  • connectable : whether this parameter is connectable or not. Based on existing "linkable" metadata. Note that in Arnold it defaults to true, so it won't be set for a lot of parameters that are actually connectable. To be verified if this is similar in USD or if we should always declare it
  • role (returns the shader classification/category)

Custom metadatas (declared as "hints")

  • uimin : based on arnold "min" metadata
  • uimax : based on arnold "max" metadata
  • uisoftmin : based on arnold "softmin" metadata
  • uisoftmax : based on arnold "softmax" metadata

Enums:
enum attributes now declare all the allowed enum values in the "options" field

Issues fixed in this pull request
Fixes #55

@sebastienblor sebastienblor marked this pull request as draft November 14, 2022 17:47
@sebastienblor sebastienblor marked this pull request as ready for review November 19, 2022 20:05
@sebastienblor sebastienblor self-assigned this Nov 19, 2022
@sebastienblor sebastienblor added enhancement New feature or request ndr Related to USD Node or Shader Registry labels Nov 19, 2022
cpichard
cpichard previously approved these changes Nov 22, 2022
ndr/parser.cpp Outdated
NdrTokenMap metadata;
NdrTokenMap hints;

// For enum attributres, all enum fields should be set as "options"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo attributres -> attributes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ndr Related to USD Node or Shader Registry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle metadata in the Ndr plugin and store arnold specific metadata
2 participants