From d1fa546dc93c5278b3878186d88e99a1236cf03c Mon Sep 17 00:00:00 2001 From: Sintinium Date: Fri, 26 Apr 2019 12:23:50 -0500 Subject: Undo support for locking and grouping for both 2D and 3D --- core/object.cpp | 5 +++++ core/object.h | 1 + 2 files changed, 6 insertions(+) (limited to 'core') diff --git a/core/object.cpp b/core/object.cpp index 039f556c87..f860423a27 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1059,6 +1059,10 @@ Variant Object::get_meta(const String &p_name) const { return metadata[p_name]; } +void Object::remove_meta(const String &p_name) { + metadata.erase(p_name); +} + Array Object::_get_property_list_bind() const { List lpi; @@ -1691,6 +1695,7 @@ void Object::_bind_methods() { ClassDB::bind_method(D_METHOD("get_script"), &Object::get_script); ClassDB::bind_method(D_METHOD("set_meta", "name", "value"), &Object::set_meta); + ClassDB::bind_method(D_METHOD("remove_meta", "name"), &Object::remove_meta); ClassDB::bind_method(D_METHOD("get_meta", "name"), &Object::get_meta); ClassDB::bind_method(D_METHOD("has_meta", "name"), &Object::has_meta); ClassDB::bind_method(D_METHOD("get_meta_list"), &Object::_get_meta_list_bind); diff --git a/core/object.h b/core/object.h index 3730af1ad4..94abaacdcc 100644 --- a/core/object.h +++ b/core/object.h @@ -673,6 +673,7 @@ public: bool has_meta(const String &p_name) const; void set_meta(const String &p_name, const Variant &p_value); + void remove_meta(const String &p_name); Variant get_meta(const String &p_name) const; void get_meta_list(List *p_list) const; -- cgit v1.2.3