-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
NodePath properly updated in the editor in more cases when nodes are moved or renamed #49812
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -247,6 +247,9 @@ class SceneTreeDock : public VBoxContainer { | |
static SceneTreeDock *singleton; | ||
static void _update_configuration_warning(); | ||
|
||
static bool _update_node_path(const NodePath &p_root_path, NodePath &p_node_path, List<Pair<NodePath, NodePath>> *p_renames); | ||
static bool _check_node_path_recursive(const NodePath &p_root_path, Variant &p_variant, List<Pair<NodePath, NodePath>> *p_renames); | ||
Comment on lines
+250
to
+251
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was just wondering, do those actually need to be Also, since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They don't have to be Makes sense for the missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't think we have a specific rule, I'm just asking out of curiosity (and lack of expertise on the actual impact of making things static in C++). If it doesn't hurt and makes the code clearer, that's fine with me :) |
||
|
||
protected: | ||
void _notification(int p_what); | ||
static void _bind_methods(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pushed an extra fix here that fixes errors when moving a Skeleton node with BoneAttachment nodes as its children.
Building the new path now uses
root_path_new
instead ofp_root_path
, otherwise in cases where the root path and the child path change, this code would generate a buggy node path relative to the old root.