summaryrefslogtreecommitdiff
path: root/scene/3d/mesh_instance.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-28 17:19:08 +0100
committerGitHub <noreply@github.com>2020-02-28 17:19:08 +0100
commit324e5a60dd068cbbff9c433802f8ecb78cff3364 (patch)
tree41edf077bcafa3c959a417aa4700318d483ff680 /scene/3d/mesh_instance.cpp
parenta439131c2b06b3d452e5be13530b6d2caa72c1aa (diff)
parent32ccf306f9a820e2ac5811de7c12e99a736fdf05 (diff)
Merge pull request #36426 from akien-mga/calling-all-stations
Signals: Port connect calls to use callable_mp
Diffstat (limited to 'scene/3d/mesh_instance.cpp')
-rw-r--r--scene/3d/mesh_instance.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp
index 06e1202a24..a48d148d33 100644
--- a/scene/3d/mesh_instance.cpp
+++ b/scene/3d/mesh_instance.cpp
@@ -34,7 +34,6 @@
#include "core/core_string_names.h"
#include "physics_body.h"
#include "scene/resources/material.h"
-#include "scene/scene_string_names.h"
#include "skeleton.h"
bool MeshInstance::_set(const StringName &p_name, const Variant &p_value) {
@@ -112,7 +111,7 @@ void MeshInstance::set_mesh(const Ref<Mesh> &p_mesh) {
return;
if (mesh.is_valid()) {
- mesh->disconnect_compat(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_mesh_changed);
+ mesh->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &MeshInstance::_mesh_changed));
materials.clear();
}
@@ -129,7 +128,7 @@ void MeshInstance::set_mesh(const Ref<Mesh> &p_mesh) {
blend_shape_tracks["blend_shapes/" + String(mesh->get_blend_shape_name(i))] = mt;
}
- mesh->connect_compat(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_mesh_changed);
+ mesh->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &MeshInstance::_mesh_changed));
materials.resize(mesh->get_surface_count());
set_base(mesh->get_rid());
@@ -403,7 +402,6 @@ void MeshInstance::_bind_methods() {
ClassDB::set_method_flags("MeshInstance", "create_trimesh_collision", METHOD_FLAGS_DEFAULT);
ClassDB::bind_method(D_METHOD("create_convex_collision"), &MeshInstance::create_convex_collision);
ClassDB::set_method_flags("MeshInstance", "create_convex_collision", METHOD_FLAGS_DEFAULT);
- ClassDB::bind_method(D_METHOD("_mesh_changed"), &MeshInstance::_mesh_changed);
ClassDB::bind_method(D_METHOD("create_debug_tangents"), &MeshInstance::create_debug_tangents);
ClassDB::set_method_flags("MeshInstance", "create_debug_tangents", METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);