Commit 221dede6 authored by Matthias Möller's avatar Matthias Möller

- use OF signals for object updates

- invoke of ""viewAll" moved from the end of the reader to "openedFile" slot, as every reader invoked it but openedFile just, if only one object was loaded
- prepares asnyc load

refs #2421

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free-Staging@20987 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 82e9224e
...@@ -176,15 +176,13 @@ int AssimpPlugin::convertAiSceneToOpenMesh(const aiScene *_scene, QString _objec ...@@ -176,15 +176,13 @@ int AssimpPlugin::convertAiSceneToOpenMesh(const aiScene *_scene, QString _objec
if (polyMeshObj) { if (polyMeshObj) {
convertPolyMeshToAiMesh(polyMeshObj->mesh(), _scene->mMeshes[i]); convertPolyMeshToAiMesh(polyMeshObj->mesh(), _scene->mMeshes[i]);
polyMeshObj->update(); emit updatedObject(polyMeshObj->id(), UPDATE_ALL);
polyMeshObj->show();
ids.push_back(object->id()); ids.push_back(object->id());
} else if (triMeshObj) { } else if (triMeshObj) {
convertAiMeshToTriMesh(triMeshObj->mesh(), _scene->mMeshes[i]); convertAiMeshToTriMesh(triMeshObj->mesh(), _scene->mMeshes[i]);
triMeshObj->update(); emit updatedObject(triMeshObj->id(), UPDATE_ALL);
triMeshObj->show();
ids.push_back(object->id()); ids.push_back(object->id());
} }
...@@ -201,9 +199,6 @@ int AssimpPlugin::convertAiSceneToOpenMesh(const aiScene *_scene, QString _objec ...@@ -201,9 +199,6 @@ int AssimpPlugin::convertAiSceneToOpenMesh(const aiScene *_scene, QString _objec
} }
} }
// Update viewport
PluginFunctions::viewAll();
return returnId; return returnId;
} }
......
...@@ -91,6 +91,7 @@ class AssimpPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInter ...@@ -91,6 +91,7 @@ class AssimpPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInter
void log(Logtype _type, QString _message); void log(Logtype _type, QString _message);
void log(QString _message); void log(QString _message);
void updateView(); void updateView();
void updatedObject(int _identifier, const UpdateType& _type);
void deleteObject( int _id ); void deleteObject( int _id );
......
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