Fix T67673: Import .obj with more than one unnamed object fails.
This commit is contained in:
parent
fb464b014e
commit
5f579088bb
Notes:
blender-bot
2023-02-14 01:33:38 +01:00
Referenced by issue blender/blender#67673, Import .obj with more than one unnamed object fails.
|
@ -21,7 +21,7 @@
|
|||
bl_info = {
|
||||
"name": "Wavefront OBJ format",
|
||||
"author": "Campbell Barton, Bastien Montagne",
|
||||
"version": (3, 5, 10),
|
||||
"version": (3, 5, 11),
|
||||
"blender": (2, 80, 0),
|
||||
"location": "File > Import-Export",
|
||||
"description": "Import-Export OBJ, Import OBJ mesh, UV's, materials and textures",
|
||||
|
|
|
@ -915,6 +915,8 @@ def load(context,
|
|||
"""
|
||||
def unique_name(existing_names, name_orig):
|
||||
i = 0
|
||||
if name_orig is None:
|
||||
name_orig = b"ObjObject"
|
||||
name = name_orig
|
||||
while name in existing_names:
|
||||
name = b"%s.%03d" % (name_orig, i)
|
||||
|
|
Loading…
Reference in New Issue