diff options
Diffstat (limited to 'indra/llprimitive/lldaeloader.cpp')
-rw-r--r-- | indra/llprimitive/lldaeloader.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index d73bdd7693..4f500adefc 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -855,6 +855,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; @@ -1001,6 +1003,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()) { @@ -2429,8 +2436,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 @@ -2445,12 +2450,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) |