Page MenuHome

When renaming objects with the same name, .00x suffix is added to original object. Renamed object gets the original's name.
Closed, DuplicatePublic

Description

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.27

Blender Version
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: rB84da05a8b806
Worked: Don't recall, presumably 2.92.

Short description of error
Renaming objects that have the same name + number suffix doesn't work as expected. For example, say we have two objects, "Cube" and "Cube.001". Just duplicating the original object "Cube" created a new object with the .001 suffix, so that part's working as expected. Now let's say we want to rename another object in the scene to "Cube.002". The renamed object is expected to automatically get the proper .002 suffix when pasting in "Cube" or even "Cube.001", but instead it is the the renamed object that gets the name "Cube" and the original object is automatically renamed "Cube.002" instead. Seems to happen both if renaming through the Outliner or through Object Properties.

This happens both on my personal computer with Blender 2.93 (that's the computer the stats above apply to) and my work computer with 2.93.1. The work computer just got Blender, only the Looptools addon has been activated. On both computers, I've used the .zip download, not the installer (old habit).

Exact steps for others to reproduce the error

  1. Open the default startup.
  2. Shift+D to duplicate the cube. Place it somewhere. We now have "Cube" and "Cube.001".
  3. Copy the name of the cube ("Cube").
  4. Paste the name into, for example, the light. The light has now been renamed "Cube" and the original cube is "Cube.002".

I hope this is clear, if not let me know and I'll clarify!

Event Timeline

I can confirm this, not sure when this behavior changed but it was not used to be like this.

That being said, it sure is inconsistent (like mentioned above, this works one way for bones/vertexgroups and many others and the other way for objects/IDs)

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Needs Information from Developers.Jul 22 2021, 7:27 PM

For anyone interested, the one behavior (finding a new name if the desired already exists) is using BLI_uniquename_cb, the other behavior (renaming other ids to compensate for forced new name [as described in this report]) is using BLI_libblock_ensure_unique_name.

@Bastien Montagne (mont29) might know the reasoning (I am sure there is one), this is definitely not a bug (it is working as intended/coded), but will leave up to @Bastien Montagne (mont29) to close.

Philipp, thank you for explaining! That's very interesting, in that case it seems I'm mistaken (I have been doing a lot of bone renaming this year). It would be nice to have a checkbox in the settings, so we can choose which behavior we'd prefer.