summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/skeleton.cpp2
-rw-r--r--scene/main/viewport.cpp39
-rw-r--r--scene/main/viewport.h2
-rw-r--r--scene/resources/animation.cpp2
4 files changed, 39 insertions, 6 deletions
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp
index 0db2250a3a..8caf4e8e39 100644
--- a/scene/3d/skeleton.cpp
+++ b/scene/3d/skeleton.cpp
@@ -320,7 +320,7 @@ void Skeleton::_notification(int p_what) {
}
b.transform_final = b.pose_global * b.rest_global_inverse;
- vs->skeleton_bone_set_transform(skeleton, i, global_transform * (b.transform_final * global_transform_inverse));
+ vs->skeleton_bone_set_transform(skeleton, order[i], global_transform * (b.transform_final * global_transform_inverse));
for (List<uint32_t>::Element *E = b.nodes_bound.front(); E; E = E->next()) {
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 0633d194f7..8df007dcc7 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1533,6 +1533,35 @@ void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_inpu
//_unblock();
}
+void Viewport::_gui_call_notification(Control *p_control, int p_what) {
+
+ CanvasItem *ci = p_control;
+ while (ci) {
+
+ Control *control = Object::cast_to<Control>(ci);
+ if (control) {
+
+ if (control->data.mouse_filter != Control::MOUSE_FILTER_IGNORE) {
+ control->notification(p_what);
+ }
+
+ if (!control->is_inside_tree())
+ break;
+
+ if (!control->is_inside_tree() || control->is_set_as_toplevel())
+ break;
+ if (control->data.mouse_filter == Control::MOUSE_FILTER_STOP)
+ break;
+ }
+
+ if (ci->is_set_as_toplevel())
+ break;
+
+ ci = ci->get_parent_item();
+ }
+
+ //_unblock();
+}
Control *Viewport::_gui_find_control(const Point2 &p_global) {
_gui_prepare_subwindows();
@@ -1975,13 +2004,15 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (over != gui.mouse_over) {
- if (gui.mouse_over)
- gui.mouse_over->notification(Control::NOTIFICATION_MOUSE_EXIT);
+ if (gui.mouse_over) {
+ _gui_call_notification(gui.mouse_over, Control::NOTIFICATION_MOUSE_EXIT);
+ }
_gui_cancel_tooltip();
- if (over)
- over->notification(Control::NOTIFICATION_MOUSE_ENTER);
+ if (over) {
+ _gui_call_notification(over, Control::NOTIFICATION_MOUSE_ENTER);
+ }
}
gui.mouse_over = over;
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 0565fd3d18..cdb9d4afb5 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -305,6 +305,8 @@ private:
bool disable_input;
void _gui_call_input(Control *p_control, const Ref<InputEvent> &p_input);
+ void _gui_call_notification(Control *p_control, int p_what);
+
void _gui_prepare_subwindows();
void _gui_sort_subwindows();
void _gui_sort_roots();
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 383f3f5d4e..3156e12c50 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1815,7 +1815,7 @@ Variant Animation::value_track_interpolate(int p_track, float p_time) const {
bool ok = false;
- Variant res = _interpolate(vt->values, p_time, vt->update_mode == UPDATE_CONTINUOUS ? vt->interpolation : INTERPOLATION_NEAREST, vt->loop_wrap, &ok);
+ Variant res = _interpolate(vt->values, p_time, (vt->update_mode == UPDATE_CONTINUOUS || vt->update_mode == UPDATE_CAPTURE) ? vt->interpolation : INTERPOLATION_NEAREST, vt->loop_wrap, &ok);
if (ok) {