summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-07-07 12:38:40 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-07-07 12:38:40 +0200
commit50373e66eea87c82e18192f1df198f0bb241a208 (patch)
treec23d42d6714eacfa85950021f361d07ac8df217b
parent0996c8438f06dea1c8fbe451b8d4fa7799f2df84 (diff)
parent59667f8ea278c79e5b8685cd6243d792315ae006 (diff)
downloadredot-engine-50373e66eea87c82e18192f1df198f0bb241a208.tar.gz
Merge pull request #93982 from TokageItLab/s3d-v2i
Fix property type of Sprite3D `frame_coords` to Vector2i from Vector2
-rw-r--r--misc/extension_api_validation/4.2-stable.expected7
-rw-r--r--scene/3d/sprite_3d.cpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/misc/extension_api_validation/4.2-stable.expected b/misc/extension_api_validation/4.2-stable.expected
index 7b93df70fa..4b0d22a1aa 100644
--- a/misc/extension_api_validation/4.2-stable.expected
+++ b/misc/extension_api_validation/4.2-stable.expected
@@ -372,3 +372,10 @@ GH-91382
Validate extension JSON: Error: Field 'classes/AudioStreamPlaybackPolyphonic/methods/play_stream/arguments': size changed value in new API, from 4 to 6.
Optional arguments added. Compatibility methods registered.
+
+
+GH-93982
+--------
+Validate extension JSON: Error: Field 'classes/Sprite3D/properties/frame_coords': type changed value in new API, from "Vector2" to "Vector2i".
+
+The type was wrong to begin with and has been corrected. Vector2 and Vector2i are convertible, so it should be compatible.
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index d08aeb1de2..8ac585719c 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -984,7 +984,7 @@ void Sprite3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "hframes", PROPERTY_HINT_RANGE, "1,16384,1"), "set_hframes", "get_hframes");
ADD_PROPERTY(PropertyInfo(Variant::INT, "vframes", PROPERTY_HINT_RANGE, "1,16384,1"), "set_vframes", "get_vframes");
ADD_PROPERTY(PropertyInfo(Variant::INT, "frame"), "set_frame", "get_frame");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "frame_coords", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_frame_coords", "get_frame_coords");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "frame_coords", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_frame_coords", "get_frame_coords");
ADD_GROUP("Region", "region_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "region_enabled"), "set_region_enabled", "is_region_enabled");
ADD_PROPERTY(PropertyInfo(Variant::RECT2, "region_rect", PROPERTY_HINT_NONE, "suffix:px"), "set_region_rect", "get_region_rect");