summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/animation_cache.cpp4
-rw-r--r--scene/animation/animation_cache.h2
-rw-r--r--scene/animation/animation_player.cpp2
-rw-r--r--scene/animation/animation_tree.cpp6
-rw-r--r--scene/animation/animation_tree.h4
-rw-r--r--scene/animation/root_motion_view.cpp4
-rw-r--r--scene/animation/root_motion_view.h2
-rw-r--r--scene/animation/tween.cpp12
8 files changed, 18 insertions, 18 deletions
diff --git a/scene/animation/animation_cache.cpp b/scene/animation/animation_cache.cpp
index 689acdd57b..0fe096b7cb 100644
--- a/scene/animation/animation_cache.cpp
+++ b/scene/animation/animation_cache.cpp
@@ -167,7 +167,7 @@ void AnimationCache::_update_cache() {
cache_valid = true;
}
-void AnimationCache::set_track_transform(int p_idx, const Transform &p_transform) {
+void AnimationCache::set_track_transform(int p_idx, const Transform3D &p_transform) {
if (cache_dirty) {
_update_cache();
}
@@ -235,7 +235,7 @@ void AnimationCache::set_all(float p_time, float p_delta) {
Vector3 loc, scale;
Quat rot;
animation->transform_track_interpolate(i, p_time, &loc, &rot, &scale);
- Transform tr(Basis(rot), loc);
+ Transform3D tr(Basis(rot), loc);
tr.basis.scale(scale);
set_track_transform(i, tr);
diff --git a/scene/animation/animation_cache.h b/scene/animation/animation_cache.h
index 07c9d09ae0..7b073b4fa9 100644
--- a/scene/animation/animation_cache.h
+++ b/scene/animation/animation_cache.h
@@ -67,7 +67,7 @@ protected:
static void _bind_methods();
public:
- void set_track_transform(int p_idx, const Transform &p_transform);
+ void set_track_transform(int p_idx, const Transform3D &p_transform);
void set_track_value(int p_idx, const Variant &p_value);
void call_track(int p_idx, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 0c1798a876..e733cc930f 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -838,7 +838,7 @@ void AnimationPlayer::_animation_process2(float p_delta, bool p_started) {
void AnimationPlayer::_animation_update_transforms() {
{
- Transform t;
+ Transform3D t;
for (int i = 0; i < cache_update_size; i++) {
TrackNodeCache *nc = cache_update[i];
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 2ad871ba61..e51448bac8 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -718,7 +718,7 @@ void AnimationTree::_process_graph(float p_delta) {
//check all tracks, see if they need modification
- root_motion_transform = Transform();
+ root_motion_transform = Transform3D();
if (!root.is_valid()) {
ERR_PRINT("AnimationTree: root AnimationNode is not set, disabling playback.");
@@ -1191,7 +1191,7 @@ void AnimationTree::_process_graph(float p_delta) {
case Animation::TYPE_TRANSFORM: {
TrackCacheTransform *t = static_cast<TrackCacheTransform *>(track);
- Transform xform;
+ Transform3D xform;
xform.origin = t->loc;
xform.basis.set_quat_scale(t->rot, t->scale);
@@ -1311,7 +1311,7 @@ NodePath AnimationTree::get_root_motion_track() const {
return root_motion_track;
}
-Transform AnimationTree::get_root_motion_transform() const {
+Transform3D AnimationTree::get_root_motion_transform() const {
return root_motion_transform;
}
diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h
index 700ff1cb5b..93b5b01ecd 100644
--- a/scene/animation/animation_tree.h
+++ b/scene/animation/animation_tree.h
@@ -257,7 +257,7 @@ private:
bool started = true;
NodePath root_motion_track;
- Transform root_motion_transform;
+ Transform3D root_motion_transform;
friend class AnimationNode;
bool properties_dirty = true;
@@ -308,7 +308,7 @@ public:
void set_root_motion_track(const NodePath &p_track);
NodePath get_root_motion_track() const;
- Transform get_root_motion_transform() const;
+ Transform3D get_root_motion_transform() const;
float get_connection_activity(const StringName &p_path, int p_connection) const;
void advance(float p_time);
diff --git a/scene/animation/root_motion_view.cpp b/scene/animation/root_motion_view.cpp
index 9ee1f32581..b963cf5702 100644
--- a/scene/animation/root_motion_view.cpp
+++ b/scene/animation/root_motion_view.cpp
@@ -82,7 +82,7 @@ void RootMotionView::_notification(int p_what) {
}
if (p_what == NOTIFICATION_INTERNAL_PROCESS || p_what == NOTIFICATION_INTERNAL_PHYSICS_PROCESS) {
- Transform transform;
+ Transform3D transform;
if (has_node(path)) {
Node *node = get_node(path);
@@ -103,7 +103,7 @@ void RootMotionView::_notification(int p_what) {
}
}
- if (!first && transform == Transform()) {
+ if (!first && transform == Transform3D()) {
return;
}
diff --git a/scene/animation/root_motion_view.h b/scene/animation/root_motion_view.h
index afcff6137f..4cd3c7b443 100644
--- a/scene/animation/root_motion_view.h
+++ b/scene/animation/root_motion_view.h
@@ -46,7 +46,7 @@ public:
bool first = true;
bool zero_y = true;
- Transform accumulated;
+ Transform3D accumulated;
private:
void _notification(int p_what);
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index 2030808724..5e843d3027 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -573,9 +573,9 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
case Variant::TRANSFORM: {
// Get the transforms for the initial and delta values
- Transform i = initial_val;
- Transform d = delta_val;
- Transform r;
+ Transform3D i = initial_val;
+ Transform3D d = delta_val;
+ Transform3D r;
// Execute the equation for each of the transforms and their origin and mutate the r transform
// This uses the custom APPLY_EQUATION macro defined above
@@ -1231,9 +1231,9 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final
case Variant::TRANSFORM: {
// Build a new transform which is the difference between the initial and final values
- Transform i = initial_val;
- Transform f = final_val;
- Transform d;
+ Transform3D i = initial_val;
+ Transform3D f = final_val;
+ Transform3D d;
d.set(f.basis.elements[0][0] - i.basis.elements[0][0],
f.basis.elements[0][1] - i.basis.elements[0][1],
f.basis.elements[0][2] - i.basis.elements[0][2],