Operating system or device - Godot version:
This was tested with version 3: e64b82ebfcc3475c7a7d2a9196bfe20d6c9e3614 version 2: 408f91024c1babc5b60a8fa283a51c44637e00b6
Issue description:
_Background:_ Last day I was working on porting plugin from godot 2 to godot 3. So it's a little special case since almost any script was a tool. In normal project conversion works quite well.
Also I will not enlist problems with variable/function name changes since those are expected to be fixed by the develop on his own.
The list:
ignore, this can be misleading, see above and #9657. Conversion from focus would be welcome. (those below are from comments)
Some properties for animation are not converted (sorry don't have a list at the time, but for me it was most of Control ones (inside rect)), not sure what is status of others?
Those lists are probably very much incomplete, but I will try to update them when I see something new, also some of those are really easy to fix. Also I'm not saying all of those NEED to be fixed, but some of them should be for sure, and even if something wont be fixed it's better to be aware since it might be helpful during migration guide doc creation.
If you will want to share your own observations always test on the newest 2.0 build. And paste build git hash so we could know what version it was.
Steps to reproduce:
Link to minimal example project:
Not very convenient, but if you really want to start with something here is a project in which I was trying to reproduce my issues: Test2 to 3 conversion.zip
I've ticked what I've fixed locally, or in the case of signals could not reproduce (they are properly converted and kept, although they don't work in 3.0 apparently, see #9657).
Not sure yet about the two other tool-related ones, and for animations I still have to check. But your 2to3 test project converts perfectly now :)
BTW, old .fnt files aren't recognized (even after renaming to .font). See #9610.
@akien-mga thank you for your work! Was porting two other plugins today and it was almost a breeze! When it comes to issue with signal conversion, it seems it's one more time about something else (leaved a comment in #9657).
Converter source code is here for anyone who wants to work on this:
https://github.com/godotengine/godot/blob/2.1/editor/editor_export_godot3.cpp
I just want to say. It seems like KEY_RETURN and KEY_ENTER got renamed
https://github.com/godotengine/godot/pull/10123
I am just adding another issue to the list
I am not sure #9610 is completely fixed, as there is still problems with the .fnt files used in 2.1 for bitmap fonts.
The converter right now tries to convert it to .font as a normal binary .fnt file, but fails because the .fnt in a bitmap font is just a text file defining the characters on a .png file.
Backtrace:
https://pastebin.com/dWUDFGQz
The backtrace looks like your .fnt did not get renamed to .font as it should have been as per #11869.
In the master branch, .fnt files are supposed to be BMFont files, not Godot's binary format from 2.1 (which should be .font).
@akien-mga it didn't, it fails because the conversion to .font expects the binary .fnt but in case of a bitmap font it isn't.
So i guess some kind of check is needed to see if it isn't the binary .fnt and then convert it to the BMFont file instead?
I think there's a misunderstanding, there is no conversion to .font performed, it's only renamed.
In theory you should not have any BMFont file in your 2.1 project, as they were not supported.
Hehe then there have been a misunderstanding 馃槃 Even though they aren't supported they work just fine.
Okay i edited this again, creating a list of issues i stumble across instead for a better overview.
Converter used at db262f80be654c09288453126379277a2306ac01
Opacity and Self Opacity is no longer available in 3.0 and the converter doesn't handle this. It should set the alpha on the Modulate and Self Modulate respectively
-- Animation tracks modifying the opacity should also modify the modulate/alpha instead
Particles2D doesn't work after conversion. In 3.0 a Particle2D needs a material to process the particles. If i am not mistaken the option to add ShaderMaterial is not present in 2.1, so the converter should create a ParticlesMaterial and set the properties corresponding to the ones in the 2.1 particle system. If possible.
Shaders aren't working, mostly because of shader language changes - So this falls under the _"expected to be fixed by the developer on his own"_ category i guess
ButtonGroup is no longer a Node but a Resource - Right now a ButtonGroup is converted to a Node and radio button setups are broken. Would it make sense to create a new ButtonGroup resource and set it on all child buttons Group property?
Control nodes and their Focus Mode in 2.1 doesn't really correspond to the Mouse/Filter in 3.0 - I can't seem to find consistency in what the 3.0 Filter will be set to based on the 2.1 Focus Mode
Anchors are not converted correct. For example a Control anchored to Center Bottom in 2.1 is anchored as Bottom Right in 3.0 - Seems like Center becomes 1 instead of 0.5
Size Flags are not set correct on Control nodes
Button Click On Press isn't set to the corresponding Action Mode in 3.0
Hope it is ok i just list issues i find here so they can be added to the tracker instead of creating new issues. And please correct me if i am wrong on any of my points, like i was with the font conversion :wink:
Oh, I was opening an issue and find you!:
Some issues from a conversion made in 2.1.4 compiled at 29/11/2017:
Animation Player:
track: rotation_deg ----> rotation_degrees (Bad converted, shows error in console)
Light2D:
Item Mask ----> Item Cull Mask (Not Binded)
Light2D, Polygon2D and others:
Opacity ---> SelfModulate.a (or Modulate.a)
Mix Mode ---> New CanvasItemMaterial/MixMode (I don麓t know if this is posible, but is one choice)
Texture Import:
Repeat property is not converted.
https://github.com/godotengine/godot/commit/482e07af7e5c8b85463f950036dc7b14cb8cd3b4#diff-43287f78e603b193c1c77b7298273367L682
This comment is just to add support that rotation_deg got renamed to rotation_degrees
it got changed in 3d Spatial.
There are other changes in the commit such as Node2d
functions
Member variables
There might be other but that was a huge patch
LIke Polygon2D, CanvasLayer, Control etc
for #15191 PR.
z property of Node2D got changed to z_indexFor #15611:
playback/play -> current_animationtexture_rotation -> texture_rotation_degreesh_scroll, v_scroll -> scroll_horizontal_enabled, scroll_vertical_enabledCanvasLayer.rotation -> rotation_degrees, if doableLinking because semi-relevant: https://github.com/dploeger/godot-migrationnotes
(not 100% sure) all inside Control.rect
(not 100% sure) all inside CanvasItem.visibility
Control: rect/pos -> rect_position
Control: rect/scale -> rect_scale
Control: rect/size -> rect_size
Should be fixed here:
https://github.com/godotengine/godot/blob/2.1/editor/editor_export_godot3.cpp#L340-L344
Here:
https://github.com/godotengine/godot/blob/2.1/editor/editor_export_godot3.cpp#L411-L416
And here:
https://github.com/godotengine/godot/blob/2.1/editor/editor_export_godot3.cpp#L643-L652
If I am not mistaken?
Indeed, thanks.
See #19556 for fixes on:
Control nodes and their Focus Mode in 2.1 doesn't really correspond to the Mouse/Filter in 3.0 - I can't seem to find consistency in what the 3.0 Filter will be set to based on the 2.1 Focus Mode
Button Click On Press isn't set to the corresponding Action Mode in 3.0
Following is already fixed by the previous opacity/modulate fixes:
Light2D, Polygon2D and others: Opacity ---> SelfModulate.a (or Modulate.a)
seems 3.x doesn't have support for .texture file extensions but the exporter converts to that from .tex anyway?
Also the exporter seems to pickup any strings that has the word ".remove" and converts to ".remove_and_collide" or something similar.
The 2.1 branch is no longer actively worked on by engine developers, unless critical fixes are needed for current games in production. As such we are now closing non-critical bug reports affecting only the 2.1 branch.
Please comment if this was incorrectly triaged and is still relevant in 3.x versions.
Well actually this issue can be considered as "fixed". Most remaining points on the OP can't really be fixed.
Also the exporter seems to pickup any strings that has the word ".remove" and converts to ".remove_and_collide" or something similar.
This is a mistake in my regexp, I'll fix it eventually.
Most helpful comment
BTW, old
.fntfiles aren't recognized (even after renaming to.font). See #9610.