Implement GaeaGraph deep duplication and add duplicate button#431
Implement GaeaGraph deep duplication and add duplicate button#431BenjaTK merged 24 commits intogaea-godot:2.0from
Conversation
|
Current issue is that a pre-existing Gaea Graph (not made from duplication) is having all of it's connections cleared upon loading it in the scene. It's unclear why this occurs, it doesn't seem limited to this branch. |
|
I'll be adding a new test case for confirming that duplication is functioning properly independent of loading it to the scene. |
2981ff3 to
be47db7
Compare
|
Good chunk of solid changes are in. The duplicate button works as expected and is testable. Fixed a few issues with assigning a graph to a generator and not having the interface initialize properly, as well. Should be good to go unless y'all notice anything glaring. |
BenjaTK
left a comment
There was a problem hiding this comment.
Just a few changes, LGTM otherwise.
Still needs to be set up to properly duplicate collections
…licate and a file dialog to duplicate the graph.
… duplicate_test (just a copy of generate_test for now).
… when assigned to a generator.
…aved to it's resource file.
e9a5783 to
4a3399a
Compare
…. Instead _refresh gets called upon setting the generator property.
|
Do you still need my review on this one ? |
… Deleted assign_duplicate test (it was redundant).
Resolved. Added assertions to duplicate and assign_to_generator tests, then deleted the assign_duplicate test as it was redundant.
BenjaTK
left a comment
There was a problem hiding this comment.
LGTM, except for a few changes.
…ther kinds of duplication appear later.
|
Fixed the conflict, hope that's fine. |
|
Actually now that I realize I'm an idiot, I broke my own rule about rebasing lol. If you want you could reset hard to the previous commit and then rebase from there, if not then it's fine. |
…ctions and _node_data respectively
…/Cullumi-Gaea into GaeaData-Duplication-Fix
Ha, I think it'll be fine, this PR will get squashed anyway lol |
Deep Duplication
Fixes #429 , prerequisite for #425 (enables decoupling of demos and tests).
Motivation
It turns out Godot can't properly duplicate GaeaGraph resources, because deep duplication doesn't work on custom sub-resources. The end result is GaeaGraphs that have empty or broken resource lists.Update for Godot 4.5
Deep duplication of sub-resources is now possible. Regardless, it isn't directly supported in the context menu. Additionally, not every part of a GaeaGraph needs to be duplicated, only the parts that are saved to files:
_connections_node_data_parameterssave_versionSolution
As a solution, I've added a duplicate button to Gaea's panel, which triggers a custom
_duplicatemethod on the GaeaGraph class, then saves the copy made to some target file path.Also
This PR includes a number of other fixes and tests.
Fixes
Fixes in this PR include:
Tests
Added graph testing:
test_assign_to_generator- Assign a GaeaGraph to a GaeaGenerator, then run the generator.test_duplicate- Simply attempt to duplicate a GaeaGraph.test_assign_duplicate- Duplicate a GaeaGraph, assign it to a GaeaGenerator, then run the generator.