Additionally, CI builds were failing due to the commit where SpineSkin
had an init() method added, but this caused Godot 3.x builds to fail.
Our formatter was also run, so it should no longer fail the format
check.
Addresses the loader/saver registration issue in #2899.
Additionally, makes it such that you can adjust the SpineSkeletonData in
the inspector without crashes. This appears to have been caused by a
dangling pointer.
Finally, double-clicking on JSON in the inspector opens the text editor
and does not crash the Godot editor.
Fixes additional compatibility issues found when building against Godot 4.5:
1. String::parse_utf8() deprecated and removed in Godot 4.5
- Replaced with String::utf8() for Godot 4.5+
- Added version guards to maintain compatibility with older versions
- Affected files: SpineAnimation, SpineAnimationTrack, SpineAtlasResource,
SpineAttachment, SpineBoneData, SpineConstraintData, SpineEventData,
SpineSkeletonDataResource, SpineSkin, SpineSlotData, SpineSprite
2. Editor header file locations changed in Godot 4.5
- editor/editor_file_system.h -> editor/file_system/editor_file_system.h
- editor/plugins/animation_*_editor_plugin.h -> editor/animation/animation_*_editor_plugin.h
- Added version guards for correct include paths
- Affected files: SpineAtlasResource, SpineAnimationTrack
These changes ensure spine-godot builds successfully with both Godot 4.5 and earlier versions.
Backported three commits from 4.3-beta branch:
- cc12304ba: Adds TOOLS_ENABLED guards for editor includes
- e063bae54: Adds version macro compatibility for deprecated=no builds (module)
- 3ffea502e: Adds version macro compatibility for deprecated=no builds (extension)
Changes:
1. SpineCommon.h:
- Added #include "core/version_generated.gen.h"
- Added VERSION_MAJOR/MINOR/PATCH macro fallbacks for both module and extension builds
- These macros are needed when building with deprecated=no in Godot 4.5+
2. SpineSkeletonDataResource.cpp and SpineSprite.cpp:
- Wrapped editor_interface.h includes with TOOLS_ENABLED guards
- Required for building export templates (non-editor builds) in Godot 4.5+
This ensures spine-godot compiles correctly with Godot 4.5 in all build configurations.