Skip to content

Commit

Permalink
[godot] Expose physics constraints, closes #2612
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Oct 2, 2024
1 parent 7897cff commit dbf0db5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions spine-godot/spine_godot/SpineSkeleton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions spine-godot/spine_godot/SpineSkeletonDataResource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand Down
3 changes: 3 additions & 0 deletions spine-godot/spine_godot/register_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit dbf0db5

Please sign in to comment.