Fix three parse/runtime errors that break the addon on Godot 4.7 - #73
Open
Dremet wants to merge 1 commit into
Open
Fix three parse/runtime errors that break the addon on Godot 4.7#73Dremet wants to merge 1 commit into
Dremet wants to merge 1 commit into
Conversation
Godot 4.7 rejects a bare `return` in a function declared `-> bool`. Because runtime/anim_tree.gd is preloaded through object_adapter.gd, that single parse error cascades and the entire addon fails to load - the Unidot tool menu never appears and every dependent script reports "Failed to compile depended scripts". The other two are latent everywhere and merely surface more readily on 4.7: - yaml_parser.parse_line() is annotated `-> Resource`, but most unidot objects (UnidotPrefabImporter among them) are RefCounted, not Resource. - _meta_completed() derives a colour from importer_type.unicode_at(0..2) and indexes out of bounds when the type string is empty, which happens whenever parsed_meta is null. Verified by converting four Synty POLYGON packs (12,032 assets) on Godot 4.7.1. Co-Authored-By: hlarsen <harley@harleylarsen.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Godot 4.7 rejects a bare
returnin a function declared-> bool. Becauseruntime/anim_tree.gd is preloaded through object_adapter.gd, that single parse
error cascades and the entire addon fails to load - the Unidot tool menu never
appears and every dependent script reports "Failed to compile depended scripts".
The other two are latent everywhere and merely surface more readily on 4.7:
-> Resource, but most unidot objects(UnidotPrefabImporter among them) are RefCounted, not Resource.
indexes out of bounds when the type string is empty, which happens whenever
parsed_meta is null.
Verified by converting four Synty POLYGON packs (12,032 assets) on Godot 4.7.1.
Co-Authored-By: hlarsen harley@harleylarsen.com