diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-12-08 21:24:02 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-12-08 21:24:02 -0800 |
commit | 1be5133116c7e63bc621a4017bedaebf557c83db (patch) | |
tree | d9985d5fea5a7e04466605d9db7916e7010f4b20 /indra/newview/llmeshrepository.cpp | |
parent | be1fd73390cab288c75ef99e704f3aa195a0c4ac (diff) |
SH-541 - Physics mesh display shows inconsistent data.
The object UI was allowing the user to set 'prim' physics for meshes for which
no user physics had been uploaded, or decomposed. It defaulted to convex hull in that case.
The fix is to fix the UI to disallow 'prim' for meshes without physics meshes, limiting
those to only convex hull and none.
We will also redo the task validation to detect invalid states related to this as part
of the 'redo the validation' work
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 1ff11f2c01..8d5ef4ae3d 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2667,6 +2667,12 @@ void LLMeshRepository::buildHull(const LLVolumeParams& params, S32 detail) LLPrimitive::sVolumeManager->unrefVolume(volume); } +bool LLMeshRepository::hasPhysicsShape(const LLUUID& mesh_id) +{ + LLSD mesh = mThread->getMeshHeader(mesh_id); + return mesh.has("physics_shape") && mesh["physics_shape"].has("size") && (mesh["physics_shape"]["size"].asInteger() > 0); +} + const LLSD& LLMeshRepository::getMeshHeader(const LLUUID& mesh_id) { return mThread->getMeshHeader(mesh_id); |