diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-07-26 18:56:18 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-07-26 18:56:18 +0100 |
commit | 22c8efc2ce8cac2056b73c504b95a9413fff8818 (patch) | |
tree | 352bc5e4b7881dda8967c3cba2c7432d135147e7 /indra/newview | |
parent | 30880e062afa0671b166f161ae7c109bfd37d38f (diff) |
SL-731, SL-751 - added debug option DebugAnimatedObjects, updated LSL test script
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llcontrolavatar.cpp | 82 |
2 files changed, 62 insertions, 31 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c544205df0..c8797f3f99 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2171,6 +2171,17 @@ <key>Value</key> <string /> </map> + <key>DebugAnimatedObjects</key> + <map> + <key>Comment</key> + <string>Show info related to animated objects</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>DebugAvatarAppearanceMessage</key> <map> <key>Comment</key> diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index e9df81e255..8dfc2e81dc 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -31,6 +31,7 @@ #include "pipeline.h" #include "llanimationstates.h" #include "llviewercontrol.h" +#include "llmeshrepository.h" LLControlAvatar::LLControlAvatar(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp) : LLVOAvatar(id, pcode, regionp), @@ -49,6 +50,20 @@ LLControlAvatar::~LLControlAvatar() void LLControlAvatar::matchVolumeTransform() { + { + LLVolume *volume = mRootVolp->getVolume(); + if (volume) + { + LLUUID mesh_id = volume->getParams().getSculptID(); + const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(mesh_id, mRootVolp); + if (skin) + { + LLMatrix4 bind_shape = skin->mBindShapeMatrix; + LL_INFOS("AXON") << "bind_shape is " << bind_shape << LL_ENDL; + } + } + } + setPositionAgent(mRootVolp->getRenderPosition()); //slamPosition(); @@ -186,50 +201,55 @@ void LLControlAvatar::idleUpdate(LLAgent &agent, const F64 &time) //virtual void LLControlAvatar::updateDebugText() { - S32 total_linkset_count = 0; - if (mRootVolp) - { - total_linkset_count = 1 + mRootVolp->getChildren().size(); - } - std::vector<LLVOVolume*> volumes; - getAnimatedVolumes(volumes); - S32 animated_volume_count = volumes.size(); - std::string active_string; - for (std::vector<LLVOVolume*>::iterator it = volumes.begin(); - it != volumes.end(); ++it) + if (gSavedSettings.getBOOL("DebugAnimatedObjects")) { - LLVOVolume *volp = *it; - if (volp && volp->mDrawable) + S32 total_linkset_count = 0; + if (mRootVolp) { - if (volp->mDrawable->isActive()) + total_linkset_count = 1 + mRootVolp->getChildren().size(); + } + std::vector<LLVOVolume*> volumes; + getAnimatedVolumes(volumes); + S32 animated_volume_count = volumes.size(); + std::string active_string; + for (std::vector<LLVOVolume*>::iterator it = volumes.begin(); + it != volumes.end(); ++it) + { + LLVOVolume *volp = *it; + if (volp && volp->mDrawable) { - active_string += "A"; + if (volp->mDrawable->isActive()) + { + active_string += "A"; + } + else + { + active_string += "S"; + } } else { - active_string += "S"; + active_string += "-"; } } - else - { - active_string += "-"; - } - } - addDebugText(llformat("CAV obj %d anim %d active %s", - total_linkset_count, animated_volume_count, active_string.c_str())); + addDebugText(llformat("CAV obj %d anim %d active %s", + total_linkset_count, animated_volume_count, active_string.c_str())); + #if 0 - // AXON - detailed rigged mesh info - for (std::vector<LLVOVolume*>::iterator it = volumes.begin(); - it != volumes.end(); ++it) - { - LLRiggedVolume *rig_vol = (*it)->getRiggedVolume(); - if (rig_vol) + // AXON - detailed rigged mesh info + for (std::vector<LLVOVolume*>::iterator it = volumes.begin(); + it != volumes.end(); ++it) { - addDebugText(rig_vol->mExtraDebugText); + LLRiggedVolume *rig_vol = (*it)->getRiggedVolume(); + if (rig_vol) + { + addDebugText(rig_vol->mExtraDebugText); + } } - } #endif + } + LLVOAvatar::updateDebugText(); } |