Skip to content

Commit

Permalink
Merge pull request #256 from endlessm/fix-get_path-of-sub-scenes-root
Browse files Browse the repository at this point in the history
Util: Fix getting sub-scene's root path
  • Loading branch information
dbnicholson authored Oct 10, 2024
2 parents d8d10ee + 7a7f848 commit 093f362
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions addons/block_code/ui/util.gd
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ static func node_scene_path(node: Node, reference: Node, path_root: Node = null)
if node.unique_name_in_owner:
# With unique_name_in_owner, just use the % prefixed name.
return NodePath("%%%s" % node.name)
elif node.is_ancestor_of(reference):
# If the node is an ancestor of the reference, it would begin
# with an ugly ../. Use an absolute path where /root is the
# path_root node.
return NodePath("/root/%s" % path_root.get_path_to(node))
else:
# The node is reference or a child of it. Use a relative path.
return reference.get_path_to(node)

0 comments on commit 093f362

Please sign in to comment.