EditorUndoRedoManager.create_action() needs more context #10043
Labels
area:class reference
Issues and PRs about the class reference, which should be addressed on the Godot engine repository
bug
Your Godot version:
4.2.2, 4.3
URL to the documentation page:
https://docs.godotengine.org/en/stable/classes/class_editorundoredomanager.html#class-editorundoredomanager-method-create-action
Issue description:
EditorUndoRedoManager.create_action() defines a custom_context parameter and states only this information:
If custom_context object is provided, it will be used for deducing target history (instead of using the first operation).
@KoBeWi here provides further explanation that should be added.
godotengine/godot-proposals#2153 (comment)
The documentation should be expanded with this additional information, which we were able to use in order to link Terrain3D to all of our EditorUndoRedoManager actions which now mark the scene as unsaved without having to implement
_get_unsaved_status()
. TokisanGames/Terrain3D#508However note that the above seems contradictory and should be verified for accuracy:
** I think this might be the opposite. We linked Terrain3D to our actions, the history is white, an undo action now causes our scenes to be dirty. Before this link, our custom_context was null, our history was still white, but the scenes were not marked as dirty.
The text was updated successfully, but these errors were encountered: