mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[godot] WIP update to 4.3 spine-cpp
This commit is contained in:
parent
c6495719ca
commit
ef7bd48e66
@ -40,7 +40,7 @@ void SpineAnimation::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_duration"), &SpineAnimation::get_duration);
|
||||
ClassDB::bind_method(D_METHOD("set_duration", "duration"), &SpineAnimation::set_duration);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("apply", "skeleton", "last_time", "time", "loop", "events", "alpha", "blend", "direction"), &SpineAnimation::apply);
|
||||
ClassDB::bind_method(D_METHOD("apply", "skeleton", "last_time", "time", "loop", "events", "alpha", "blend", "direction", "appliedPose"), &SpineAnimation::apply);
|
||||
ClassDB::bind_method(D_METHOD("get_timelines"), &SpineAnimation::get_timelines);
|
||||
ClassDB::bind_method(D_METHOD("has_timeline", "ids"), &SpineAnimation::has_timeline);
|
||||
}
|
||||
@ -63,11 +63,11 @@ void SpineAnimation::set_duration(float duration) {
|
||||
}
|
||||
|
||||
void SpineAnimation::apply(Ref<SpineSkeleton> skeleton, float last_time, float time, bool loop, Array events, float alpha,
|
||||
SpineConstant::MixBlend blend, SpineConstant::MixDirection direction) {
|
||||
SpineConstant::MixBlend blend, SpineConstant::MixDirection direction, bool appliedPose) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
spine::Vector<spine::Event *> spineEvents;
|
||||
spine::Array<spine::Event *> spineEvents;
|
||||
get_spine_object()->apply(*(skeleton->get_spine_object()), last_time, time, loop, &spineEvents, alpha, (spine::MixBlend) blend,
|
||||
(spine::MixDirection) direction);
|
||||
(spine::MixDirection) direction, appliedPose);
|
||||
for (int i = 0; i < (int) spineEvents.size(); ++i) {
|
||||
auto event_ref = memnew(SpineEvent);
|
||||
event_ref->set_spine_object(skeleton->get_spine_owner(), spineEvents[i]);
|
||||
@ -95,7 +95,7 @@ Array SpineAnimation::get_timelines() {
|
||||
|
||||
bool SpineAnimation::has_timeline(Array ids) {
|
||||
SPINE_CHECK(get_spine_object(), false)
|
||||
spine::Vector<spine::PropertyId> property_ids;
|
||||
spine::Array<spine::PropertyId> property_ids;
|
||||
property_ids.setSize(ids.size(), 0);
|
||||
|
||||
for (int i = 0; i < (int) property_ids.size(); ++i) {
|
||||
|
||||
@ -46,7 +46,7 @@ protected:
|
||||
|
||||
public:
|
||||
void apply(Ref<SpineSkeleton> skeleton, float last_time, float time, bool loop, Array events, float alpha, SpineConstant::MixBlend blend,
|
||||
SpineConstant::MixDirection direction);
|
||||
SpineConstant::MixDirection direction, bool appliedPose);
|
||||
|
||||
Array get_timelines();
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ void SpineAnimationState::set_spine_sprite(SpineSprite *_sprite) {
|
||||
animation_state = nullptr;
|
||||
sprite = _sprite;
|
||||
if (!sprite || !sprite->get_skeleton_data_res().is_valid() || !sprite->get_skeleton_data_res()->is_skeleton_data_loaded()) return;
|
||||
animation_state = new spine::AnimationState(sprite->get_skeleton_data_res()->get_animation_state_data());
|
||||
animation_state = new spine::AnimationState(*sprite->get_skeleton_data_res()->get_animation_state_data());
|
||||
}
|
||||
|
||||
void SpineAnimationState::update(float delta) {
|
||||
@ -98,13 +98,13 @@ int SpineAnimationState::get_num_tracks() {
|
||||
|
||||
Ref<SpineTrackEntry> SpineAnimationState::set_animation(const String &animation_name, bool loop, int track) {
|
||||
SPINE_CHECK(animation_state, nullptr)
|
||||
auto skeleton_data = animation_state->getData()->getSkeletonData();
|
||||
auto animation = skeleton_data->findAnimation(animation_name.utf8().ptr());
|
||||
auto &skeleton_data = animation_state->getData().getSkeletonData();
|
||||
auto animation = skeleton_data.findAnimation(animation_name.utf8().ptr());
|
||||
if (!animation) {
|
||||
ERR_PRINT(String("Can not find animation: ") + animation_name);
|
||||
return nullptr;
|
||||
}
|
||||
auto track_entry = animation_state->setAnimation(track, animation, loop);
|
||||
auto track_entry = &animation_state->setAnimation(track, *animation, loop);
|
||||
Ref<SpineTrackEntry> track_entry_ref(memnew(SpineTrackEntry));
|
||||
track_entry_ref->set_spine_object(sprite, track_entry);
|
||||
return track_entry_ref;
|
||||
@ -112,13 +112,13 @@ Ref<SpineTrackEntry> SpineAnimationState::set_animation(const String &animation_
|
||||
|
||||
Ref<SpineTrackEntry> SpineAnimationState::add_animation(const String &animation_name, float delay, bool loop, int track) {
|
||||
SPINE_CHECK(animation_state, nullptr)
|
||||
auto skeleton_data = animation_state->getData()->getSkeletonData();
|
||||
auto animation = skeleton_data->findAnimation(animation_name.utf8().ptr());
|
||||
auto &skeleton_data = animation_state->getData().getSkeletonData();
|
||||
auto animation = skeleton_data.findAnimation(animation_name.utf8().ptr());
|
||||
if (!animation) {
|
||||
ERR_PRINT(String("Can not find animation: ") + animation_name);
|
||||
return nullptr;
|
||||
}
|
||||
auto track_entry = animation_state->addAnimation(track, animation, loop, delay);
|
||||
auto track_entry = &animation_state->addAnimation(track, *animation, loop, delay);
|
||||
Ref<SpineTrackEntry> track_entry_ref(memnew(SpineTrackEntry));
|
||||
track_entry_ref->set_spine_object(sprite, track_entry);
|
||||
return track_entry_ref;
|
||||
@ -126,14 +126,14 @@ Ref<SpineTrackEntry> SpineAnimationState::add_animation(const String &animation_
|
||||
|
||||
Ref<SpineTrackEntry> SpineAnimationState::set_empty_animation(int track_id, float mix_duration) {
|
||||
SPINE_CHECK(animation_state, nullptr)
|
||||
auto track_entry = animation_state->setEmptyAnimation(track_id, mix_duration);
|
||||
auto track_entry = &animation_state->setEmptyAnimation(track_id, mix_duration);
|
||||
Ref<SpineTrackEntry> track_entry_ref(memnew(SpineTrackEntry));
|
||||
track_entry_ref->set_spine_object(sprite, track_entry);
|
||||
return track_entry_ref;
|
||||
}
|
||||
Ref<SpineTrackEntry> SpineAnimationState::add_empty_animation(int track_id, float mix_duration, float delay) {
|
||||
SPINE_CHECK(animation_state, nullptr)
|
||||
auto track_entry = animation_state->addEmptyAnimation(track_id, mix_duration, delay);
|
||||
auto track_entry = &animation_state->addEmptyAnimation(track_id, mix_duration, delay);
|
||||
Ref<SpineTrackEntry> track_entry_ref(memnew(SpineTrackEntry));
|
||||
track_entry_ref->set_spine_object(sprite, track_entry);
|
||||
return track_entry_ref;
|
||||
|
||||
@ -48,7 +48,7 @@ String SpineAttachment::get_attachment_name() {
|
||||
|
||||
Ref<SpineAttachment> SpineAttachment::copy() {
|
||||
SPINE_CHECK(get_spine_object(), nullptr)
|
||||
auto copy = get_spine_object()->copy();
|
||||
auto copy = &get_spine_object()->copy();
|
||||
if (!copy) return nullptr;
|
||||
Ref<SpineAttachment> attachment_ref(memnew(SpineAttachment));
|
||||
attachment_ref->set_spine_object(get_spine_owner(), copy);
|
||||
|
||||
@ -34,8 +34,6 @@
|
||||
#include "SpineCommon.h"
|
||||
|
||||
void SpineBone::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("update_world_transform"), &SpineBone::update_world_transform);
|
||||
ClassDB::bind_method(D_METHOD("set_to_setup_pose"), &SpineBone::set_to_setup_pose);
|
||||
ClassDB::bind_method(D_METHOD("world_to_local", "world_position"), &SpineBone::world_to_local);
|
||||
ClassDB::bind_method(D_METHOD("world_to_parent", "world_position"), &SpineBone::world_to_parent);
|
||||
ClassDB::bind_method(D_METHOD("local_to_world", "local_position"), &SpineBone::local_to_world);
|
||||
@ -43,8 +41,6 @@ void SpineBone::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("world_to_local_rotation", "world_rotation"), &SpineBone::world_to_local_rotation);
|
||||
ClassDB::bind_method(D_METHOD("local_to_world_rotation", "local_rotation"), &SpineBone::local_to_world_rotation);
|
||||
ClassDB::bind_method(D_METHOD("rotate_world"), &SpineBone::rotate_world);
|
||||
ClassDB::bind_method(D_METHOD("get_world_to_local_rotation_x"), &SpineBone::get_world_to_local_rotation_x);
|
||||
ClassDB::bind_method(D_METHOD("get_world_to_local_rotation_y"), &SpineBone::get_world_to_local_rotation_y);
|
||||
ClassDB::bind_method(D_METHOD("get_data"), &SpineBone::get_data);
|
||||
ClassDB::bind_method(D_METHOD("get_parent"), &SpineBone::get_parent);
|
||||
ClassDB::bind_method(D_METHOD("get_children"), &SpineBone::get_children);
|
||||
@ -102,67 +98,47 @@ void SpineBone::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_global_transform", "global_transform"), &SpineBone::set_global_transform);
|
||||
}
|
||||
|
||||
void SpineBone::update_world_transform() {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->updateWorldTransform();
|
||||
}
|
||||
|
||||
void SpineBone::set_to_setup_pose() {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setToSetupPose();
|
||||
}
|
||||
|
||||
Vector2 SpineBone::world_to_local(Vector2 world_position) {
|
||||
SPINE_CHECK(get_spine_object(), Vector2())
|
||||
float x, y;
|
||||
get_spine_object()->worldToLocal(world_position.x, world_position.y, x, y);
|
||||
get_spine_object()->getAppliedPose().worldToLocal(world_position.x, world_position.y, x, y);
|
||||
return Vector2(x, y);
|
||||
}
|
||||
|
||||
Vector2 SpineBone::world_to_parent(Vector2 world_position) {
|
||||
SPINE_CHECK(get_spine_object(), Vector2())
|
||||
float x, y;
|
||||
get_spine_object()->worldToParent(world_position.x, world_position.y, x, y);
|
||||
get_spine_object()->getAppliedPose().worldToParent(world_position.x, world_position.y, x, y);
|
||||
return Vector2(x, y);
|
||||
}
|
||||
|
||||
Vector2 SpineBone::local_to_world(Vector2 local_position) {
|
||||
SPINE_CHECK(get_spine_object(), Vector2())
|
||||
float x, y;
|
||||
get_spine_object()->localToWorld(local_position.x, local_position.y, x, y);
|
||||
get_spine_object()->getAppliedPose().localToWorld(local_position.x, local_position.y, x, y);
|
||||
return Vector2(x, y);
|
||||
}
|
||||
|
||||
Vector2 SpineBone::parent_to_world(Vector2 local_position) {
|
||||
SPINE_CHECK(get_spine_object(), Vector2())
|
||||
float x, y;
|
||||
get_spine_object()->parentToWorld(local_position.x, local_position.y, x, y);
|
||||
get_spine_object()->getAppliedPose().parentToWorld(local_position.x, local_position.y, x, y);
|
||||
return Vector2(x, y);
|
||||
}
|
||||
|
||||
float SpineBone::world_to_local_rotation(float world_rotation) {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->worldToLocalRotation(world_rotation);
|
||||
return get_spine_object()->getAppliedPose().worldToLocalRotation(world_rotation);
|
||||
}
|
||||
|
||||
float SpineBone::local_to_world_rotation(float local_rotation) {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->localToWorldRotation(local_rotation);
|
||||
return get_spine_object()->getAppliedPose().localToWorldRotation(local_rotation);
|
||||
}
|
||||
|
||||
void SpineBone::rotate_world(float degrees) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->rotateWorld(degrees);
|
||||
}
|
||||
|
||||
float SpineBone::get_world_to_local_rotation_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getWorldToLocalRotationX();
|
||||
}
|
||||
|
||||
float SpineBone::get_world_to_local_rotation_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getWorldToLocalRotationY();
|
||||
get_spine_object()->getAppliedPose().rotateWorld(degrees);
|
||||
}
|
||||
|
||||
Ref<SpineBoneData> SpineBone::get_data() {
|
||||
@ -198,223 +174,223 @@ Array SpineBone::get_children() {
|
||||
|
||||
float SpineBone::get_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getX();
|
||||
return get_spine_object()->getPose().getX();
|
||||
}
|
||||
|
||||
void SpineBone::set_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setX(v);
|
||||
get_spine_object()->getPose().setX(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getY();
|
||||
return get_spine_object()->getPose().getY();
|
||||
}
|
||||
|
||||
void SpineBone::set_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setY(v);
|
||||
get_spine_object()->getPose().setY(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_rotation() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getRotation();
|
||||
return get_spine_object()->getPose().getRotation();
|
||||
}
|
||||
|
||||
void SpineBone::set_rotation(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setRotation(v);
|
||||
get_spine_object()->getPose().setRotation(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_scale_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getScaleX();
|
||||
return get_spine_object()->getPose().getScaleX();
|
||||
}
|
||||
|
||||
void SpineBone::set_scale_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setScaleX(v);
|
||||
get_spine_object()->getPose().setScaleX(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_scale_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getScaleY();
|
||||
return get_spine_object()->getPose().getScaleY();
|
||||
}
|
||||
|
||||
void SpineBone::set_scale_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setScaleY(v);
|
||||
get_spine_object()->getPose().setScaleY(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_shear_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getShearX();
|
||||
return get_spine_object()->getPose().getShearX();
|
||||
}
|
||||
|
||||
void SpineBone::set_shear_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setShearX(v);
|
||||
get_spine_object()->getPose().setShearX(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_shear_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getShearY();
|
||||
return get_spine_object()->getPose().getShearY();
|
||||
}
|
||||
|
||||
void SpineBone::set_shear_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setShearY(v);
|
||||
get_spine_object()->getPose().setShearY(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_applied_rotation() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getAppliedRotation();
|
||||
return get_spine_object()->getAppliedPose().getRotation();
|
||||
}
|
||||
|
||||
void SpineBone::set_applied_rotation(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setAppliedRotation(v);
|
||||
get_spine_object()->getAppliedPose().setRotation(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_a_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getAX();
|
||||
return get_spine_object()->getAppliedPose().getX();
|
||||
}
|
||||
|
||||
void SpineBone::set_a_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setAX(v);
|
||||
get_spine_object()->getAppliedPose().setX(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_a_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getAY();
|
||||
return get_spine_object()->getAppliedPose().getY();
|
||||
}
|
||||
|
||||
void SpineBone::set_a_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setAY(v);
|
||||
get_spine_object()->getAppliedPose().setY(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_a_scale_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getAScaleX();
|
||||
return get_spine_object()->getAppliedPose().getScaleX();
|
||||
}
|
||||
|
||||
void SpineBone::set_a_scale_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setAScaleX(v);
|
||||
get_spine_object()->getAppliedPose().setScaleX(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_a_scale_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getAScaleY();
|
||||
return get_spine_object()->getAppliedPose().getScaleY();
|
||||
}
|
||||
|
||||
void SpineBone::set_a_scale_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setAScaleY(v);
|
||||
get_spine_object()->getAppliedPose().setScaleY(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_a_shear_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getAShearX();
|
||||
return get_spine_object()->getAppliedPose().getShearX();
|
||||
}
|
||||
|
||||
void SpineBone::set_a_shear_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setAShearX(v);
|
||||
get_spine_object()->getAppliedPose().setShearX(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_a_shear_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getAShearY();
|
||||
return get_spine_object()->getAppliedPose().getShearY();
|
||||
}
|
||||
|
||||
void SpineBone::set_a_shear_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setAShearY(v);
|
||||
get_spine_object()->getAppliedPose().setShearY(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_a() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getA();
|
||||
return get_spine_object()->getAppliedPose().getA();
|
||||
}
|
||||
|
||||
void SpineBone::set_a(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setA(v);
|
||||
get_spine_object()->getAppliedPose().setA(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_b() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getB();
|
||||
return get_spine_object()->getAppliedPose().getB();
|
||||
}
|
||||
|
||||
void SpineBone::set_b(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setB(v);
|
||||
get_spine_object()->getAppliedPose().setB(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_c() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getC();
|
||||
return get_spine_object()->getAppliedPose().getC();
|
||||
}
|
||||
|
||||
void SpineBone::set_c(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setC(v);
|
||||
get_spine_object()->getAppliedPose().setC(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_d() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getD();
|
||||
return get_spine_object()->getAppliedPose().getD();
|
||||
}
|
||||
|
||||
void SpineBone::set_d(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setD(v);
|
||||
get_spine_object()->getAppliedPose().setD(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_world_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getWorldX();
|
||||
return get_spine_object()->getAppliedPose().getWorldX();
|
||||
}
|
||||
|
||||
void SpineBone::set_world_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setWorldX(v);
|
||||
get_spine_object()->getAppliedPose().setWorldX(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_world_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getWorldY();
|
||||
return get_spine_object()->getAppliedPose().getWorldY();
|
||||
}
|
||||
|
||||
void SpineBone::set_world_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setWorldY(v);
|
||||
get_spine_object()->getAppliedPose().setWorldY(v);
|
||||
}
|
||||
|
||||
float SpineBone::get_world_rotation_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getWorldRotationX();
|
||||
return get_spine_object()->getAppliedPose().getWorldRotationX();
|
||||
}
|
||||
|
||||
float SpineBone::get_world_rotation_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getWorldRotationY();
|
||||
return get_spine_object()->getAppliedPose().getWorldRotationY();
|
||||
}
|
||||
|
||||
|
||||
float SpineBone::get_world_scale_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getWorldScaleX();
|
||||
return get_spine_object()->getAppliedPose().getWorldScaleX();
|
||||
}
|
||||
|
||||
float SpineBone::get_world_scale_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getWorldScaleY();
|
||||
return get_spine_object()->getAppliedPose().getWorldScaleY();
|
||||
}
|
||||
|
||||
bool SpineBone::is_active() {
|
||||
@ -428,12 +404,12 @@ void SpineBone::set_active(bool v) {
|
||||
|
||||
SpineConstant::Inherit SpineBone::get_inherit() {
|
||||
SPINE_CHECK(get_spine_object(), SpineConstant::Inherit_Normal);
|
||||
return (SpineConstant::Inherit) get_spine_object()->getInherit();
|
||||
return (SpineConstant::Inherit) get_spine_object()->getPose().getInherit();
|
||||
}
|
||||
|
||||
void SpineBone::set_inherit(SpineConstant::Inherit inherit) {
|
||||
SPINE_CHECK(get_spine_object(), );
|
||||
get_spine_object()->setInherit((spine::Inherit) inherit);
|
||||
get_spine_object()->getPose().setInherit((spine::Inherit) inherit);
|
||||
}
|
||||
|
||||
Transform2D SpineBone::get_transform() {
|
||||
@ -484,17 +460,17 @@ void SpineBone::set_global_transform(Transform2D transform) {
|
||||
float rotation = spine::MathUtil::Rad_Deg * transform.get_rotation();
|
||||
Vector2 scale = transform.get_scale();
|
||||
Vector2 local_position = position;
|
||||
float local_rotation = bone->worldToLocalRotation(rotation) - 180;
|
||||
float local_rotation = bone->getAppliedPose().worldToLocalRotation(rotation) - 180;
|
||||
Vector2 local_scale = scale;
|
||||
spine::Bone *parent = bone->getParent();
|
||||
if (parent) {
|
||||
parent->worldToLocal(local_position.x, local_position.y, local_position.x, local_position.y);
|
||||
parent->getAppliedPose().worldToLocal(local_position.x, local_position.y, local_position.x, local_position.y);
|
||||
}
|
||||
bone->setX(local_position.x);
|
||||
bone->setY(local_position.y);
|
||||
bone->setRotation(local_rotation);
|
||||
bone->setScaleX(local_scale.x);
|
||||
bone->setScaleY(local_scale.y);
|
||||
bone->getPose().setX(local_position.x);
|
||||
bone->getPose().setY(local_position.y);
|
||||
bone->getPose().setRotation(local_rotation);
|
||||
bone->getPose().setScaleX(local_scale.x);
|
||||
bone->getPose().setScaleY(local_scale.y);
|
||||
|
||||
get_spine_owner()->set_modified_bones();
|
||||
}
|
||||
|
||||
@ -49,10 +49,6 @@ protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void update_world_transform();
|
||||
|
||||
void set_to_setup_pose();
|
||||
|
||||
Vector2 world_to_local(Vector2 world_position);
|
||||
|
||||
Vector2 world_to_parent(Vector2 world_position);
|
||||
@ -67,10 +63,6 @@ public:
|
||||
|
||||
void rotate_world(float degrees);
|
||||
|
||||
float get_world_to_local_rotation_x();
|
||||
|
||||
float get_world_to_local_rotation_y();
|
||||
|
||||
Ref<SpineBoneData> get_data();
|
||||
|
||||
Ref<SpineBone> get_parent();
|
||||
|
||||
@ -94,87 +94,87 @@ void SpineBoneData::set_length(float v) {
|
||||
|
||||
float SpineBoneData::get_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getX();
|
||||
return get_spine_object()->getSetupPose().getX();
|
||||
}
|
||||
|
||||
void SpineBoneData::set_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setX(v);
|
||||
get_spine_object()->getSetupPose().setX(v);
|
||||
}
|
||||
|
||||
float SpineBoneData::get_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getY();
|
||||
return get_spine_object()->getSetupPose().getY();
|
||||
}
|
||||
|
||||
void SpineBoneData::set_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setY(v);
|
||||
get_spine_object()->getSetupPose().setY(v);
|
||||
}
|
||||
|
||||
float SpineBoneData::get_rotation() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getRotation();
|
||||
return get_spine_object()->getSetupPose().getRotation();
|
||||
}
|
||||
|
||||
void SpineBoneData::set_rotation(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setRotation(v);
|
||||
get_spine_object()->getSetupPose().setRotation(v);
|
||||
}
|
||||
|
||||
float SpineBoneData::get_scale_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getScaleX();
|
||||
return get_spine_object()->getSetupPose().getScaleX();
|
||||
}
|
||||
|
||||
void SpineBoneData::set_scale_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setScaleX(v);
|
||||
get_spine_object()->getSetupPose().setScaleX(v);
|
||||
}
|
||||
|
||||
float SpineBoneData::get_scale_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getScaleY();
|
||||
return get_spine_object()->getSetupPose().getScaleY();
|
||||
}
|
||||
|
||||
void SpineBoneData::set_scale_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setScaleY(v);
|
||||
get_spine_object()->getSetupPose().setScaleY(v);
|
||||
}
|
||||
|
||||
float SpineBoneData::get_shear_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getShearX();
|
||||
return get_spine_object()->getSetupPose().getShearX();
|
||||
}
|
||||
|
||||
void SpineBoneData::set_shear_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setShearX(v);
|
||||
get_spine_object()->getSetupPose().setShearX(v);
|
||||
}
|
||||
|
||||
float SpineBoneData::get_shear_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getShearY();
|
||||
return get_spine_object()->getSetupPose().getShearY();
|
||||
}
|
||||
|
||||
void SpineBoneData::set_shear_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setShearY(v);
|
||||
get_spine_object()->getSetupPose().setShearY(v);
|
||||
}
|
||||
|
||||
SpineConstant::Inherit SpineBoneData::get_inherit() {
|
||||
SPINE_CHECK(get_spine_object(), SpineConstant::Inherit::Inherit_Normal)
|
||||
return (SpineConstant::Inherit) get_spine_object()->getInherit();
|
||||
return (SpineConstant::Inherit) get_spine_object()->getSetupPose().getInherit();
|
||||
}
|
||||
|
||||
void SpineBoneData::set_inherit(SpineConstant::Inherit v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setInherit((spine::Inherit) v);
|
||||
get_spine_object()->getSetupPose().setInherit((spine::Inherit) v);
|
||||
}
|
||||
|
||||
bool SpineBoneData::is_skin_required() {
|
||||
SPINE_CHECK(get_spine_object(), false)
|
||||
return get_spine_object()->isSkinRequired();
|
||||
return get_spine_object()->getSkinRequired();
|
||||
}
|
||||
|
||||
void SpineBoneData::set_skin_required(bool v) {
|
||||
@ -200,7 +200,7 @@ String SpineBoneData::get_icon() {
|
||||
|
||||
bool SpineBoneData::is_visible() {
|
||||
SPINE_CHECK(get_spine_object(), true)
|
||||
return get_spine_object()->isVisible();
|
||||
return get_spine_object()->getVisible();
|
||||
}
|
||||
|
||||
void SpineBoneData::set_visible(bool v) {
|
||||
|
||||
@ -33,10 +33,7 @@
|
||||
|
||||
void SpineConstraintData::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_constraint_name"), &SpineConstraintData::get_constraint_name);
|
||||
ClassDB::bind_method(D_METHOD("get_order"), &SpineConstraintData::get_order);
|
||||
ClassDB::bind_method(D_METHOD("set_order", "v"), &SpineConstraintData::set_order);
|
||||
ClassDB::bind_method(D_METHOD("is_skin_required"), &SpineConstraintData::is_skin_required);
|
||||
ClassDB::bind_method(D_METHOD("set_skin_required", "v"), &SpineConstraintData::set_skin_required);
|
||||
}
|
||||
|
||||
String SpineConstraintData::get_constraint_name() {
|
||||
@ -46,22 +43,7 @@ String SpineConstraintData::get_constraint_name() {
|
||||
return name;
|
||||
}
|
||||
|
||||
int SpineConstraintData::get_order() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return (int) get_spine_object()->getOrder();
|
||||
}
|
||||
|
||||
void SpineConstraintData::set_order(int v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setOrder(v);
|
||||
}
|
||||
|
||||
bool SpineConstraintData::is_skin_required() {
|
||||
SPINE_CHECK(get_spine_object(), false)
|
||||
return get_spine_object()->isSkinRequired();
|
||||
}
|
||||
|
||||
void SpineConstraintData::set_skin_required(bool v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setSkinRequired(v);
|
||||
return get_spine_object()->getSkinRequired();
|
||||
}
|
||||
|
||||
@ -60,32 +60,32 @@ float SpineEvent::get_time() {
|
||||
|
||||
int SpineEvent::get_int_value() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getIntValue();
|
||||
return get_spine_object()->getInt();
|
||||
}
|
||||
|
||||
void SpineEvent::set_int_value(int v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setIntValue(v);
|
||||
get_spine_object()->setInt(v);
|
||||
}
|
||||
|
||||
float SpineEvent::get_float_value() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getFloatValue();
|
||||
return get_spine_object()->getFloat();
|
||||
}
|
||||
|
||||
void SpineEvent::set_float_value(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setFloatValue(v);
|
||||
get_spine_object()->setFloat(v);
|
||||
}
|
||||
|
||||
String SpineEvent::get_string_value() {
|
||||
SPINE_CHECK(get_spine_object(), "")
|
||||
return get_spine_object()->getStringValue().buffer();
|
||||
return get_spine_object()->getString().buffer();
|
||||
}
|
||||
|
||||
void SpineEvent::set_string_value(const String &v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setStringValue(spine::String(v.utf8()));
|
||||
get_spine_object()->setString(spine::String(v.utf8()));
|
||||
}
|
||||
|
||||
float SpineEvent::get_volume() {
|
||||
|
||||
@ -55,32 +55,32 @@ String SpineEventData::get_event_name() {
|
||||
|
||||
int SpineEventData::get_int_value() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getIntValue();
|
||||
return get_spine_object()->getInt();
|
||||
}
|
||||
|
||||
void SpineEventData::set_int_value(int v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setIntValue(v);
|
||||
get_spine_object()->setInt(v);
|
||||
}
|
||||
|
||||
float SpineEventData::get_float_value() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getFloatValue();
|
||||
return get_spine_object()->getFloat();
|
||||
}
|
||||
|
||||
void SpineEventData::set_float_value(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setFloatValue(v);
|
||||
get_spine_object()->setFloat(v);
|
||||
}
|
||||
|
||||
String SpineEventData::get_string_value() {
|
||||
SPINE_CHECK(get_spine_object(), "")
|
||||
return get_spine_object()->getStringValue().buffer();
|
||||
return get_spine_object()->getString().buffer();
|
||||
}
|
||||
|
||||
void SpineEventData::set_string_value(const String &v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setStringValue(spine::String(v.utf8()));
|
||||
get_spine_object()->setString(spine::String(v.utf8()));
|
||||
}
|
||||
|
||||
String SpineEventData::get_audio_path() {
|
||||
|
||||
@ -33,8 +33,7 @@
|
||||
#include "SpineSprite.h"
|
||||
|
||||
void SpineIkConstraint::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("update"), &SpineIkConstraint::update);
|
||||
ClassDB::bind_method(D_METHOD("get_order"), &SpineIkConstraint::get_order);
|
||||
ClassDB::bind_method(D_METHOD("update", "skeleton"), &SpineIkConstraint::update);
|
||||
ClassDB::bind_method(D_METHOD("get_data"), &SpineIkConstraint::get_data);
|
||||
ClassDB::bind_method(D_METHOD("get_bones"), &SpineIkConstraint::get_bones);
|
||||
ClassDB::bind_method(D_METHOD("get_target"), &SpineIkConstraint::get_target);
|
||||
@ -53,14 +52,9 @@ void SpineIkConstraint::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_active", "v"), &SpineIkConstraint::set_active);
|
||||
}
|
||||
|
||||
void SpineIkConstraint::update() {
|
||||
void SpineIkConstraint::update(Ref<SpineSkeleton> skeleton) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->update(spine::Physics_Update);
|
||||
}
|
||||
|
||||
int SpineIkConstraint::get_order() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getOrder();
|
||||
get_spine_object()->update(*skeleton->get_spine_object(), spine::Physics_Update);
|
||||
}
|
||||
|
||||
Ref<SpineIkConstraintData> SpineIkConstraint::get_data() {
|
||||
@ -87,7 +81,7 @@ Array SpineIkConstraint::get_bones() {
|
||||
|
||||
Ref<SpineBone> SpineIkConstraint::get_target() {
|
||||
SPINE_CHECK(get_spine_object(), nullptr)
|
||||
auto target = get_spine_object()->getTarget();
|
||||
auto target = &get_spine_object()->getTarget();
|
||||
if (!target) return nullptr;
|
||||
Ref<SpineBone> target_ref(memnew(SpineBone));
|
||||
target_ref->set_spine_object(get_spine_owner(), target);
|
||||
@ -96,56 +90,58 @@ Ref<SpineBone> SpineIkConstraint::get_target() {
|
||||
|
||||
void SpineIkConstraint::set_target(Ref<SpineBone> v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setTarget(v.is_valid() && v->get_spine_object() ? v->get_spine_object() : nullptr);
|
||||
if (v.is_valid() && v->get_spine_object()) {
|
||||
get_spine_object()->setTarget(*v->get_spine_object());
|
||||
}
|
||||
}
|
||||
|
||||
int SpineIkConstraint::get_bend_direction() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getBendDirection();
|
||||
return get_spine_object()->getPose().getBendDirection();
|
||||
}
|
||||
|
||||
void SpineIkConstraint::set_bend_direction(int v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setBendDirection(v);
|
||||
get_spine_object()->getPose().setBendDirection(v);
|
||||
}
|
||||
|
||||
bool SpineIkConstraint::get_compress() {
|
||||
SPINE_CHECK(get_spine_object(), false)
|
||||
return get_spine_object()->getCompress();
|
||||
return get_spine_object()->getPose().getCompress();
|
||||
}
|
||||
|
||||
void SpineIkConstraint::set_compress(bool v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setCompress(v);
|
||||
get_spine_object()->getPose().setCompress(v);
|
||||
}
|
||||
|
||||
bool SpineIkConstraint::get_stretch() {
|
||||
SPINE_CHECK(get_spine_object(), false)
|
||||
return get_spine_object()->getStretch();
|
||||
return get_spine_object()->getPose().getStretch();
|
||||
}
|
||||
|
||||
void SpineIkConstraint::set_stretch(bool v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setStretch(v);
|
||||
get_spine_object()->getPose().setStretch(v);
|
||||
}
|
||||
|
||||
float SpineIkConstraint::get_mix() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getMix();
|
||||
return get_spine_object()->getPose().getMix();
|
||||
}
|
||||
void SpineIkConstraint::set_mix(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setMix(v);
|
||||
get_spine_object()->getPose().setMix(v);
|
||||
}
|
||||
|
||||
float SpineIkConstraint::get_softness() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getSoftness();
|
||||
return get_spine_object()->getPose().getSoftness();
|
||||
}
|
||||
|
||||
void SpineIkConstraint::set_softness(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setSoftness(v);
|
||||
get_spine_object()->getPose().setSoftness(v);
|
||||
}
|
||||
|
||||
bool SpineIkConstraint::is_active() {
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
|
||||
#include "SpineIkConstraintData.h"
|
||||
#include <spine/IkConstraint.h>
|
||||
#include "SpineSkeleton.h"
|
||||
|
||||
class SpineBone;
|
||||
class SpineSprite;
|
||||
@ -42,9 +43,7 @@ protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void update();
|
||||
|
||||
int get_order();
|
||||
void update(Ref<SpineSkeleton> skeleton);
|
||||
|
||||
Ref<SpineIkConstraintData> get_data();
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ Array SpineIkConstraintData::get_bones() {
|
||||
|
||||
Ref<SpineBoneData> SpineIkConstraintData::get_target() {
|
||||
SPINE_CHECK(get_spine_object(), nullptr)
|
||||
auto target = get_spine_constraint_data()->getTarget();
|
||||
auto target = &get_spine_constraint_data()->getTarget();
|
||||
if (!target) return nullptr;
|
||||
Ref<SpineBoneData> target_ref(memnew(SpineBoneData));
|
||||
target_ref->set_spine_object(get_spine_owner(), target);
|
||||
@ -72,37 +72,39 @@ Ref<SpineBoneData> SpineIkConstraintData::get_target() {
|
||||
|
||||
void SpineIkConstraintData::set_target(Ref<SpineBoneData> v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_constraint_data()->setTarget(v.is_valid() && v->get_spine_object() ? v->get_spine_object() : nullptr);
|
||||
if (v.is_valid() && v->get_spine_object()) {
|
||||
get_spine_constraint_data()->setTarget(*v->get_spine_object());
|
||||
}
|
||||
}
|
||||
|
||||
int SpineIkConstraintData::get_bend_direction() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_constraint_data()->getBendDirection();
|
||||
return get_spine_constraint_data()->getSetupPose().getBendDirection();
|
||||
}
|
||||
|
||||
void SpineIkConstraintData::set_bend_direction(int v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_constraint_data()->setBendDirection(v);
|
||||
get_spine_constraint_data()->getSetupPose().setBendDirection(v);
|
||||
}
|
||||
|
||||
bool SpineIkConstraintData::get_compress() {
|
||||
SPINE_CHECK(get_spine_object(), false)
|
||||
return get_spine_constraint_data()->getCompress();
|
||||
return get_spine_constraint_data()->getSetupPose().getCompress();
|
||||
}
|
||||
|
||||
void SpineIkConstraintData::set_compress(bool v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_constraint_data()->setCompress(v);
|
||||
get_spine_constraint_data()->getSetupPose().setCompress(v);
|
||||
}
|
||||
|
||||
bool SpineIkConstraintData::get_stretch() {
|
||||
SPINE_CHECK(get_spine_object(), false)
|
||||
return get_spine_constraint_data()->getStretch();
|
||||
return get_spine_constraint_data()->getSetupPose().getStretch();
|
||||
}
|
||||
|
||||
void SpineIkConstraintData::set_stretch(bool v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_constraint_data()->setStretch(v);
|
||||
get_spine_constraint_data()->getSetupPose().setStretch(v);
|
||||
}
|
||||
|
||||
bool SpineIkConstraintData::get_uniform() {
|
||||
@ -117,20 +119,20 @@ void SpineIkConstraintData::set_uniform(bool v) {
|
||||
|
||||
float SpineIkConstraintData::get_mix() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_constraint_data()->getMix();
|
||||
return get_spine_constraint_data()->getSetupPose().getMix();
|
||||
}
|
||||
|
||||
void SpineIkConstraintData::set_mix(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_constraint_data()->setMix(v);
|
||||
get_spine_constraint_data()->getSetupPose().setMix(v);
|
||||
}
|
||||
|
||||
float SpineIkConstraintData::get_softness() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_constraint_data()->getSoftness();
|
||||
return get_spine_constraint_data()->getSetupPose().getSoftness();
|
||||
}
|
||||
|
||||
void SpineIkConstraintData::set_softness(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_constraint_data()->setSoftness(v);
|
||||
get_spine_constraint_data()->getSetupPose().setSoftness(v);
|
||||
}
|
||||
|
||||
@ -33,8 +33,7 @@
|
||||
#include "SpineSprite.h"
|
||||
|
||||
void SpinePathConstraint::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("update"), &SpinePathConstraint::update);
|
||||
ClassDB::bind_method(D_METHOD("get_order"), &SpinePathConstraint::get_order);
|
||||
ClassDB::bind_method(D_METHOD("update", "skeleton"), &SpinePathConstraint::update);
|
||||
ClassDB::bind_method(D_METHOD("get_position"), &SpinePathConstraint::get_position);
|
||||
ClassDB::bind_method(D_METHOD("set_position", "v"), &SpinePathConstraint::set_position);
|
||||
ClassDB::bind_method(D_METHOD("get_spacing"), &SpinePathConstraint::get_spacing);
|
||||
@ -46,71 +45,66 @@ void SpinePathConstraint::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_mix_y"), &SpinePathConstraint::get_mix_y);
|
||||
ClassDB::bind_method(D_METHOD("set_mix_y", "v"), &SpinePathConstraint::set_mix_y);
|
||||
ClassDB::bind_method(D_METHOD("get_bones"), &SpinePathConstraint::get_bones);
|
||||
ClassDB::bind_method(D_METHOD("get_target"), &SpinePathConstraint::get_target);
|
||||
ClassDB::bind_method(D_METHOD("set_target", "v"), &SpinePathConstraint::set_target);
|
||||
ClassDB::bind_method(D_METHOD("get_slot"), &SpinePathConstraint::get_slot);
|
||||
ClassDB::bind_method(D_METHOD("set_slot", "v"), &SpinePathConstraint::set_slot);
|
||||
ClassDB::bind_method(D_METHOD("get_data"), &SpinePathConstraint::get_data);
|
||||
ClassDB::bind_method(D_METHOD("is_active"), &SpinePathConstraint::is_active);
|
||||
ClassDB::bind_method(D_METHOD("set_active", "v"), &SpinePathConstraint::set_active);
|
||||
}
|
||||
|
||||
void SpinePathConstraint::update() {
|
||||
void SpinePathConstraint::update(Ref<SpineSkeleton> skeleton) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->update(spine::Physics_Update);
|
||||
}
|
||||
|
||||
int SpinePathConstraint::get_order() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getOrder();
|
||||
get_spine_object()->update(*skeleton->get_spine_object(), spine::Physics_Update);
|
||||
}
|
||||
|
||||
float SpinePathConstraint::get_position() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getPosition();
|
||||
return get_spine_object()->getPose().getPosition();
|
||||
}
|
||||
|
||||
void SpinePathConstraint::set_position(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setPosition(v);
|
||||
get_spine_object()->getPose().setPosition(v);
|
||||
}
|
||||
|
||||
float SpinePathConstraint::get_spacing() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getSpacing();
|
||||
return get_spine_object()->getPose().getSpacing();
|
||||
}
|
||||
|
||||
void SpinePathConstraint::set_spacing(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setSpacing(v);
|
||||
get_spine_object()->getPose().setSpacing(v);
|
||||
}
|
||||
|
||||
float SpinePathConstraint::get_mix_rotate() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getMixRotate();
|
||||
return get_spine_object()->getPose().getMixRotate();
|
||||
}
|
||||
|
||||
void SpinePathConstraint::set_mix_rotate(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setMixRotate(v);
|
||||
get_spine_object()->getPose().setMixRotate(v);
|
||||
}
|
||||
|
||||
float SpinePathConstraint::get_mix_x() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getMixX();
|
||||
return get_spine_object()->getPose().getMixX();
|
||||
}
|
||||
|
||||
void SpinePathConstraint::set_mix_x(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setMixX(v);
|
||||
get_spine_object()->getPose().setMixX(v);
|
||||
}
|
||||
|
||||
float SpinePathConstraint::get_mix_y() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getMixY();
|
||||
return get_spine_object()->getPose().getMixY();
|
||||
}
|
||||
|
||||
void SpinePathConstraint::set_mix_y(float v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setMixY(v);
|
||||
get_spine_object()->getPose().setMixY(v);
|
||||
}
|
||||
|
||||
Array SpinePathConstraint::get_bones() {
|
||||
@ -127,18 +121,20 @@ Array SpinePathConstraint::get_bones() {
|
||||
return result;
|
||||
}
|
||||
|
||||
Ref<SpineSlot> SpinePathConstraint::get_target() {
|
||||
Ref<SpineSlot> SpinePathConstraint::get_slot() {
|
||||
SPINE_CHECK(get_spine_object(), nullptr)
|
||||
auto target = get_spine_object()->getTarget();
|
||||
auto target = &get_spine_object()->getSlot();
|
||||
if (!target) return nullptr;
|
||||
Ref<SpineSlot> target_ref(memnew(SpineSlot));
|
||||
target_ref->set_spine_object(get_spine_owner(), target);
|
||||
return target_ref;
|
||||
}
|
||||
|
||||
void SpinePathConstraint::set_target(Ref<SpineSlot> v) {
|
||||
void SpinePathConstraint::set_slot(Ref<SpineSlot> v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setTarget(v.is_valid() && v->get_spine_object() ? v->get_spine_object() : nullptr);
|
||||
if (v.is_valid() && v->get_spine_object()) {
|
||||
get_spine_object()->setSlot(*v->get_spine_object());
|
||||
}
|
||||
}
|
||||
|
||||
Ref<SpinePathConstraintData> SpinePathConstraint::get_data() {
|
||||
|
||||
@ -40,9 +40,7 @@ protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void update();
|
||||
|
||||
int get_order();
|
||||
void update(Ref<SpineSkeleton> skeleton);
|
||||
|
||||
float get_position();
|
||||
|
||||
@ -66,9 +64,9 @@ public:
|
||||
|
||||
Array get_bones();
|
||||
|
||||
Ref<SpineSlot> get_target();
|
||||
Ref<SpineSlot> get_slot();
|
||||
|
||||
void set_target(Ref<SpineSlot> v);
|
||||
void set_slot(Ref<SpineSlot> v);
|
||||
|
||||
Ref<SpinePathConstraintData> get_data();
|
||||
|
||||
|
||||
@ -33,8 +33,8 @@
|
||||
|
||||
void SpinePathConstraintData::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_bones"), &SpinePathConstraintData::get_bones);
|
||||
ClassDB::bind_method(D_METHOD("get_target"), &SpinePathConstraintData::get_target);
|
||||
ClassDB::bind_method(D_METHOD("set_target", "v"), &SpinePathConstraintData::set_target);
|
||||
ClassDB::bind_method(D_METHOD("get_slot"), &SpinePathConstraintData::get_slot);
|
||||
ClassDB::bind_method(D_METHOD("set_slot", "v"), &SpinePathConstraintData::set_slot);
|
||||
ClassDB::bind_method(D_METHOD("get_position_mode"), &SpinePathConstraintData::get_position_mode);
|
||||
ClassDB::bind_method(D_METHOD("set_position_mode", "v"), &SpinePathConstraintData::set_position_mode);
|
||||
ClassDB::bind_method(D_METHOD("get_spacing_mode"), &SpinePathConstraintData::get_spacing_mode);
|
||||
@ -68,18 +68,20 @@ Array SpinePathConstraintData::get_bones() {
|
||||
return result;
|
||||
}
|
||||
|
||||
Ref<SpineSlotData> SpinePathConstraintData::get_target() {
|
||||
Ref<SpineSlotData> SpinePathConstraintData::get_slot() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), nullptr)
|
||||
auto slot = get_spine_constraint_data()->getTarget();
|
||||
auto slot = &get_spine_constraint_data()->getSlot();
|
||||
if (!slot) return nullptr;
|
||||
Ref<SpineSlotData> slot_ref(memnew(SpineSlotData));
|
||||
slot_ref->set_spine_object(get_spine_owner(), slot);
|
||||
return slot_ref;
|
||||
}
|
||||
|
||||
void SpinePathConstraintData::set_target(Ref<SpineSlotData> v) {
|
||||
void SpinePathConstraintData::set_slot(Ref<SpineSlotData> v) {
|
||||
SPINE_CHECK(get_spine_constraint_data(), )
|
||||
get_spine_constraint_data()->setTarget(v.is_valid() && v->get_spine_object() ? v->get_spine_object() : nullptr);
|
||||
if (v.is_valid() && v->get_spine_object()) {
|
||||
get_spine_constraint_data()->setSlot(*v->get_spine_object());
|
||||
}
|
||||
}
|
||||
|
||||
SpineConstant::PositionMode SpinePathConstraintData::get_position_mode() {
|
||||
@ -124,50 +126,50 @@ void SpinePathConstraintData::set_offset_rotation(float v) {
|
||||
|
||||
float SpinePathConstraintData::get_position() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getPosition();
|
||||
return get_spine_constraint_data()->getSetupPose().getPosition();
|
||||
}
|
||||
|
||||
void SpinePathConstraintData::set_position(float v) {
|
||||
SPINE_CHECK(get_spine_constraint_data(), )
|
||||
get_spine_constraint_data()->setPosition(v);
|
||||
get_spine_constraint_data()->getSetupPose().setPosition(v);
|
||||
}
|
||||
|
||||
float SpinePathConstraintData::get_spacing() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getSpacing();
|
||||
return get_spine_constraint_data()->getSetupPose().getSpacing();
|
||||
}
|
||||
|
||||
void SpinePathConstraintData::set_spacing(float v) {
|
||||
SPINE_CHECK(get_spine_constraint_data(), )
|
||||
get_spine_constraint_data()->setSpacing(v);
|
||||
get_spine_constraint_data()->getSetupPose().setSpacing(v);
|
||||
}
|
||||
|
||||
float SpinePathConstraintData::get_mix_rotate() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getMixRotate();
|
||||
return get_spine_constraint_data()->getSetupPose().getMixRotate();
|
||||
}
|
||||
|
||||
void SpinePathConstraintData::set_mix_rotate(float v) {
|
||||
SPINE_CHECK(get_spine_constraint_data(), )
|
||||
get_spine_constraint_data()->setMixRotate(v);
|
||||
get_spine_constraint_data()->getSetupPose().setMixRotate(v);
|
||||
}
|
||||
|
||||
float SpinePathConstraintData::get_mix_x() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getMixX();
|
||||
return get_spine_constraint_data()->getSetupPose().getMixX();
|
||||
}
|
||||
|
||||
void SpinePathConstraintData::set_mix_x(float v) {
|
||||
SPINE_CHECK(get_spine_constraint_data(), )
|
||||
get_spine_constraint_data()->setMixX(v);
|
||||
get_spine_constraint_data()->getSetupPose().setMixX(v);
|
||||
}
|
||||
|
||||
float SpinePathConstraintData::get_mix_y() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getMixY();
|
||||
return get_spine_constraint_data()->getSetupPose().getMixY();
|
||||
}
|
||||
|
||||
void SpinePathConstraintData::set_mix_y(float v) {
|
||||
SPINE_CHECK(get_spine_constraint_data(), )
|
||||
get_spine_constraint_data()->setMixY(v);
|
||||
get_spine_constraint_data()->getSetupPose().setMixY(v);
|
||||
}
|
||||
|
||||
@ -48,9 +48,9 @@ protected:
|
||||
public:
|
||||
Array get_bones();
|
||||
|
||||
Ref<SpineSlotData> get_target();
|
||||
Ref<SpineSlotData> get_slot();
|
||||
|
||||
void set_target(Ref<SpineSlotData> v);
|
||||
void set_slot(Ref<SpineSlotData> v);
|
||||
|
||||
SpineConstant::PositionMode get_position_mode();
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#include "SpineSprite.h"
|
||||
|
||||
void SpinePhysicsConstraint::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("update", "physics"), &SpinePhysicsConstraint::update);
|
||||
ClassDB::bind_method(D_METHOD("update", "skeleton", "physics"), &SpinePhysicsConstraint::update);
|
||||
ClassDB::bind_method(D_METHOD("get_bone"), &SpinePhysicsConstraint::get_bone);
|
||||
ClassDB::bind_method(D_METHOD("set_inertia", "value"), &SpinePhysicsConstraint::set_inertia);
|
||||
ClassDB::bind_method(D_METHOD("get_inertia"), &SpinePhysicsConstraint::get_inertia);
|
||||
@ -48,50 +48,14 @@ void SpinePhysicsConstraint::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_gravity"), &SpinePhysicsConstraint::get_gravity);
|
||||
ClassDB::bind_method(D_METHOD("set_mix", "value"), &SpinePhysicsConstraint::set_mix);
|
||||
ClassDB::bind_method(D_METHOD("get_mix"), &SpinePhysicsConstraint::get_mix);
|
||||
ClassDB::bind_method(D_METHOD("set_reset", "value"), &SpinePhysicsConstraint::set_reset);
|
||||
ClassDB::bind_method(D_METHOD("get_reset"), &SpinePhysicsConstraint::get_reset);
|
||||
ClassDB::bind_method(D_METHOD("set_ux", "value"), &SpinePhysicsConstraint::set_ux);
|
||||
ClassDB::bind_method(D_METHOD("get_ux"), &SpinePhysicsConstraint::get_ux);
|
||||
ClassDB::bind_method(D_METHOD("set_uy", "value"), &SpinePhysicsConstraint::set_uy);
|
||||
ClassDB::bind_method(D_METHOD("get_uy"), &SpinePhysicsConstraint::get_uy);
|
||||
ClassDB::bind_method(D_METHOD("set_cx", "value"), &SpinePhysicsConstraint::set_cx);
|
||||
ClassDB::bind_method(D_METHOD("get_cx"), &SpinePhysicsConstraint::get_cx);
|
||||
ClassDB::bind_method(D_METHOD("set_cy", "value"), &SpinePhysicsConstraint::set_cy);
|
||||
ClassDB::bind_method(D_METHOD("get_cy"), &SpinePhysicsConstraint::get_cy);
|
||||
ClassDB::bind_method(D_METHOD("set_tx", "value"), &SpinePhysicsConstraint::set_tx);
|
||||
ClassDB::bind_method(D_METHOD("get_tx"), &SpinePhysicsConstraint::get_tx);
|
||||
ClassDB::bind_method(D_METHOD("set_ty", "value"), &SpinePhysicsConstraint::set_ty);
|
||||
ClassDB::bind_method(D_METHOD("get_ty"), &SpinePhysicsConstraint::get_ty);
|
||||
ClassDB::bind_method(D_METHOD("set_x_offset", "value"), &SpinePhysicsConstraint::set_x_offset);
|
||||
ClassDB::bind_method(D_METHOD("get_x_offset"), &SpinePhysicsConstraint::get_x_offset);
|
||||
ClassDB::bind_method(D_METHOD("set_x_velocity", "value"), &SpinePhysicsConstraint::set_x_velocity);
|
||||
ClassDB::bind_method(D_METHOD("get_x_velocity"), &SpinePhysicsConstraint::get_x_velocity);
|
||||
ClassDB::bind_method(D_METHOD("set_y_offset", "value"), &SpinePhysicsConstraint::set_y_offset);
|
||||
ClassDB::bind_method(D_METHOD("get_y_offset"), &SpinePhysicsConstraint::get_y_offset);
|
||||
ClassDB::bind_method(D_METHOD("set_y_velocity", "value"), &SpinePhysicsConstraint::set_y_velocity);
|
||||
ClassDB::bind_method(D_METHOD("get_y_velocity"), &SpinePhysicsConstraint::get_y_velocity);
|
||||
ClassDB::bind_method(D_METHOD("set_rotate_offset", "value"), &SpinePhysicsConstraint::set_rotate_offset);
|
||||
ClassDB::bind_method(D_METHOD("get_rotate_offset"), &SpinePhysicsConstraint::get_rotate_offset);
|
||||
ClassDB::bind_method(D_METHOD("set_rotate_velocity", "value"), &SpinePhysicsConstraint::set_rotate_velocity);
|
||||
ClassDB::bind_method(D_METHOD("get_rotate_velocity"), &SpinePhysicsConstraint::get_rotate_velocity);
|
||||
ClassDB::bind_method(D_METHOD("set_scale_offset", "value"), &SpinePhysicsConstraint::set_scale_offset);
|
||||
ClassDB::bind_method(D_METHOD("get_scale_offset"), &SpinePhysicsConstraint::get_scale_offset);
|
||||
ClassDB::bind_method(D_METHOD("set_scale_velocity", "value"), &SpinePhysicsConstraint::set_scale_velocity);
|
||||
ClassDB::bind_method(D_METHOD("get_scale_velocity"), &SpinePhysicsConstraint::get_scale_velocity);
|
||||
ClassDB::bind_method(D_METHOD("set_active", "value"), &SpinePhysicsConstraint::set_active);
|
||||
ClassDB::bind_method(D_METHOD("is_active"), &SpinePhysicsConstraint::is_active);
|
||||
ClassDB::bind_method(D_METHOD("set_remaining", "value"), &SpinePhysicsConstraint::set_remaining);
|
||||
ClassDB::bind_method(D_METHOD("get_remaining"), &SpinePhysicsConstraint::get_remaining);
|
||||
ClassDB::bind_method(D_METHOD("set_last_Time", "value"), &SpinePhysicsConstraint::set_last_Time);
|
||||
ClassDB::bind_method(D_METHOD("get_last_Time"), &SpinePhysicsConstraint::get_last_Time);
|
||||
ClassDB::bind_method(D_METHOD("reset"), &SpinePhysicsConstraint::reset);
|
||||
ClassDB::bind_method(D_METHOD("reset", "skeleton"), &SpinePhysicsConstraint::reset);
|
||||
ClassDB::bind_method(D_METHOD("translate", "x", "y"), &SpinePhysicsConstraint::translate);
|
||||
ClassDB::bind_method(D_METHOD("rotate", "x", "y", "degrees"), &SpinePhysicsConstraint::rotate);
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::update(SpineConstant::Physics physics) {
|
||||
void SpinePhysicsConstraint::update(Ref<SpineSkeleton> skeleton, SpineConstant::Physics physics) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->update((spine::Physics) physics);
|
||||
get_spine_object()->update(*skeleton->get_spine_object(), (spine::Physics) physics);
|
||||
}
|
||||
|
||||
Ref<SpinePhysicsConstraintData> SpinePhysicsConstraint::get_data() {
|
||||
@ -104,7 +68,7 @@ Ref<SpinePhysicsConstraintData> SpinePhysicsConstraint::get_data() {
|
||||
|
||||
Ref<SpineBone> SpinePhysicsConstraint::get_bone() {
|
||||
SPINE_CHECK(get_spine_object(), nullptr)
|
||||
auto target = get_spine_object()->getBone();
|
||||
auto target = &get_spine_object()->getBone();
|
||||
if (!target) return nullptr;
|
||||
Ref<SpineBone> target_ref(memnew(SpineBone));
|
||||
target_ref->set_spine_object(get_spine_owner(), target);
|
||||
@ -113,262 +77,84 @@ Ref<SpineBone> SpinePhysicsConstraint::get_bone() {
|
||||
|
||||
void SpinePhysicsConstraint::set_bone(Ref<SpineBone> v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setBone(v.is_valid() && v->get_spine_object() ? v->get_spine_object() : nullptr);
|
||||
if (v.is_valid() && v->get_spine_object()) {
|
||||
get_spine_object()->setBone(v->get_spine_object());
|
||||
}
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_inertia(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setInertia(value);
|
||||
get_spine_object()->getPose().setInertia(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_inertia() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getInertia();
|
||||
return get_spine_object()->getPose().getInertia();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_strength(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setStrength(value);
|
||||
get_spine_object()->getPose().setStrength(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_strength() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getStrength();
|
||||
return get_spine_object()->getPose().getStrength();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_damping(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setDamping(value);
|
||||
get_spine_object()->getPose().setDamping(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_damping() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getDamping();
|
||||
return get_spine_object()->getPose().getDamping();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_mass_inverse(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setMassInverse(value);
|
||||
get_spine_object()->getPose().setMassInverse(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_mass_inverse() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getMassInverse();
|
||||
return get_spine_object()->getPose().getMassInverse();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_wind(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setWind(value);
|
||||
get_spine_object()->getPose().setWind(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_wind() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getWind();
|
||||
return get_spine_object()->getPose().getWind();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_gravity(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setGravity(value);
|
||||
get_spine_object()->getPose().setGravity(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_gravity() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getGravity();
|
||||
return get_spine_object()->getPose().getGravity();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_mix(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setMix(value);
|
||||
get_spine_object()->getPose().setMix(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_mix() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getMix();
|
||||
return get_spine_object()->getPose().getMix();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_reset(bool value) {
|
||||
void SpinePhysicsConstraint::reset(Ref<SpineSkeleton> skeleton) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setReset(value);
|
||||
}
|
||||
|
||||
bool SpinePhysicsConstraint::get_reset() {
|
||||
SPINE_CHECK(get_spine_object(), false)
|
||||
return get_spine_object()->getReset();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_ux(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setUx(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_ux() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getUx();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_uy(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setUy(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_uy() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getUy();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_cx(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setCx(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_cx() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getCx();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_cy(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setCy(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_cy() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getCy();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_tx(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setTx(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_tx() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getTx();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_ty(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setTy(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_ty() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getTy();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_x_offset(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setXOffset(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_x_offset() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getXOffset();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_x_velocity(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setXVelocity(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_x_velocity() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getXVelocity();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_y_offset(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setYOffset(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_y_offset() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getYOffset();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_y_velocity(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setYVelocity(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_y_velocity() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getYVelocity();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_rotate_offset(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setRotateOffset(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_rotate_offset() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getRotateOffset();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_rotate_velocity(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setRotateVelocity(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_rotate_velocity() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getRotateVelocity();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_scale_offset(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setScaleOffset(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_scale_offset() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getScaleOffset();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_scale_velocity(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setScaleVelocity(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_scale_velocity() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getScaleVelocity();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_active(bool value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setActive(value);
|
||||
}
|
||||
|
||||
bool SpinePhysicsConstraint::is_active() {
|
||||
SPINE_CHECK(get_spine_object(), false)
|
||||
return get_spine_object()->isActive();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_remaining(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setRemaining(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_remaining() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getRemaining();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::set_last_Time(float value) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setLastTime(value);
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraint::get_last_Time() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getLastTime();
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::reset() {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->reset();
|
||||
get_spine_object()->reset(*skeleton->get_spine_object());
|
||||
}
|
||||
|
||||
void SpinePhysicsConstraint::translate(float x, float y) {
|
||||
|
||||
@ -41,7 +41,7 @@ protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void update(SpineConstant::Physics physics);
|
||||
void update(Ref<SpineSkeleton> skeleton, SpineConstant::Physics physics);
|
||||
|
||||
Ref<SpinePhysicsConstraintData> get_data();
|
||||
|
||||
@ -70,61 +70,7 @@ public:
|
||||
void set_mix(float value);
|
||||
float get_mix();
|
||||
|
||||
void set_reset(bool value);
|
||||
bool get_reset();
|
||||
|
||||
void set_ux(float value);
|
||||
float get_ux();
|
||||
|
||||
void set_uy(float value);
|
||||
float get_uy();
|
||||
|
||||
void set_cx(float value);
|
||||
float get_cx();
|
||||
|
||||
void set_cy(float value);
|
||||
float get_cy();
|
||||
|
||||
void set_tx(float value);
|
||||
float get_tx();
|
||||
|
||||
void set_ty(float value);
|
||||
float get_ty();
|
||||
|
||||
void set_x_offset(float value);
|
||||
float get_x_offset();
|
||||
|
||||
void set_x_velocity(float value);
|
||||
float get_x_velocity();
|
||||
|
||||
void set_y_offset(float value);
|
||||
float get_y_offset();
|
||||
|
||||
void set_y_velocity(float value);
|
||||
float get_y_velocity();
|
||||
|
||||
void set_rotate_offset(float value);
|
||||
float get_rotate_offset();
|
||||
|
||||
void set_rotate_velocity(float value);
|
||||
float get_rotate_velocity();
|
||||
|
||||
void set_scale_offset(float value);
|
||||
float get_scale_offset();
|
||||
|
||||
void set_scale_velocity(float value);
|
||||
float get_scale_velocity();
|
||||
|
||||
void set_active(bool value);
|
||||
bool is_active();
|
||||
|
||||
void set_remaining(float value);
|
||||
float get_remaining();
|
||||
|
||||
void set_last_Time(float value);
|
||||
float get_last_Time();
|
||||
|
||||
void reset();
|
||||
void reset(Ref<SpineSkeleton> skeleton);
|
||||
|
||||
void translate(float x, float y);
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ void SpinePhysicsConstraintData::_bind_methods() {
|
||||
|
||||
Ref<SpineBoneData> SpinePhysicsConstraintData::get_bone() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), nullptr)
|
||||
auto bone = get_spine_constraint_data()->getBone();
|
||||
auto bone = &get_spine_constraint_data()->getBone();
|
||||
if (!bone) return nullptr;
|
||||
Ref<SpineBoneData> slot_ref(memnew(SpineBoneData));
|
||||
slot_ref->set_spine_object(get_spine_owner(), bone);
|
||||
@ -84,70 +84,70 @@ float SpinePhysicsConstraintData::get_step() {
|
||||
|
||||
float SpinePhysicsConstraintData::get_inertia() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getInertia();
|
||||
return get_spine_constraint_data()->getSetupPose().getInertia();
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraintData::get_strength() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getStrength();
|
||||
return get_spine_constraint_data()->getSetupPose().getStrength();
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraintData::get_damping() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getDamping();
|
||||
return get_spine_constraint_data()->getSetupPose().getDamping();
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraintData::get_mass_inverse() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getMassInverse();
|
||||
return get_spine_constraint_data()->getSetupPose().getMassInverse();
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraintData::get_wind() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getWind();
|
||||
return get_spine_constraint_data()->getSetupPose().getWind();
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraintData::get_gravity() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getGravity();
|
||||
return get_spine_constraint_data()->getSetupPose().getGravity();
|
||||
}
|
||||
|
||||
float SpinePhysicsConstraintData::get_mix() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), 0)
|
||||
return get_spine_constraint_data()->getMix();
|
||||
return get_spine_constraint_data()->getSetupPose().getMix();
|
||||
}
|
||||
|
||||
bool SpinePhysicsConstraintData::is_inertia_global() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), false)
|
||||
return get_spine_constraint_data()->isInertiaGlobal();
|
||||
return get_spine_constraint_data()->getInertiaGlobal();
|
||||
}
|
||||
|
||||
bool SpinePhysicsConstraintData::is_strength_global() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), false)
|
||||
return get_spine_constraint_data()->isStrengthGlobal();
|
||||
return get_spine_constraint_data()->getStrengthGlobal();
|
||||
}
|
||||
|
||||
bool SpinePhysicsConstraintData::is_damping_global() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), false)
|
||||
return get_spine_constraint_data()->isDampingGlobal();
|
||||
return get_spine_constraint_data()->getDampingGlobal();
|
||||
}
|
||||
|
||||
bool SpinePhysicsConstraintData::is_mass_global() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), false)
|
||||
return get_spine_constraint_data()->isMassGlobal();
|
||||
return get_spine_constraint_data()->getMassGlobal();
|
||||
}
|
||||
|
||||
bool SpinePhysicsConstraintData::is_wind_global() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), false)
|
||||
return get_spine_constraint_data()->isWindGlobal();
|
||||
return get_spine_constraint_data()->getWindGlobal();
|
||||
}
|
||||
|
||||
bool SpinePhysicsConstraintData::is_gravity_global() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), false)
|
||||
return get_spine_constraint_data()->isGravityGlobal();
|
||||
return get_spine_constraint_data()->getGravityGlobal();
|
||||
}
|
||||
|
||||
bool SpinePhysicsConstraintData::is_mix_global() {
|
||||
SPINE_CHECK(get_spine_constraint_data(), false)
|
||||
return get_spine_constraint_data()->isMixGlobal();
|
||||
return get_spine_constraint_data()->getMixGlobal();
|
||||
}
|
||||
|
||||
@ -54,6 +54,10 @@ class SpineSkeleton : public REFCOUNTED {
|
||||
friend class SpineAnimationTrack;
|
||||
friend class SpineBoneNode;
|
||||
friend class SpineSlotNode;
|
||||
friend class SpinePhysicsConstraint;
|
||||
friend class SpineIkConstraint;
|
||||
friend class SpineTransformConstraint;
|
||||
friend class SpinePathConstraint;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
@ -70,7 +74,7 @@ protected:
|
||||
private:
|
||||
spine::Skeleton *skeleton;
|
||||
SpineSprite *sprite;
|
||||
spine::Vector<float> bounds_vertex_buffer;
|
||||
spine::Array<float> bounds_vertex_buffer;
|
||||
Ref<SpineSkin> last_skin;
|
||||
|
||||
std::unordered_map<spine::Bone *, Ref<SpineBone>> _cached_bones;
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/io/resource_saver.h"
|
||||
#endif
|
||||
#include <spine/Vector.h>
|
||||
#include <spine/Array.h>
|
||||
|
||||
class SpineSkeletonFileResource : public Resource {
|
||||
GDCLASS(SpineSkeletonFileResource, Resource);
|
||||
|
||||
@ -95,7 +95,7 @@ void SpineSkin::remove_attachment(int slot_index, const String &name) {
|
||||
Array SpineSkin::find_names_for_slot(int slot_index) {
|
||||
Array result;
|
||||
SPINE_CHECK(get_spine_object(), result)
|
||||
spine::Vector<spine::String> names;
|
||||
spine::Array<spine::String> names;
|
||||
get_spine_object()->findNamesForSlot(slot_index, names);
|
||||
result.resize((int) names.size());
|
||||
for (int i = 0; i < names.size(); ++i) {
|
||||
@ -107,7 +107,7 @@ Array SpineSkin::find_names_for_slot(int slot_index) {
|
||||
Array SpineSkin::find_attachments_for_slot(int slot_index) {
|
||||
Array result;
|
||||
SPINE_CHECK(get_spine_object(), result)
|
||||
spine::Vector<spine::Attachment *> attachments;
|
||||
spine::Array<spine::Attachment *> attachments;
|
||||
get_spine_object()->findAttachmentsForSlot(slot_index, attachments);
|
||||
result.resize((int) attachments.size());
|
||||
for (int i = 0; i < attachments.size(); ++i) {
|
||||
@ -135,7 +135,7 @@ void SpineSkin::add_skin(Ref<SpineSkin> other) {
|
||||
ERR_PRINT("other is not a valid SpineSkin.");
|
||||
return;
|
||||
}
|
||||
get_spine_object()->addSkin(other->get_spine_object());
|
||||
get_spine_object()->addSkin(*other->get_spine_object());
|
||||
}
|
||||
|
||||
void SpineSkin::copy_skin(Ref<SpineSkin> other) {
|
||||
@ -144,7 +144,7 @@ void SpineSkin::copy_skin(Ref<SpineSkin> other) {
|
||||
ERR_PRINT("other is not a valid SpineSkin.");
|
||||
return;
|
||||
}
|
||||
get_spine_object()->copySkin(other->get_spine_object());
|
||||
get_spine_object()->copySkin(*other->get_spine_object());
|
||||
}
|
||||
|
||||
Array SpineSkin::get_attachments() {
|
||||
|
||||
@ -68,36 +68,36 @@ Ref<SpineBoneData> SpineSlotData::get_bone_data() {
|
||||
|
||||
Color SpineSlotData::get_color() {
|
||||
SPINE_CHECK(get_spine_object(), Color(0, 0, 0, 0))
|
||||
auto &color = get_spine_object()->getColor();
|
||||
auto &color = get_spine_object()->getSetupPose().getColor();
|
||||
return Color(color.r, color.g, color.b, color.a);
|
||||
}
|
||||
|
||||
void SpineSlotData::set_color(Color v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
auto &color = get_spine_object()->getColor();
|
||||
auto &color = get_spine_object()->getSetupPose().getColor();
|
||||
color.set(v.r, v.g, v.b, v.a);
|
||||
}
|
||||
|
||||
Color SpineSlotData::get_dark_color() {
|
||||
SPINE_CHECK(get_spine_object(), Color(0, 0, 0, 0))
|
||||
auto &color = get_spine_object()->getDarkColor();
|
||||
auto &color = get_spine_object()->getSetupPose().getDarkColor();
|
||||
return Color(color.r, color.g, color.b, color.a);
|
||||
}
|
||||
|
||||
void SpineSlotData::set_dark_color(Color v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
auto &color = get_spine_object()->getDarkColor();
|
||||
auto &color = get_spine_object()->getSetupPose().getDarkColor();
|
||||
color.set(v.r, v.g, v.b, v.a);
|
||||
}
|
||||
|
||||
bool SpineSlotData::has_dark_color() {
|
||||
SPINE_CHECK(get_spine_object(), false)
|
||||
return get_spine_object()->hasDarkColor();
|
||||
return get_spine_object()->getSetupPose().hasDarkColor();
|
||||
}
|
||||
|
||||
void SpineSlotData::set_has_dark_color(bool v) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->setHasDarkColor(v);
|
||||
get_spine_object()->getSetupPose().setHasDarkColor(v);
|
||||
}
|
||||
|
||||
String SpineSlotData::get_attachment_name() {
|
||||
|
||||
@ -159,7 +159,7 @@ protected:
|
||||
bool debug_clipping;
|
||||
Color debug_clipping_color;
|
||||
|
||||
spine::Vector<spine::Vector<SpineSlotNode *>> slot_nodes;
|
||||
spine::Array<spine::Array<SpineSlotNode *>> slot_nodes;
|
||||
Vector<SpineMesh2D *> mesh_instances;
|
||||
Ref<Material> normal_material;
|
||||
Ref<Material> additive_material;
|
||||
|
||||
@ -29,10 +29,11 @@
|
||||
|
||||
#include "SpineTransformConstraint.h"
|
||||
#include "SpineCommon.h"
|
||||
#include "SpineSkeleton.h"
|
||||
#include "SpineSprite.h"
|
||||
|
||||
void SpineTransformConstraint::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("update"), &SpineTransformConstraint::update);
|
||||
ClassDB::bind_method(D_METHOD("update", "skeleton"), &SpineTransformConstraint::update);
|
||||
ClassDB::bind_method(D_METHOD("get_data"), &SpineTransformConstraint::get_data);
|
||||
ClassDB::bind_method(D_METHOD("get_bones"), &SpineTransformConstraint::get_bones);
|
||||
ClassDB::bind_method(D_METHOD("get_target"), &SpineTransformConstraint::get_target);
|
||||
@ -53,14 +54,9 @@ void SpineTransformConstraint::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_active", "v"), &SpineTransformConstraint::set_active);
|
||||
}
|
||||
|
||||
void SpineTransformConstraint::update() {
|
||||
void SpineTransformConstraint::update(Ref<SpineSkeleton> skeleton) {
|
||||
SPINE_CHECK(get_spine_object(), )
|
||||
get_spine_object()->update(spine::Physics_Update);
|
||||
}
|
||||
|
||||
int SpineTransformConstraint::get_order() {
|
||||
SPINE_CHECK(get_spine_object(), 0)
|
||||
return get_spine_object()->getOrder();
|
||||
get_spine_object()->update(*skeleton->get_spine_object(), spine::Physics_Update);
|
||||
}
|
||||
|
||||
Ref<SpineTransformConstraintData> SpineTransformConstraint::get_data() {
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "SpineCommon.h"
|
||||
#include "SpineSkeleton.h"
|
||||
#include "SpineTransformConstraintData.h"
|
||||
#include "SpineBone.h"
|
||||
#include <spine/TransformConstraint.h>
|
||||
@ -41,9 +42,7 @@ protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void update();
|
||||
|
||||
int get_order();
|
||||
void update(Ref<SpineSkeleton> skeleton);
|
||||
|
||||
Ref<SpineTransformConstraintData> get_data();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user