You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
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.
This commit is contained in:
@@ -1870,6 +1870,12 @@ void EditorPropertyNodePath::update_property() {
|
|||||||
Node *target_node = base_node->get_node(p);
|
Node *target_node = base_node->get_node(p);
|
||||||
ERR_FAIL_COND(!target_node);
|
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_text(target_node->get_name());
|
||||||
assign->set_icon(EditorNode::get_singleton()->get_object_icon(target_node, "Node"));
|
assign->set_icon(EditorNode::get_singleton()->get_object_icon(target_node, "Node"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user