take care of global placement when exporting from Mesh menu

This commit is contained in:
wmayer
2018-09-05 17:46:31 +02:00
parent 4c229d9922
commit 363de2f7da

View File

@@ -685,7 +685,8 @@ void ViewProviderMesh::exportMesh(const char* filename, const char* fmt) const
mat.diffuseColor.push_back(App::Color(c[0], c[1], c[2]));
}
const Mesh::MeshObject& mesh = static_cast<Mesh::Feature*>(getObject())->Mesh.getValue();
Mesh::MeshObject mesh = static_cast<Mesh::Feature*>(getObject())->Mesh.getValue();
mesh.setPlacement(static_cast<Mesh::Feature*>(getObject())->globalPlacement());
if (mat.diffuseColor.size() == mesh.countPoints())
mat.binding = MeshCore::MeshIO::PER_VERTEX;
else if (mat.diffuseColor.size() == mesh.countFacets())