Skip to content

Commit 093f362

Browse files
authored
Merge pull request #256 from endlessm/fix-get_path-of-sub-scenes-root
Util: Fix getting sub-scene's root path
2 parents d8d10ee + 7a7f848 commit 093f362

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

addons/block_code/ui/util.gd

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ static func node_scene_path(node: Node, reference: Node, path_root: Node = null)
3939
if node.unique_name_in_owner:
4040
# With unique_name_in_owner, just use the % prefixed name.
4141
return NodePath("%%%s" % node.name)
42-
elif node.is_ancestor_of(reference):
43-
# If the node is an ancestor of the reference, it would begin
44-
# with an ugly ../. Use an absolute path where /root is the
45-
# path_root node.
46-
return NodePath("/root/%s" % path_root.get_path_to(node))
4742
else:
4843
# The node is reference or a child of it. Use a relative path.
4944
return reference.get_path_to(node)

0 commit comments

Comments
 (0)