Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting project from Godot 3 to 4 causes some nodes properties to revert to their defaults #65999

Closed
Tracked by #73960
Marigem opened this issue Sep 17, 2022 · 6 comments

Comments

@Marigem
Copy link

Marigem commented Sep 17, 2022

Godot version

v4.0.beta1.official.20d667284

System information

Windows 10, Arch Linux

Issue description

Timer node and animation tree process callback mode reverts from physics to idle.

Raycast2D cast_to property reverts to the default (0, 50).

These are the ones I noticed.

Steps to reproduce

Convert MRP to godot 4 beta

Minimal reproduction project

convert-mrp.zip

@KoBeWi
Copy link
Member

KoBeWi commented Sep 17, 2022

I think a conversion for these properties is just missing, so they are not renamed to the new ones and get reset.

@KoBeWi KoBeWi added this to the 4.0 milestone Sep 17, 2022
@Calinou
Copy link
Member

Calinou commented Sep 17, 2022

RayCast's cast_to was renamed to target_position in 4.0.

@gotnospirit
Copy link
Contributor

// Some needs to be disabled, because users can use this names as variables
static const char *gdscript_properties_renames[][2] = {
// // { "d", "distance" }, //WorldMarginShape2D - TODO, looks that polish letters ą ę are treaten as space, not as letter, so `będą` are renamed to `będistanceą`
// // {"alt","alt_pressed"}, // This may broke a lot of comments and user variables
// // {"command","command_pressed"},// This may broke a lot of comments and user variables
// // {"control","ctrl_pressed"},// This may broke a lot of comments and user variables
// // {"extends","size"}, // BoxShape3D, LightmapGI broke ReflectionProbe
// // {"meta","meta_pressed"},// This may broke a lot of comments and user variables
// // {"pause_mode","process_mode"}, // Node - Cyclic rename, look for others
// // {"rotate","rotates"}, // PathFollow2D - probably function exists with same name
// // {"offset","progress"}, // PathFollow2D, PathFollow3D - Name is way too vague
// // {"shift","shift_pressed"},// This may broke a lot of comments and user variables
// { "autowrap", "autowrap_mode" }, // Label
// { "cast_to", "target_position" }, // RayCast2D, RayCast3D
// { "doubleclick", "double_click" }, // InputEventMouseButton
// { "group", "button_group" }, // BaseButton
// { "process_mode", "process_callback" }, // AnimationTree, Camera2D

@Mickeon
Copy link
Contributor

Mickeon commented Sep 29, 2022

Oook, the converter reeally needs some refactoring. It's really difficult to work with due of how repetitive the code is.

@KoBeWi KoBeWi modified the milestones: 4.0, 4.1 Feb 25, 2023
@YuriSizov YuriSizov modified the milestones: 4.1, 4.x Jun 22, 2023
@TheSofox
Copy link
Contributor

editor\renames_map_3_to_4.cpp has been updated at some stage to allow cast_to to be renamed to target_position. Confirmed it works on v4.4.dev.custom_build [4254946]

So that leaves process_mode to process_callback for Timer (and incidentally Camera2D); and to callback_mode_process for AnimationTree. Unfortunately, this is gonna be hard to fix because in 4.x, the Node type attribute pause_mode got renamed to process_mode.

I think you can see how that's a big conflict. Remember all the above nodes (Timer, Camera2D, etc) inherit from Node so if a Godot 4.x opens the scene file, and reads process_mode for AnimationTree, how does it know whether it was the result of someone setting a pause mode in Godot 4.x, or someone setting the callback mode in Godot 3.x? This stops me from using the _set() method solution, which I've used to solve a similar problem like this in the past. If someone tries to set process_mode, the Node class intercepts it before it ever reaches the AnimationTree::_set()

@akien-mga
Copy link
Member

Thanks for checking. Indeed these remaining conflicts are complex and so far I think the consensus is to not try to implement the complexity required to deal with them. So I would close the remaining issue with process_mode as a "wontfix".

@akien-mga akien-mga removed this from the 4.x milestone Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants