Godot 4.7.1 - Errors with Grouped and Nested StateMachines
bugtopic:editorconfirmedregressiontopic:animation
### Tested versions
Tested in 4.7.1
### System information
Windows 11, Godot 4.7.1
### Issue description
**Nested StateMachine using Spritesheets with different Textures/Frame-Layout:**
- Reproducable in MRP Scene "nested.tscn".
- FROM-animation using spritesheet with 10 frames in root (starting at frame 0)
- TO-animation using spritesheet with 100 frames in nested (starting at frame 20)
- when transitioning from root -> nested, throws error:
`scene/2d/sprite_2d.cpp:299 - Index p_frame = 20 is out of bounds (vframes * hframes = 10).`
- both FROM- and TO-animation sets up hframes, vframes and texture at time 0
This worked without issues when not using a Nested StateMachines. Using one however seems to fail to properly initialize that first played animation.
**Grouped StateMachine not able to reach End-State:**
- Reproducable in MRP Scene "grouped.tscn"
- When using a grouped StateMachine, it seems impossible to reach the End-State when the out-transitions Switch Mode from that Grouped StateMachine is set to "At End"
- State just before "End" gets stuck with continuous error: `scene/animation/animation_node_state_machine.cpp:1135 - Condition "p_instance.resource != state_machine" is true. Returning: false`
### Steps to reproduce
_Steps to Reproduce Nested_
- open attached MRP
- open nested.tscn
- select AnimationTree
- (make sure AnimationTree is set to "Active")
- play "10x1_sprites_starts_at_0" in AnimationTree Dock
- see errors in Output Dock
_Steps to Reproduce Grouped_
- open attached MRP
- open grouped.tscn
- select AnimationTree
- (make sure AnimationTree is set to "Active")
- enter Grouped StateMachine within AnimationTree Dock
- play "new_animation_3"
- see errors in Output Dock
### Minimal reproduction project (MRP)
MRP: [StateMachine_Errors.zip](https://github.com/user-attachments/files/31065913/StateMachine_Errors.zip)
5 条评论