Skip to content

Util: Fix getting sub-scene's root path #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)