diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2017-01-03 17:31:57 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2017-01-03 17:31:57 +0200 |
commit | 892d3207d6f6d4506a6675a917b374651fa7f9c4 (patch) | |
tree | c01f3e8d557327dcecb995b173216ee7dc04b16d /indra/llprimitive/lldaeloader.cpp | |
parent | af3aad098d97171b0873f6486d7b5513d2a409f8 (diff) | |
parent | 4fc012fbfae8975c2240c70c2c3311263ceee5ac (diff) |
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/llprimitive/lldaeloader.cpp')
-rw-r--r-- | indra/llprimitive/lldaeloader.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index 4f500adefc..76d3a405d8 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -1003,11 +1003,6 @@ 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()) { @@ -2436,6 +2431,8 @@ 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 @@ -2450,6 +2447,12 @@ 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) |