Skip to content

Solution (#2366): Graph Editor: Add UI support for enumerated values#3006

Open
TFGSUMIT wants to merge 3 commits into
AcademySoftwareFoundation:mainfrom
TFGSUMIT:fix/issue-2366
Open

Solution (#2366): Graph Editor: Add UI support for enumerated values#3006
TFGSUMIT wants to merge 3 commits into
AcademySoftwareFoundation:mainfrom
TFGSUMIT:fix/issue-2366

Conversation

@TFGSUMIT

Copy link
Copy Markdown

This pull request adds UI support for enumerated values in the Graph Editor. It introduces a dropdown menu that displays enumerated values fetched from the /spec/definitions endpoint.

Changes:

  • Added DropdownHelper class to fetch enumerated values and create dropdown menu options.
  • Added DropHandling class to handle dropdown menu events.
  • Updated Viewer class to initialize the dropdown menu and load enumerated values.
  • Updated the Graph Editor's UI to display the dropdown menu.

Testing instructions:

  1. Run the Graph Editor and navigate to the Enumerated Values section.
  2. Select an enumerated value from the dropdown menu.
  3. Verify that the shader generation system updates correctly.
  4. Test the feature by selecting different enumerated values and verifying that the shader generation system updates correctly.

Note: This implementation assumes that the fetch API is available in the browser. If you are using a Node.js environment, you may need to use a different approach to fetch the enumerated values.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 14, 2026

Copy link
Copy Markdown

CLA Missing ID

@kwokcb

kwokcb commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Hi @TFGSUMIT,
Thanks for taking a look into this.

Before continuing, can you elaborate on the need for a custom dropdown handler as:

  1. lil-gui has support for this built in.
  2. Users should never be allowed to dynamically add enumerations to inputs.

BTW, a change in enumerated string value will generally require a shader / material rebuild after setting it
on the MaterialX input.

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