godot icon indicating copy to clipboard operation
godot copied to clipboard

3-to-4 project converter doesn't preserve viewport width and height

Open daveTheOldCoder opened this issue 2 years ago • 2 comments

Godot version

4.0.beta1

System information

Linux (Pop!_OS 20.04)

Issue description

3-to-4 project converter changes viewport width and height. I would expect them to remain the same.

Steps to reproduce

Create a new Godot 3.x project. I used Godot 3.5.1.rc1.

Change the width and height in the project settings to 1280x720 (Project >> Project Settings... >> General >> Display >> Window >> Size >> Width,Height).

The 3.x minimal reproduction project attached below already has this change.

Import the project in Godot 4.0.beta1 and select Convert Full Project.

Go to Project >> Project Settings... >> General >> Display >> Window >> Size and enable Advanced Settings.

The Width and Height values are preserved, but the Viewport Width and Viewport Height have different values: 1152 and 648, respectively.

Minimal reproduction project

project_converter_3_to_4-bug3.zip

daveTheOldCoder avatar Sep 19 '22 17:09 daveTheOldCoder

Not sure, but I recall the view rect was flipped, maybe it has a clamp on negative numbers.

fire avatar Sep 19 '22 19:09 fire

Not sure, but I recall the view rect was flipped, maybe it has a clamp on negative numbers.

This is unrelated. The issue is the project settings not being renamed when running 3to4.

Calinou avatar Sep 19 '22 20:09 Calinou

The rename aren't defined but, after few tests, it looks like no rename can be applied for a project.godot file. I see them used for ".gd" and ".tscn" files (project settings are allowed here?), so maybe it works in this case but not (as is) for project.godot, because this file uses a .ini format

https://github.com/godotengine/godot/blob/34e28f2fb5fdc4fde65dc2e0c680cab26a6c86e5/editor/project_converter_3_to_4.cpp#L1963-L1972

gotnospirit avatar Sep 20 '22 12:09 gotnospirit

cc @qarmin

Calinou avatar Sep 20 '22 12:09 Calinou