Skip to content

Add GraphState to Graph Editor#2762

Merged
jstone-lucasfilm merged 3 commits intoAcademySoftwareFoundation:mainfrom
jstone-lucasfilm:dev_graph_state
Jan 31, 2026
Merged

Add GraphState to Graph Editor#2762
jstone-lucasfilm merged 3 commits intoAcademySoftwareFoundation:mainfrom
jstone-lucasfilm:dev_graph_state

Conversation

@jstone-lucasfilm
Copy link
Member

@jstone-lucasfilm jstone-lucasfilm commented Jan 29, 2026

This changelist introduces a GraphState struct to encapsulate the UI state for a graph level in the MaterialX Graph Editor. The following improvements are included:

  • Consolidate all variables for the UI state of a single graph level into a GraphState struct.
  • Simplify nodegraph navigation by merging parallel stacks into a single _parentStates vector.
  • Split the _initial flag into _needsLayout and _needsNavigation for clarity.
  • Fix edge cases in UiPin::deleteConnection, where a loop break and reset of the _connected flag were needed for completeness.

This changelist introduces a `GraphState` struct to encapsulate the UI state for a graph level in the MaterialX Graph Editor.  The following are some of the key improvements included in this change:

- Consolidate scattered variables for the UI state of a graph level into a single `GraphState` struct.
- Simplify nodegraph navigation by merging parallel stacks into a single `_parentStates` vector.
- Split the `_initial` flag into `_needsLayout` and `_needsNavigation` for clarity.
- Fix a subtle bug in `UiPin::deleteConnection`, where a loop break and reset of the `_connected` flag were missing.
Copy link
Contributor

@lfl-eholthouser lfl-eholthouser left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks @jstone-lucasfilm!

@jstone-lucasfilm jstone-lucasfilm merged commit 9b1e277 into AcademySoftwareFoundation:main Jan 31, 2026
33 checks passed
@jstone-lucasfilm jstone-lucasfilm deleted the dev_graph_state branch January 31, 2026 01:12
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