Godot: AnimationPlayer: cannot insert key for Rect2 properties (like rect2.x)

Created on 25 Mar 2019  路  5Comments  路  Source: godotengine/godot

Godot version:
3.1 stable

OS/device including version:
Ubuntu 18.04

Issue description:
Trying to insert a key for a rect property like Sprite:region_rect:x throws an error in output and no key is added, this break the possibility of making animated regions by axis.
The error is:

core/undo_redo.cpp:291 - Error calling method from signal 'track_insert_key': 'Animation::track_insert_key': Method expected 3 arguments, but called with 2.

Is possible that more built in types are affected by this bug.
This works fine on 3.0.x and there are no issues with Vector2 for example.

Steps to reproduce:
Try to animate region_rect:x on a sprite (not the full rect).

archived editor

Most helpful comment

All 5 comments

What should it be initialized to?

Like the rest, current value I guess? If it cannot be retrieved, a Rect(0,0,0,0) would be fine.

I think you should be animating region_rect:position:x, since Rect2 has no member named x.

God(ot)s, I'm dumb :sweat_smile:

Thanks @bojidar-bg !

ps: I guess the player should be more clear when adding a broken property, but this is solved then.

Was this page helpful?
0 / 5 - 0 ratings