Skip to content

Comments

Layout improvements to Graph Editor#2775

Open
jstone-lucasfilm wants to merge 6 commits intoAcademySoftwareFoundation:mainfrom
jstone-lucasfilm:dev_graph_layout
Open

Layout improvements to Graph Editor#2775
jstone-lucasfilm wants to merge 6 commits intoAcademySoftwareFoundation:mainfrom
jstone-lucasfilm:dev_graph_layout

Conversation

@jstone-lucasfilm
Copy link
Member

This changelist improves the Layout engine in the Graph Editor, organizing its logic into a new Layout class, and aligning its approach with the Sugiyama layered graph drawing algorithm (https://en.wikipedia.org/wiki/Layered_graph_drawing).

Additionally, layout is now performed over two frames, allowing the true rendered dimensions of each node to be used in final node placement.

Two specific issues addressed by this changelist are #1414 and #2432.

This changelist improves the Layout engine in the Graph Editor, organizing its logic into a new Layout class, and aligning its approach with the Sugiyama layered graph drawing algorithm (https://en.wikipedia.org/wiki/Layered_graph_drawing).

Additionally, layout is now performed over two frames, allowing the true rendered dimensions of each node to be used in final node placement.

Two specific issues addressed by this changelist are AcademySoftwareFoundation#1414 and AcademySoftwareFoundation#2432.
@jstone-lucasfilm
Copy link
Member Author

In order to provide some visual intuition for the new layout behavior, here are a few typical examples:

Marble Example Nodegraph:
GraphEditor_MarbleNodegraph

Standard Surface Nodegraph (close-up of coat computation):
GraphEditor_StandardSurfaceCoat

OpenPBR Nodegraph (close-up of coat computation):
GraphEditor_OpenPbrCoat

- Add UI toggles for individual algorithm phases, allowing developers to understand their impact on the layout.
- Use the term "virtual" instead of "dummy", for better alignment with the original Sugiyama approach.
- Simplify structures and method interfaces for clarity.
- Apply const correctness improvements to loops.
- Move method comments from Layout.cpp to Layout.h, providing a better developer overview of the class.
- Add a sortByBarycenter method for clarity.
- Make better use of range-based-for loops in the code.
This changelist removes legacy variables and methods that are no longer referenced by the new layout engine.
This changelist reorders the methods of the Layout class by their place in the layout algorithm, making the flow of the code clearer to a new developer.
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 and it's a really exciting change. Thanks @jstone-lucasfilm!

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