Repository navigation
Allow node name reuse after delete - #733
Merged
Merged
Conversation
rodlie
approved these changes
Dec 23, 2021
rodlie
left a comment
Contributor
There was a problem hiding this comment.
Tested and works for me. I have not noticed any undo issues related to this change.
YakoYakoYokuYoku
approved these changes
Dec 23, 2021
YakoYakoYokuYoku
left a comment
Member
There was a problem hiding this comment.
Will test for RB-2.5 too.
devernay
added a commit
that referenced
this pull request
Dec 25, 2021
* Allow node name reuse after delete fixes #732 * when creating/pasting nodes, don't add more underscores than necessary. addresses #732 (comment)
5 of 10 tasks
Niik-l
pushed a commit
to Niik-l/Natron
that referenced
this pull request
Apr 8, 2026
* Allow node name reuse after delete fixes NatronGitHub#732 * when creating/pasting nodes, don't add more underscores than necessary. addresses NatronGitHub#732 (comment)
Niik-l
pushed a commit
to Niik-l/Natron
that referenced
this pull request
Apr 8, 2026
* Allow node name reuse after delete fixes NatronGitHub#732 * when creating/pasting nodes, don't add more underscores than necessary. addresses NatronGitHub#732 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is against RB-2.4, but will be merged in RB-2.5 ultimately.
fixes #732 (this bug has been here forever)
Explanation: the nodes are not deleted while they're still in the Undo stack (which has a depth of 20 actions by default). You'll notice that if you do 20 actions (move 20 times a node in the graph), you will be able to do that rename.
I have a proposed change, which allows using the name of an existing deactivated node. To reactivate the deactivated node, the name change would be reverted by RenameNodeUndoRedoCommand::undo() anyway.
I had to add a few checks in the code:
I had to make sure that every use of Node::getScriptName_mt_safe() (except for printing messages) was also checking if the node was activated.
This seems to work.
@rodlie @YakoYakoYokuYoku Please decline the review if you think you can't review