summaryrefslogtreecommitdiff
path: root/editor/editor_inspector.cpp
diff options
context:
space:
mode:
authorRechieKho <the.real.richie.kho@gmail.com>2022-04-07 09:53:12 +0800
committerRĂ©mi Verschelde <rverschelde@gmail.com>2022-05-05 16:11:27 +0200
commit8e8e457dd98e656c412544b3e5eefa6ca5c1a715 (patch)
tree2e6680b0750cb26c0fca6a01aef362484108f1b7 /editor/editor_inspector.cpp
parent71e41eb395319cc521c2e814126fcc2a5a8034d6 (diff)
Disallow setting editor-only metadata in the editor
Diffstat (limited to 'editor/editor_inspector.cpp')
-rw-r--r--editor/editor_inspector.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 076e5e3731..5db1ef4b2b 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -3723,6 +3723,8 @@ void EditorInspector::_check_meta_name(String name) {
error = TTR("Invalid metadata identifier.");
} else if (object->has_meta(name)) {
error = TTR("Metadata already exists.");
+ } else if (name[0] == '_') {
+ error = TTR("Names starting with _ are reserved for editor-only metadata.");
}
if (error != "") {