-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EditorUndoRedoManager
is polluting scene history.
#37
Comments
Not sure how Would be nice to have a separate history object for each PS: I tried passing |
So I tried to use While looking through the godot editor code, I didn't find a way to create a custom history object and associate it with a BT resource. There are some methods to create history objects, but they are not exposed in the API - so they won't work with GDExtension. And editor UI also doesn't seem to support custom histories. I was contemplating the idea of creating a custom pool of |
Honestly, I don't quite recall the exact usage I had in mind since I lost the changes where I had a rough implementation. I went through the patch you have and it looks close to what I had in mind.
I keep thinking it can support separate histories for each I suppose what I saw back when I opened the ticket was along the lines of:
I'm not entirely sure how this would play out in the History tab, but I hope this helps a bit. |
I was thinking along those lines, but in practice I had several issues.
|
For the future reference, here are a few facts I established while digging through code:
I'm not 100% sure, but it seems to me that editor currently only tracks global and per-scene histories. You can create a history object with arbitrary ID, and use it to register actions, but it's unlikely to show in the History tab, and some of those methods are not exposed - so you can't use them in GDExtension. |
Under certain scenarios the usage of
EditorUndoRedoManager
in the LimboAI Editor plugin will pollute the scene history when it shouldn't -- for example when creating a newBehaviorTree
and adding tasks to it while on an empty scene.This will make will make undo/redo operations error out from time to time and not work as expected sometimes.
Since
EditorUndoRedoManager
is not able to automatically track parent/child relationships ofResource
objects (which includeBTTask
), we need a way to force it to use a specific undo/redo history in order to properly manage undo/redo operations in the Editor.Once the following patch is merged upstream, the LimboAI Editor undo/redo operations can be properly fixed.
The text was updated successfully, but these errors were encountered: