summaryrefslogtreecommitdiff
path: root/editor/animation_track_editor_plugins.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/animation_track_editor_plugins.cpp')
-rw-r--r--editor/animation_track_editor_plugins.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 7effe114ca..ea0d7511fe 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -33,8 +33,8 @@
#include "editor/audio_stream_preview.h"
#include "editor_resource_preview.h"
#include "editor_scale.h"
-#include "scene/2d/animated_sprite.h"
-#include "scene/2d/sprite.h"
+#include "scene/2d/animated_sprite_2d.h"
+#include "scene/2d/sprite_2d.h"
#include "scene/3d/sprite_3d.h"
#include "scene/animation/animation_player.h"
#include "servers/audio/audio_stream.h"
@@ -357,7 +357,7 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se
Size2 size;
- if (Object::cast_to<Sprite>(object) || Object::cast_to<Sprite3D>(object)) {
+ if (Object::cast_to<Sprite2D>(object) || Object::cast_to<Sprite3D>(object)) {
Ref<Texture2D> texture = object->call("get_texture");
if (!texture.is_valid()) {
@@ -379,7 +379,7 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se
if (vframes > 1) {
size.y /= vframes;
}
- } else if (Object::cast_to<AnimatedSprite>(object) || Object::cast_to<AnimatedSprite3D>(object)) {
+ } else if (Object::cast_to<AnimatedSprite2D>(object) || Object::cast_to<AnimatedSprite3D>(object)) {
Ref<SpriteFrames> sf = object->call("get_sprite_frames");
if (sf.is_null()) {
@@ -436,7 +436,7 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
Ref<Texture2D> texture;
Rect2 region;
- if (Object::cast_to<Sprite>(object) || Object::cast_to<Sprite3D>(object)) {
+ if (Object::cast_to<Sprite2D>(object) || Object::cast_to<Sprite3D>(object)) {
texture = object->call("get_texture");
if (!texture.is_valid()) {
@@ -473,7 +473,7 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
region.position.x += region.size.x * coords.x;
region.position.y += region.size.y * coords.y;
- } else if (Object::cast_to<AnimatedSprite>(object) || Object::cast_to<AnimatedSprite3D>(object)) {
+ } else if (Object::cast_to<AnimatedSprite2D>(object) || Object::cast_to<AnimatedSprite3D>(object)) {
Ref<SpriteFrames> sf = object->call("get_sprite_frames");
if (sf.is_null()) {
@@ -1300,14 +1300,14 @@ AnimationTrackEdit *AnimationTrackEditDefaultPlugin::create_value_track_edit(Obj
return audio;
}
- if (p_property == "frame" && (p_object->is_class("Sprite") || p_object->is_class("Sprite3D") || p_object->is_class("AnimatedSprite") || p_object->is_class("AnimatedSprite3D"))) {
+ if (p_property == "frame" && (p_object->is_class("Sprite2D") || p_object->is_class("Sprite3D") || p_object->is_class("AnimatedSprite2D") || p_object->is_class("AnimatedSprite3D"))) {
AnimationTrackEditSpriteFrame *sprite = memnew(AnimationTrackEditSpriteFrame);
sprite->set_node(p_object);
return sprite;
}
- if (p_property == "frame_coords" && (p_object->is_class("Sprite") || p_object->is_class("Sprite3D"))) {
+ if (p_property == "frame_coords" && (p_object->is_class("Sprite2D") || p_object->is_class("Sprite3D"))) {
AnimationTrackEditSpriteFrame *sprite = memnew(AnimationTrackEditSpriteFrame);
sprite->set_as_coords();