Arch: Read and write object.Label on Wavefront OBJ import and export
Fixes #5635. Fixes #5636.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user