summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorTomasz Chabora <kobewi4e@gmail.com>2020-12-06 16:09:18 +0100
committerkobewi <kobewi4e@gmail.com>2022-09-18 13:08:54 +0200
commit882a4f890620df1b029bc5de0aa58c72dd087d61 (patch)
treef76e3fd1191c2f0376f43686db26228434090dfc /scene/3d
parent4ab3fdcda07bf700b33eb7c85f53826b2464c02f (diff)
Port remaining connections to callable_mp
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/skeleton_3d.cpp3
-rw-r--r--scene/3d/skeleton_3d.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp
index e04e1866db..85b2c5154b 100644
--- a/scene/3d/skeleton_3d.cpp
+++ b/scene/3d/skeleton_3d.cpp
@@ -45,7 +45,6 @@ void SkinReference::_skin_changed() {
}
void SkinReference::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_skin_changed"), &SkinReference::_skin_changed);
ClassDB::bind_method(D_METHOD("get_skeleton"), &SkinReference::get_skeleton);
ClassDB::bind_method(D_METHOD("get_skin"), &SkinReference::get_skin);
}
@@ -1007,7 +1006,7 @@ Ref<SkinReference> Skeleton3D::register_skin(const Ref<Skin> &p_skin) {
skin_bindings.insert(skin_ref.operator->());
- skin_ref->skin->connect("changed", Callable(skin_ref.operator->(), "_skin_changed"));
+ skin_ref->skin->connect("changed", callable_mp(skin_ref.operator->(), &SkinReference::_skin_changed));
_make_dirty(); // Skin needs to be updated, so update skeleton.
diff --git a/scene/3d/skeleton_3d.h b/scene/3d/skeleton_3d.h
index 5e49dfa1f4..c2e9cfcced 100644
--- a/scene/3d/skeleton_3d.h
+++ b/scene/3d/skeleton_3d.h
@@ -51,12 +51,14 @@ class SkinReference : public RefCounted {
uint64_t skeleton_version = 0;
Vector<uint32_t> skin_bone_indices;
uint32_t *skin_bone_indices_ptrs = nullptr;
- void _skin_changed();
protected:
static void _bind_methods();
public:
+ // Public for use with callable_mp.
+ void _skin_changed();
+
RID get_skeleton() const;
Ref<Skin> get_skin() const;
~SkinReference();