diff options
Diffstat (limited to 'scene/2d/mesh_instance_2d.cpp')
-rw-r--r-- | scene/2d/mesh_instance_2d.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/scene/2d/mesh_instance_2d.cpp b/scene/2d/mesh_instance_2d.cpp index 5e258be700..b4dd09c513 100644 --- a/scene/2d/mesh_instance_2d.cpp +++ b/scene/2d/mesh_instance_2d.cpp @@ -31,7 +31,6 @@ #include "mesh_instance_2d.h" void MeshInstance2D::_notification(int p_what) { - if (p_what == NOTIFICATION_DRAW) { if (mesh.is_valid()) { draw_mesh(mesh, texture, normal_map); @@ -40,7 +39,6 @@ void MeshInstance2D::_notification(int p_what) { } void MeshInstance2D::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_mesh", "mesh"), &MeshInstance2D::set_mesh); ClassDB::bind_method(D_METHOD("get_mesh"), &MeshInstance2D::get_mesh); @@ -58,18 +56,15 @@ void MeshInstance2D::_bind_methods() { } void MeshInstance2D::set_mesh(const Ref<Mesh> &p_mesh) { - mesh = p_mesh; update(); } Ref<Mesh> MeshInstance2D::get_mesh() const { - return mesh; } void MeshInstance2D::set_texture(const Ref<Texture2D> &p_texture) { - if (p_texture == texture) return; texture = p_texture; @@ -79,24 +74,20 @@ void MeshInstance2D::set_texture(const Ref<Texture2D> &p_texture) { } void MeshInstance2D::set_normal_map(const Ref<Texture2D> &p_texture) { - normal_map = p_texture; update(); } Ref<Texture2D> MeshInstance2D::get_normal_map() const { - return normal_map; } Ref<Texture2D> MeshInstance2D::get_texture() const { - return texture; } #ifdef TOOLS_ENABLED Rect2 MeshInstance2D::_edit_get_rect() const { - if (mesh.is_valid()) { AABB aabb = mesh->get_aabb(); return Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y); |