Page MenuHome

Renaming Atrribute in the data panel does not accont for using the original name or a blank space.
Closed, ResolvedPublic

Description

System Information
Operating system: Linux-5.15.0-41-generic-x86_64-with-glibc2.31 64 Bits
Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 510.47.03

Blender Version
Broken: version: 3.3.0 Alpha, branch: master, commit date: 2022-07-17 00:27, hash: rBcd1e4ae44830
Worked: Works fine in 3.21

Short description of error
While renaming Attributes in the data panel and using the same name as the original (for example, double clicking on the name and right-clicking anywhere else), the unique name operator does not check if this is the same name that was there originally. (the name will get the .001 suffix)
It also doesn't check for a blank space (if you delete the current name and apply, Blender will crash)

Exact steps for others to reproduce the error

  1. Add a Color Attribute / Attribute
  2. Double click on the created attribute
  3. Right-click anywhere else to apply
  4. See that the Attribute gets the .00x suffix

Another option is assigning a blank name which will crash Blender.

P.S
I tried to look into it but it seems I lack some knowledge.

Event Timeline

The unique name function is in

blender-git/blender/source/blender/blenkernel/intern/attribute.cc

under the name

unique_name_cb

As you can see, the bug is easily solvable. That's why I tried to solve it before submitting the bug report.
I will continue to work on it, but I realize it's safer to report it anyway.

Omar Emara (OmarSquircleArt) changed the task status from Needs Triage to Confirmed.Jul 18 2022, 6:50 PM