diff options
Diffstat (limited to 'indra/llprimitive/lldaeloader.cpp')
-rw-r--r-- | indra/llprimitive/lldaeloader.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index 00bde8dbc3..de02c5c188 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -851,6 +851,8 @@ struct ModelSort bool LLDAELoader::OpenFile(const std::string& filename) { + setLoadState( READING_FILE ); + //no suitable slm exists, load from the .dae file DAE dae; domCOLLADA* dom; @@ -997,6 +999,11 @@ bool LLDAELoader::OpenFile(const std::string& filename) std::sort(mModelList.begin(), mModelList.end(), ModelSort()); + if (!mNoNormalize) + { + LLModel::normalizeModels(mModelList); + } + model_list::iterator model_iter = mModelList.begin(); while (model_iter != mModelList.end()) { @@ -1071,7 +1078,7 @@ bool LLDAELoader::OpenFile(const std::string& filename) std::string LLDAELoader::preprocessDAE(std::string filename) { // Open a DAE file for some preprocessing (like removing space characters in IDs), see MAINT-5678 - std::ifstream inFile; + llifstream inFile; inFile.open(filename.c_str(), std::ios_base::in); std::stringstream strStream; strStream << inFile.rdbuf(); @@ -2406,8 +2413,6 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo // ret->sortVolumeFacesByMaterialName(); - bool normalized = false; - int submodelID = 0; // remove all faces that definitely won't fit into one model and submodel limit @@ -2422,12 +2427,6 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo { // Insure we do this once with the whole gang and not per-model // - if (!normalized && !mNoNormalize) - { - normalized = true; - ret->normalizeVolumeFaces(); - } - ret->trimVolumeFacesToSize(LL_SCULPT_MESH_MAX_FACES, &remainder); if (!mNoOptimize) |