summaryrefslogtreecommitdiff
path: root/indra/llprimitive/lldaeloader.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-12-23 15:16:50 +0200
committerandreykproductengine <akleshchev@productengine.com>2016-12-23 15:16:50 +0200
commit4fc012fbfae8975c2240c70c2c3311263ceee5ac (patch)
tree089ecd3139ee9edb30f00fe150d6a38006f40487 /indra/llprimitive/lldaeloader.cpp
parente48af9ba0f40aa8096fddd28e4973d6853bc767e (diff)
Reverted changeset 409b67af8faf (MAINT-6901)
Diffstat (limited to 'indra/llprimitive/lldaeloader.cpp')
-rw-r--r--indra/llprimitive/lldaeloader.cpp13
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)