From 5d1f6223eb39e2bf6eb2c57428d2957c3bc7ffc7 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 20 Oct 2016 16:15:36 +0300 Subject: MAINT-6835 Material of model is not a subset of reference, cause upload model dialog to stick with error --- indra/llprimitive/lldaeloader.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llprimitive/lldaeloader.cpp') diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index 8071d716da..031befe63a 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; -- cgit v1.2.3 From 4ae6f32ee16b21aed2235e96b99e18eebfdd82c6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 15 Nov 2016 20:16:01 +0200 Subject: MAINT-6901 Fixes upload assigning different scale to parts of the model --- indra/llprimitive/lldaeloader.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'indra/llprimitive/lldaeloader.cpp') diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index 031befe63a..de02c5c188 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -999,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()) { @@ -2408,8 +2413,6 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector& mo // ret->sortVolumeFacesByMaterialName(); - bool normalized = false; - int submodelID = 0; // remove all faces that definitely won't fit into one model and submodel limit @@ -2424,12 +2427,6 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector& 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) -- cgit v1.2.3 From 4fc012fbfae8975c2240c70c2c3311263ceee5ac Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 23 Dec 2016 15:16:50 +0200 Subject: Reverted changeset 409b67af8faf (MAINT-6901) --- indra/llprimitive/lldaeloader.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/llprimitive/lldaeloader.cpp') 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& 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& 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) -- cgit v1.2.3