diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-10 03:55:09 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-10 03:55:09 +0300 |
commit | 8fa956a16e616191e21bf001eabc4670453debcd (patch) | |
tree | aecadf995f0174cc41f7cb9846a1382a930d8f82 /indra/newview/llmodelpreview.cpp | |
parent | 37392be4171303db08a4842b7882b4cb758a8f8d (diff) | |
parent | da9a1dcb55548a249ff7a1255f3e518696b81245 (diff) |
Merge branch 'main' into marchcat/b-merge
# Conflicts:
# indra/llrender/llgl.cpp
# indra/newview/lloutfitslist.cpp
Diffstat (limited to 'indra/newview/llmodelpreview.cpp')
-rw-r--r-- | indra/newview/llmodelpreview.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index ccae1030f1..8fbcf8e18d 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -249,7 +249,7 @@ void LLModelPreview::updateDimentionsAndOffsets() { accounted.insert(instance.mModel); - //update instance skin info for each lods pelvisZoffset + // update instance skin info for each lods pelvisZoffset for (int j = 0; j<LLModel::NUM_LODS; ++j) { if (instance.mLOD[j]) @@ -271,6 +271,7 @@ void LLModelPreview::rebuildUploadData() { assert_main_thread(); + mDefaultPhysicsShapeP = NULL; mUploadData.clear(); mTextureSet.clear(); @@ -310,7 +311,7 @@ void LLModelPreview::rebuildUploadData() mat *= scale_mat; for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end();) - { //for each instance with said transform applied + { // for each instance with said transform applied LLModelInstance instance = *model_iter++; LLModel* base_model = instance.mModel; @@ -573,7 +574,7 @@ void LLModelPreview::rebuildUploadData() else if (getLoadState() == LLModelLoader::ERROR_MATERIALS || getLoadState() == LLModelLoader::WARNING_BIND_SHAPE_ORIENTATION) { - // This is only valid for these two error types because they are + // This is only valid for these two error types because they are // only used inside rebuildUploadData() and updateStatusMessages() // updateStatusMessages() is called after rebuildUploadData() setLoadState(LLModelLoader::DONE); @@ -798,7 +799,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable // it tends to force the UI into strange checkbox options // which cannot be altered. - //only try to load from slm if viewer is configured to do so and this is the + //only try to load from slm if viewer is configured to do so and this is the //initial model load (not an LoD or physics shape) mModelLoader->mTrySLM = gSavedSettings.getBOOL("MeshImportUseSLM") && mUploadData.empty(); } @@ -884,12 +885,13 @@ void LLModelPreview::clearIncompatible(S32 lod) // Check if already started bool subscribe_for_generation = mLodsQuery.empty(); - + // Remove previously scheduled work mLodsQuery.clear(); LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance; - if (!fmp) return; + if (!fmp) + return; // Schedule new work for (S32 i = LLModel::LOD_HIGH; i >= 0; --i) @@ -1719,7 +1721,7 @@ F32 LLModelPreview::genMeshOptimizerPerFace(LLModel *base_model, LLModel *target ll_aligned_free_16(output_indices); ll_aligned_free_16(shadow_indices); - + if (size_new_indices < 3) { // At least one triangle is needed @@ -1912,7 +1914,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d { precise_ratio = genMeshOptimizerPerModel(base, target_model, indices_decimator, lod_error_threshold, MESH_OPTIMIZER_NO_UVS); } - + if (precise_ratio < 0 || (precise_ratio * allowed_ratio_drift < indices_decimator)) { // Try sloppy variant if normal one failed to simplify model enough. |