Page MenuHome

Bug: Export (.obj ) Objects name with underscore "_" in name changes the name randomly to exported object
Closed, ArchivedPublic

Description

System Information
Operating system: Windows 10
Graphics card: ZOTAC NVIDIA GEFORCE GTX 1660 ti

Blender Version
Broken: (blender-3.0.1-candidate+v30.aafbd7464656-windows.amd64-release )
Broken:(blender 3.1.0-latest release)
Broken: (blender 2.93.7 too it shows same issue)

Short description of error
If we export a mesh object and its has a suffix in its name "_HP" any suffix tho which includes underscore("_"), More eg("_LP" , "_low"), so final object name is: "Cube_HP", When we export this object as Wavefront(.obj) it exports the object but (bug) adds the part of object name to the the end of the object name. so exported object contains the object but with name "Cube_HP_Cube".

Exact steps for others to reproduce the error
First name some objects with the "_HP" any suffix starting with underscore "_":

Second we export as (.obj):


Now we import it to new window of blender (or same file it has issues on both)

After importing object to scene.

I have tested it on Blener 2.93.7, 2.30(latest release), both exporting and importing, it is a bug in exporting with ".obj ", it doesn't happen to ".fbx".
here is the blend file, but its happen to every blender window, not limited to file


Based on the default startup or an attached .blend file (as simple as possible).

Event Timeline

The logic is that it is named {object name}_{mesh name}, unless the object name and mesh name are the same, in which case their common name is used. So you can avoid this by renaming the mesh on the "Cube_HP" object to "Cube_HP" too.

The object name containing an underscore doesn't seem to matter.

Its not about the object name. My mesh is named "Cube_HP" when exporting it as a .obj. But upon importing that .obj it to any software or blender its name becomes, "Cube_HP_Cube" , which I dont want. It never happens to fbx. Thats why its a bug.
Even if u have a single mesh in ur blend file with name having a underscore somewhere it will always happen something like this to ur mesh name.

Scurest (scurest) added a comment.EditedJan 15 2022, 10:30 AM

Your mesh is not named "Cube_HP", your object is. There is both an object and a mesh in Blender. They have different names. Yours are named like this, yes?

But there is not both an object and a mesh in .obj, so the exporter smushes the names together.

If you name both the object and the mesh "Cube_HP", then export, when you import the .obj, the imported object and mesh will both be named "Cube_HP".

Ohhhhh, wow, didn't know that name would have been used. My bad, Thank you for clarification.

Evan Wilson (EAW) closed this task as Archived.Jan 15 2022, 6:51 PM

As @Scurest (scurest) has clarified that this is not a bug, I’ll close this report.