godot icon indicating copy to clipboard operation
godot copied to clipboard

Moving a group of AnimationTree graph nodes creates multiple undo entries

Open rcorre opened this issue 3 years ago • 1 comments

Godot version

v4.0.alpha.custom_build [8243c7ab5]

System information

Linux 5.18.14-arch1-1

Issue description

When drag-selecting a group of nodes in an AnimationTree graph and moving them, pressing undo (ctrl+z) un-does each move individually.

Steps to reproduce

  1. Add a AnimationTree
  2. Set the root node to a AnimationNodeBlendTree
  3. Add several nodes of any kind
  4. Click and drag to select several nodes
  5. Drag the nodes to a new location
  6. Press ctrl+z

Note that ctrl+z moves only one node back to its original position.

I noticed this with the VoxelGraph node in https://github.com/Zylann/godot_voxel as well. However, I can't repro with the VisualShader graph.

Minimal reproduction project

No response

rcorre avatar Aug 06 '22 13:08 rcorre

Looks like this has to be implemented on per-graph basis: https://github.com/godotengine/godot/blob/8243c7ab5df9d341209d339ab001fd8e49ee95b3/editor/plugins/animation_blend_tree_editor_plugin.cpp#L392-L401

rcorre avatar Aug 06 '22 13:08 rcorre