diff options
author | Roxie Linden <roxie@lindenlab.com> | 2011-05-27 11:50:39 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2011-05-27 11:50:39 -0700 |
commit | 31e850d04885bed2ac779c66bb6b7923a0a51d96 (patch) | |
tree | 834cac4630edfae9dca3d44e9c20b1d1c68ff484 /indra/newview/llpanelvolume.cpp | |
parent | 51bc6c01c10723d1682392fe8a15528fc7f4b7cb (diff) |
transplant fix for SH-1467
viewer now uses simulatorfeatures to check whether to show
UI elements for mesh or not
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r-- | indra/newview/llpanelvolume.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index ebddaa90bc..bb87601d20 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -530,16 +530,24 @@ void LLPanelVolume::refresh() getChildView("Light Ambiance")->setVisible( visible); getChildView("light texture control")->setVisible( visible); - bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled") && - gAgent.getRegion() && - !gAgent.getRegion()->getCapability("GetMesh").empty(); + bool enable_mesh = false; + LLSD sim_features; + LLViewerRegion *region = gAgent.getRegion(); + if(region) + { + LLSD sim_features; + region->getSimulatorFeatures(sim_features); + enable_mesh = sim_features.has("PhysicsShapeTypes"); + } getChildView("label physicsshapetype")->setVisible(enable_mesh); getChildView("Physics Shape Type Combo Ctrl")->setVisible(enable_mesh); getChildView("Physics Gravity")->setVisible(enable_mesh); getChildView("Physics Friction")->setVisible(enable_mesh); getChildView("Physics Density")->setVisible(enable_mesh); getChildView("Physics Restitution")->setVisible(enable_mesh); + + /* TODO: add/remove individual physics shape types as per the PhysicsShapeTypes simulator features */ } |