Commit 4cc8155
authored
Graph editor viewer UI token support (AcademySoftwareFoundation#2605)
This PR adds fallback token resolution logic to the Graph Editor and Viewer to display available tokens and their source in the UI.
For the Graph Editor, if the current element has no tokens, it will check the nodegraph, then the nodedef. For the Viewer, if a material has no tokens, it traverses upstream nodes and their definitions to collect tokens from nodedefs and nodegraphs.
This handles the cases outlined within the [token_graph.mtlx](https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/resources/Materials/TestSuite/stdlib/texture/token_graph.mtlx) and the [token_graph_material.mtlx](https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/resources/Materials/TestSuite/stdlib/texture/token_graph_material.mtlx) test cases.
Fixes #[AcademySoftwareFoundation#2611](AcademySoftwareFoundation#2611)1 parent 6a09534 commit 4cc8155
3 files changed
Lines changed: 69 additions & 1 deletion
File tree
- resources/Materials/TestSuite/stdlib/texture
- source
- MaterialXGraphEditor
- MaterialXView
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3705 | 3705 | | |
3706 | 3706 | | |
3707 | 3707 | | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
| 3716 | + | |
| 3717 | + | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
3708 | 3746 | | |
3709 | 3747 | | |
3710 | 3748 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
714 | 744 | | |
715 | 745 | | |
716 | 746 | | |
| |||
0 commit comments