summaryrefslogtreecommitdiff
path: root/scene/2d/multimesh_instance_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/multimesh_instance_2d.cpp')
-rw-r--r--scene/2d/multimesh_instance_2d.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/scene/2d/multimesh_instance_2d.cpp b/scene/2d/multimesh_instance_2d.cpp
index 6620027020..d99d5b9b30 100644
--- a/scene/2d/multimesh_instance_2d.cpp
+++ b/scene/2d/multimesh_instance_2d.cpp
@@ -31,7 +31,6 @@
#include "multimesh_instance_2d.h"
void MultiMeshInstance2D::_notification(int p_what) {
-
if (p_what == NOTIFICATION_DRAW) {
if (multimesh.is_valid()) {
draw_multimesh(multimesh, texture, normal_map);
@@ -40,7 +39,6 @@ void MultiMeshInstance2D::_notification(int p_what) {
}
void MultiMeshInstance2D::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("set_multimesh", "multimesh"), &MultiMeshInstance2D::set_multimesh);
ClassDB::bind_method(D_METHOD("get_multimesh"), &MultiMeshInstance2D::get_multimesh);
@@ -58,18 +56,15 @@ void MultiMeshInstance2D::_bind_methods() {
}
void MultiMeshInstance2D::set_multimesh(const Ref<MultiMesh> &p_multimesh) {
-
multimesh = p_multimesh;
update();
}
Ref<MultiMesh> MultiMeshInstance2D::get_multimesh() const {
-
return multimesh;
}
void MultiMeshInstance2D::set_texture(const Ref<Texture2D> &p_texture) {
-
if (p_texture == texture)
return;
texture = p_texture;
@@ -79,24 +74,20 @@ void MultiMeshInstance2D::set_texture(const Ref<Texture2D> &p_texture) {
}
Ref<Texture2D> MultiMeshInstance2D::get_texture() const {
-
return texture;
}
void MultiMeshInstance2D::set_normal_map(const Ref<Texture2D> &p_texture) {
-
normal_map = p_texture;
update();
}
Ref<Texture2D> MultiMeshInstance2D::get_normal_map() const {
-
return normal_map;
}
#ifdef TOOLS_ENABLED
Rect2 MultiMeshInstance2D::_edit_get_rect() const {
-
if (multimesh.is_valid()) {
AABB aabb = multimesh->get_aabb();
return Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y);