Revert "Fix ViewportPreview upside-down in 3.x."

This reverts commit 1426df66a8.

(cherry picked from commit aeb9925615)
This commit is contained in:
Haoyu Qiu 2022-02-04 13:54:47 +08:00 committed by Rémi Verschelde
parent 269c585f08
commit eb9a847566
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 0 additions and 2 deletions

View File

@ -38,8 +38,6 @@ void EditorInspectorPluginViewportPreview::parse_begin(Object *p_object) {
Viewport *viewport = Object::cast_to<Viewport>(p_object);
TexturePreview *viewport_preview = memnew(TexturePreview(viewport->get_texture(), false));
viewport_preview->get_texture_display()->set_flip_v(true); // flip as ViewportTexture in 3.x is upside-down.
// Otherwise `viewport_preview`'s `texture_display` doesn't update properly when `viewport`'s size changes.
viewport->connect("size_changed", viewport_preview->get_texture_display(), "update");
add_custom_control(viewport_preview);