You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrading a Godot 3 project to Godot 4 (via GUI or godot4 --convert-3to4) does not upgrade the Light2D mode member to blend_mode.
As a result, after opening the upgraded project, all non-Add blend modes have been lost. Subtract, Mix and Mask are all reset to Add blending mode.
Note: Mask has been removed and now requires CanvasItem clipping, which is a much more complex upgrade. I suppose we can print some warnings in the console (and if possible, in some popup when upgrading via GUI) to warn user that they need more work to upgrade this feature usage to Godot 4. It should be added on conversion doc side too, but this task has already been added on godotengine/godot-docs#5121
At least Subtract and Mix should be upgraded correctly.
Steps to reproduce
Add some lights with different blending modes in the project... or just download the MRP below
Run godot4 --convert-3to4 or upgrade project via GUI
Observe that blending modes were lost.
Hint: for a quicker check without opening Godot, use the MRP which is under Git, run godot4 --convert-3to4 in the console and check the Git diff to see that mode has not been renamed blend_mode.
The convertor doesn't have advanced heuristics to detect when mode is used in the context of Light2D in your scripts. As the term has a very wide usage and can be mistaken in other contexts, we cannot add such a rename to the convertor. As explained in the popup before you run it, it works on the best effort principle, and such a change is outside of its capabilities.
We can add a compatibility getter method (_get()) to PointLight2D to handle the property rename in this case. (This is not needed in DirectionalLight2D, which is new in 4.0.)
Godot version
v4.0.2.stable.official [7a0977c]
System information
Linux Ubuntu 22.04 with Unity desktop
Issue description
Upgrading a Godot 3 project to Godot 4 (via GUI or
godot4 --convert-3to4
) does not upgrade the Light2Dmode
member toblend_mode
.As a result, after opening the upgraded project, all non-Add blend modes have been lost. Subtract, Mix and Mask are all reset to Add blending mode.
Note: Mask has been removed and now requires CanvasItem clipping, which is a much more complex upgrade. I suppose we can print some warnings in the console (and if possible, in some popup when upgrading via GUI) to warn user that they need more work to upgrade this feature usage to Godot 4. It should be added on conversion doc side too, but this task has already been added on godotengine/godot-docs#5121
At least Subtract and Mix should be upgraded correctly.
Steps to reproduce
godot4 --convert-3to4
or upgrade project via GUIHint: for a quicker check without opening Godot, use the MRP which is under Git, run
godot4 --convert-3to4
in the console and check the Git diff to see thatmode
has not been renamedblend_mode
.Minimal reproduction project
v3.5.2 - convert 3to4 Light2D Mix Blending Mode reset to Add.zip
The text was updated successfully, but these errors were encountered: