Commit f313dc0a authored by Isaak Lim's avatar Isaak Lim

- fixed vertex normal calculation when loading objects with assimp

- the view should now be updated correctly and zoom to the loaded object

refs #1274

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free-Staging@16727 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 28c4a95b
......@@ -90,6 +90,9 @@ int AssimpPlugin::convertToOpenMesh(const aiScene *_scene) {
emit openedFile( object->id() );
// Update viewport
PluginFunctions::viewAll();
return objectId;
}
......@@ -111,7 +114,7 @@ void AssimpPlugin::convertAiMesh(PolyMesh *_polyMesh, aiMesh *_mesh) {
vhandles.clear();
}
if (_mesh->HasNormals())
if (!_mesh->HasNormals())
_polyMesh->update_normals();
else
_polyMesh->update_face_normals();
......@@ -135,7 +138,7 @@ void AssimpPlugin::convertAiMesh(TriMesh *_triMesh, aiMesh *_mesh) {
vhandles.clear();
}
if (_mesh->HasNormals())
if (!_mesh->HasNormals())
_triMesh->update_normals();
else
_triMesh->update_face_normals();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment