Merge pull request #21007 from guilhermefelipecgs/disable_camera_interpolation

Disable camera interpolation when switching scene tabs
This commit is contained in:
Rémi Verschelde 2018-08-15 09:03:53 +02:00 committed by GitHub
commit e92777c1ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -2081,6 +2081,15 @@ void SpatialEditorViewport::set_message(String p_message, float p_time) {
message_time = p_time;
}
void SpatialEditorPlugin::edited_scene_changed() {
for (int i = 0; i < SpatialEditor::VIEWPORTS_COUNT; i++) {
SpatialEditorViewport *viewport = SpatialEditor::get_singleton()->get_editor_viewport(i);
if (viewport->is_visible()) {
viewport->notification(Control::NOTIFICATION_VISIBILITY_CHANGED);
}
}
}
void SpatialEditorViewport::_notification(int p_what) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {

View File

@ -741,6 +741,8 @@ public:
virtual void set_state(const Dictionary &p_state);
virtual void clear() { spatial_editor->clear(); }
virtual void edited_scene_changed();
SpatialEditorPlugin(EditorNode *p_node);
~SpatialEditorPlugin();
};