Merge pull request #57613 from timothyqiu/viewport-preview
[3.x] Revert "Fix ViewportPreview upside-down in 3.x."
This commit is contained in:
commit
7ca4eb478e
1 changed files with 0 additions and 2 deletions
|
@ -38,8 +38,6 @@ void EditorInspectorPluginViewportPreview::parse_begin(Object *p_object) {
|
||||||
Viewport *viewport = Object::cast_to<Viewport>(p_object);
|
Viewport *viewport = Object::cast_to<Viewport>(p_object);
|
||||||
|
|
||||||
TexturePreview *viewport_preview = memnew(TexturePreview(viewport->get_texture(), false));
|
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.
|
// 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");
|
viewport->connect("size_changed", viewport_preview->get_texture_display(), "update");
|
||||||
add_custom_control(viewport_preview);
|
add_custom_control(viewport_preview);
|
||||||
|
|
Loading…
Reference in a new issue