diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-29 16:23:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-29 16:23:28 +0200 |
commit | 85c27f9c90179d1e886814a07f1ccd0ac99efd47 (patch) | |
tree | 9668fa25c61006f8596c68558d4bf6b59a6aece5 /core | |
parent | 8cf193b5c2d160aeb7910c1e77ea395eb172c714 (diff) | |
parent | d1fa546dc93c5278b3878186d88e99a1236cf03c (diff) |
Merge pull request #28452 from Sintinium/undoredo-lock
Undo support for locking and grouping for both 2D and 3D
Diffstat (limited to 'core')
-rw-r--r-- | core/object.cpp | 5 | ||||
-rw-r--r-- | core/object.h | 1 |
2 files changed, 6 insertions, 0 deletions
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<PropertyInfo> 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<String> *p_list) const; |