From 6c3de7ce2d3a022e76d85522bda6034226f09a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 14 Nov 2018 13:07:28 +0100 Subject: [PATCH] Log information about computed normals --- FileOFF.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/FileOFF.cc b/FileOFF.cc index 5e7e7f5..46a4505 100644 --- a/FileOFF.cc +++ b/FileOFF.cc @@ -1220,10 +1220,13 @@ int FileOFFPlugin::loadObject(QString _filename) { if ( polyMeshObj ){ - if ( !importer.hasVertexNormals() ) + if ( !importer.hasVertexNormals() || (userReadOptions_ & OFFImporter::FORCE_NONORMALS) ) { + emit log(LOGINFO, tr("loadObject: Computing vertex and face normals.") ); polyMeshObj->mesh()->update_normals(); - else + } else { + emit log(LOGINFO, tr("loadObject: Computing face normals.") ); polyMeshObj->mesh()->update_face_normals(); + } backupTextureCoordinates(*(polyMeshObj->mesh())); } @@ -1233,10 +1236,13 @@ int FileOFFPlugin::loadObject(QString _filename) { if ( triMeshObj ){ - if ( !importer.hasVertexNormals() || (userReadOptions_ & OFFImporter::FORCE_NONORMALS) ) + if ( !importer.hasVertexNormals() || (userReadOptions_ & OFFImporter::FORCE_NONORMALS) ) { + emit log(LOGINFO, tr("loadObject: Computing vertex and face normals.") ); triMeshObj->mesh()->update_normals(); - else + } else { + emit log(LOGINFO, tr("loadObject: Computing face normals.") ); triMeshObj->mesh()->update_face_normals(); + } backupTextureCoordinates(*(triMeshObj->mesh())); } -- GitLab