Arch: Read and write object.Label on Wavefront OBJ import and export

Fixes #5635.
Fixes #5636.
This commit is contained in:
Roy-043
2023-10-05 16:57:42 +02:00
committed by Yorik van Havre
parent 3c14a56eed
commit 6440caa038

View File

@@ -212,7 +212,7 @@ def export(exportList,filename,colors=None):
else:
offsetv += len(vlist)
offsetvn += len(vnlist)
outfile.write("o " + obj.Name + "\n")
outfile.write("o " + obj.Label + "\n")
# write material
m = False
@@ -379,6 +379,7 @@ def makeMesh(doc,activeobject,verts,facets,material,colortable):
mfacets.append([verts[i-1] for i in facet])
if mfacets:
mobj = doc.addObject("Mesh::Feature",activeobject)
mobj.Label = activeobject
mobj.Mesh = Mesh.Mesh(mfacets)
if material and FreeCAD.GuiUp:
if material in colortable: