Log In
New Account
Home My Page Projects Blender 2.x BF release
Summary Activity Tracker SCM Files

Blender 2.6 Bug Tracker: Browse

[#24477] Can easily create bones with duplicate names

Date:
2010-11-01 04:54
Priority:
3
State:
Closed
Submitted by:
Tim Baker (tim_baker)
Assigned to:
Campbell Barton (campbellbarton)
Category:
None
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
 
Summary:
Can easily create bones with duplicate names
Detailed description
Create a new EditBone, then give it a 31-character-long name of all 'x'.
Shift-D to duplicate, now there are 2 bones with the same name.

The problem is in editarmature.c unique_editbone_name(). It appends
the .001 or whatever extension with no regard for the max length of
the bone name.

It looks like the same issue exists with these functions:
unique_bone_name
CustomData_set_layer_unique_name
defgroup_unique_name
BKE_nlastrip_validate_name
uniqueOrientationName

Followup

Message
  • Date: 2010-11-01 05:11
  • Sender: Tim Baker
  • Seems like a simple solution for 31-character names, based on seqbase_unique_name():

    sprintf(tempname, "%.27s.%03d", name, number);

    27+4+1==32
  • Date: 2010-11-01 06:35
  • Sender: Campbell Barton
  • fixing, will check all cases you mentioned, will support numbers over 1000 too.
  • Date: 2010-11-01 08:24
  • Sender: Campbell Barton
  • fixed 7 cases where this method was used.
 

Attached Files:

No Files Currently Attached

Changes:

Field Old Value Date By
ResolutionInvestigate2010-11-01 08:24campbellbarton
close_date2010-11-01 08:242010-11-01 08:24campbellbarton
status_idOpen2010-11-01 08:24campbellbarton
ResolutionNone2010-11-01 06:35campbellbarton
assigned_tonone2010-11-01 06:35campbellbarton