Duplicate long shapekey names crash Blender #29337

Closed
opened 2011-11-20 15:52:19 +01:00 by Thomas Larsson · 6 comments
Member

%%%Blender 2.60.5, r42004, Win 7 64 bit

The following code makes Blender hang. The problem is evidently that long shapekey names are not truncated uniquely.

import bpy

def makeShapeKey(name):

  bpy.ops.object.shape_key_add(from_mix=False)
  skey = bpy.context.object.active_shape_key
  skey.name = name
  return
  

makeShapeKey("Basis")
makeShapeKey("This-is-a-very-long-shape-key-name-number-1")
makeShapeKey("This-is-a-very-long-shape-key-name-number-2")

%%%

%%%Blender 2.60.5, r42004, Win 7 64 bit The following code makes Blender hang. The problem is evidently that long shapekey names are not truncated uniquely. ------------------------------------------- import bpy def makeShapeKey(name): ``` bpy.ops.object.shape_key_add(from_mix=False) skey = bpy.context.object.active_shape_key skey.name = name return ``` makeShapeKey("Basis") makeShapeKey("This-is-a-very-long-shape-key-name-number-1") makeShapeKey("This-is-a-very-long-shape-key-name-number-2") %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%Will look into this issue.%%%

%%%Will look into this issue.%%%

%%%Hrm, noticed two things. First is that it's not so simle to assign bugs to myself in google chrome - "Assigned To" is getting reset when focus is leaing combobox, but it's side note.

About this hung. Looks like it's old issue in code which makes names unique. Attached patch should solve this, but it's code used all over so extra eyes on checing it are welcome. Mabe Campbell can help here?%%%

%%%Hrm, noticed two things. First is that it's not so simle to assign bugs to myself in google chrome - "Assigned To" is getting reset when focus is leaing combobox, but it's side note. About this hung. Looks like it's old issue in code which makes names unique. Attached patch should solve this, but it's code used all over so extra eyes on checing it are welcome. Mabe Campbell can help here?%%%

%%%Discussed with Campbell. Its more complicated fix which chould be performed here: at every string clamp itteration string should be verified if it's still a valid utf8 sequence.
Just a not which should be taken into account if somebod would want to commit or use this patch.%%%

%%%Discussed with Campbell. Its more complicated fix which chould be performed here: at every string clamp itteration string should be verified if it's still a valid utf8 sequence. Just a not which should be taken into account if somebod would want to commit or use this patch.%%%

%%%Seems this was fixed but the report not closed yet.
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42029%%%

%%%Seems this was fixed but the report not closed yet. http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42029%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#29337
No description provided.