[godot] Expose physics constraints, closes #2612

This commit is contained in:
Mario Zechner 2024-10-02 16:47:53 +02:00
parent 7897cffb3b
commit dbf0db5c10
3 changed files with 8 additions and 0 deletions

View File

@ -47,6 +47,7 @@ void SpineSkeleton::_bind_methods() {
ClassDB::bind_method(D_METHOD("find_ik_constraint", "constraint_name"), &SpineSkeleton::find_ik_constraint);
ClassDB::bind_method(D_METHOD("find_transform_constraint", "constraint_name"), &SpineSkeleton::find_transform_constraint);
ClassDB::bind_method(D_METHOD("find_path_constraint", "constraint_name"), &SpineSkeleton::find_path_constraint);
ClassDB::bind_method(D_METHOD("find_physics_constraint", "constraint_name"), &SpineSkeleton::find_physics_constraint);
ClassDB::bind_method(D_METHOD("get_bounds"), &SpineSkeleton::get_bounds);
ClassDB::bind_method(D_METHOD("get_root_bone"), &SpineSkeleton::get_root_bone);
ClassDB::bind_method(D_METHOD("get_data"), &SpineSkeleton::get_skeleton_data_res);

View File

@ -101,6 +101,8 @@ void SpineSkeletonDataResource::_bind_methods() {
&SpineSkeletonDataResource::find_transform_constraint);
ClassDB::bind_method(D_METHOD("find_path_constraint_data", "constraint_name"),
&SpineSkeletonDataResource::find_path_constraint);
ClassDB::bind_method(D_METHOD("find_physics_constraint_data", "constraint_name"),
&SpineSkeletonDataResource::find_physics_constraint);
ClassDB::bind_method(D_METHOD("get_skeleton_name"),
&SpineSkeletonDataResource::get_skeleton_name);
ClassDB::bind_method(D_METHOD("get_bones"),
@ -123,6 +125,8 @@ void SpineSkeletonDataResource::_bind_methods() {
&SpineSkeletonDataResource::get_transform_constraints);
ClassDB::bind_method(D_METHOD("get_path_constraints"),
&SpineSkeletonDataResource::get_path_constraints);
ClassDB::bind_method(D_METHOD("get_physics_constraints"),
&SpineSkeletonDataResource::get_physics_constraints);
ClassDB::bind_method(D_METHOD("get_x"), &SpineSkeletonDataResource::get_x);
ClassDB::bind_method(D_METHOD("get_y"), &SpineSkeletonDataResource::get_y);
ClassDB::bind_method(D_METHOD("get_width"),

View File

@ -48,6 +48,7 @@
#include "SpineIkConstraintData.h"
#include "SpineTransformConstraintData.h"
#include "SpinePathConstraintData.h"
#include "SpinePhysicsConstraintData.h"
#include "SpineTimeline.h"
#include "SpineConstant.h"
#include "SpineSlotNode.h"
@ -109,11 +110,13 @@ void register_spine_godot_types() {
GDREGISTER_CLASS(SpineIkConstraintData);
GDREGISTER_CLASS(SpineTransformConstraintData);
GDREGISTER_CLASS(SpinePathConstraintData);
GDREGISTER_CLASS(SpinePhysicsConstraintData);
GDREGISTER_CLASS(SpineBone);
GDREGISTER_CLASS(SpineSlot);
GDREGISTER_CLASS(SpineIkConstraint);
GDREGISTER_CLASS(SpinePathConstraint);
GDREGISTER_CLASS(SpineTransformConstraint);
GDREGISTER_CLASS(SpinePhysicsConstraint);
GDREGISTER_CLASS(SpineTimeline);
GDREGISTER_CLASS(SpineConstant);