diff options
author | DualMatrix <piet.goris@gmail.com> | 2018-10-15 23:42:00 +0200 |
---|---|---|
committer | DualMatrix <piet.goris@gmail.com> | 2018-10-15 23:42:00 +0200 |
commit | be52063aaa745a2838a728dd092abce41099717c (patch) | |
tree | b198501a11ea420eb4d40ba7f357ac608c093868 | |
parent | 451e5fd0511bc2c17a66fc73a0de9a5169109517 (diff) |
Made NodePath property display path instead of object name if object is autogenerated.
This is to prevent those ugly and unclear names with the @'s to appear in things like standalone animationplayer nodes.
-rw-r--r-- | editor/editor_properties.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index d078cfcc91..18b3bbcb39 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -1870,6 +1870,12 @@ void EditorPropertyNodePath::update_property() { Node *target_node = base_node->get_node(p); ERR_FAIL_COND(!target_node); + if (String(target_node->get_name()).find("@") != -1) { + assign->set_icon(Ref<Texture>()); + assign->set_text(p); + return; + } + assign->set_text(target_node->get_name()); assign->set_icon(EditorNode::get_singleton()->get_object_icon(target_node, "Node")); } |