Merge branch 'localmesh-v1.1'

meow-7.2.2
Beq 2023-02-03 23:48:48 +00:00
commit 78e908008f
2 changed files with 12 additions and 11 deletions

View File

@ -270,7 +270,7 @@ void LLFloaterLocalMesh::onBtnApply(void* userdata)
int object_idx = objectlist_combo_box->getFirstSelectedIndex();
// finally tell local mesh system to apply
LLLocalMeshSystem::getInstance()->applyVObject(selected_object_id, file_id, object_idx, true);
LLLocalMeshSystem::getInstance()->applyVObject(selected_object_id, file_id, object_idx, false);
}
//static
@ -411,7 +411,7 @@ bool LLFloaterLocalMesh::processPrimCreated(LLViewerObject* object)
{
local_id = scroll_ctrl_selected_column->getValue().asUUID();
// fill it up with local goodness
static const bool use_scale {true};
static const bool use_scale {false};
// // make sure the selection is still valid, and if so - get id.

View File

@ -137,22 +137,23 @@ void LLLocalMeshObject::computeObjectTransform(const LLMatrix4& scene_transform)
// actual bounding box size
mObjectSize = mObjectBoundingBox.second;
mObjectSize -= mObjectBoundingBox.first;
for (int vec_iter = 0; vec_iter < 4; ++vec_iter)
{
// make sure it can be divided by
if (fabs(mObjectSize.mV[vec_iter]) <= F_APPROXIMATELY_ZERO)
{
mObjectSize.mV[vec_iter] = 1.0f;
}
}
// make sure all axes of mObjectSize are non zero
for (auto& axis_size : mObjectSize.mV)
{
// set size of 1.0 if < F_APPROXIMATELY_ZERO
if (axis_size <= F_APPROXIMATELY_ZERO)
{
axis_size = 1.0f;
}
}
// bounding box scale in a 1Mx3 cube
mObjectScale.set(1.f, 1.f, 1.f);
for (int vec_iter = 0; vec_iter < 4; ++vec_iter)
{
mObjectScale.mV[vec_iter] = mObjectScale.mV[vec_iter] / mObjectSize.mV[vec_iter];
}
mObjectSize = mObjectSize * scene_transform;
}
void LLLocalMeshObject::normalizeFaceValues(LLLocalMeshFileLOD lod_iter)