diff options
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llcontrolavatar.cpp | 82 | ||||
-rw-r--r-- | scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl | 9 |
3 files changed, 63 insertions, 39 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(); } diff --git a/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl b/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl index fa12ab0588..cc5b899b67 100644 --- a/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl +++ b/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl @@ -21,14 +21,7 @@ stop_circle() { llSetTimerEvent(0); llTargetOmega(<0.0, 0.0, 1.0>, TWO_PI/circle_time, 0.0); - integer i; - for (i=0; i<10; i++) - { - vector new_pos = circle_center; - new_pos.x += llFrand(0.01); - llSetRegionPos(new_pos); - llSleep(0.1); - } + llSetRegionPos(circle_center); } next_circle() |