diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-10-27 21:27:36 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-10-27 21:27:36 +0100 |
commit | ef0e3bfdd92bb5faea633a14487f123dfeb2f5f1 (patch) | |
tree | 16e6b1eb88920d744637a1479a420eedbeab63ea /indra/newview | |
parent | c025939e42d4c26054ff4a6eeded4b7849c74070 (diff) |
SL-731, SL-779 - more diagnostics for DebugAnimatedObjects, fixed a problem with recursiveMarkForUpdate
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llcontrolavatar.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llviewerobject.h | 3 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 4 |
5 files changed, 38 insertions, 23 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index fab95ab1d8..51dc7d7de1 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -227,6 +227,7 @@ void LLControlAvatar::updateDebugText() getAnimatedVolumes(volumes); S32 animated_volume_count = volumes.size(); std::string active_string; + std::string type_string; std::string lod_string; S32 total_tris = 0; S32 total_verts = 0; @@ -248,16 +249,31 @@ void LLControlAvatar::updateDebugText() { active_string += "S"; } + if (volp->isRiggedMesh()) + { + // Rigged/animateable mesh + type_string += "R"; + } + else if (volp->isMesh()) + { + // Static mesh + type_string += "M"; + } + else + { + // Any other prim + type_string += "P"; + } } else { active_string += "-"; + type_string += "-"; } } addDebugText(llformat("CAV obj %d anim %d active %s", total_linkset_count, animated_volume_count, active_string.c_str())); - - addDebugText(llformat("lod %s",lod_string.c_str())); + addDebugText(llformat("types %s lods %s", type_string.c_str(), lod_string.c_str())); addDebugText(llformat("tris %d verts %d", total_tris, total_verts)); //addDebugText(llformat("anim time %.1f (step %f factor %f)", // mMotionController.getAnimTime(), @@ -329,7 +345,6 @@ void LLControlAvatar::updateAnimations() } mSignaledAnimations = anims; - LL_DEBUGS("AXON") << "process animation state changes here" << LL_ENDL; processAnimationStateChanges(); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index fad59aadf4..3834082f78 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5075,18 +5075,6 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) } } -// AXON Move to llviewerobject -void recursiveMarkForUpdate(LLViewerObject *vobj, BOOL priority) -{ - for (LLViewerObject::child_list_t::const_iterator iter = vobj->getChildren().begin(); - iter != vobj->getChildren().end(); iter++) - { - LLViewerObject* child = (LLViewerObject*)*iter; - child->markForUpdate(priority); - } - vobj->markForUpdate(priority); -} - void process_object_animation(LLMessageSystem *mesgsys, void **user_data) { LLUUID animation_id; @@ -5123,14 +5111,14 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) } S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList); - LL_DEBUGS("AXON") << "handle object animation here, num_blocks " << num_blocks << LL_ENDL; + LL_DEBUGS("AXON") << "processing object animation requests, num_blocks " << num_blocks << LL_ENDL; -#if 1 +#if 0 if (!avatarp->mPlaying) { avatarp->mPlaying = true; avatarp->updateVolumeGeom(); - recursiveMarkForUpdate(avatarp->mRootVolp,TRUE); + avatarp->mRootVolp->recursiveMarkForUpdate(TRUE); } #else if (num_blocks > 0 && !avatarp->mPlaying) @@ -5138,7 +5126,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) avatarp->mPlaying = true; avatarp->updateVolumeGeom(); // AXON FIXME need to update all objects in the linkset, not just the one where animation is playing - recursiveMarkForUpdate(avatarp->mRootVolp,TRUE); + avatarp->mRootVolp->recursiveMarkForUpdate(TRUE); } else if (num_blocks == 0 && avatarp->mPlaying) { @@ -5148,7 +5136,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) avatarp->mPlaying = false; avatarp->updateVolumeGeom(); // AXON FIXME need to update all objects in the linkset, not just the one where animation is playing - recursiveMarkForUpdate(avatarp->mRootVolp,TRUE); + avatarp->mRootVolp->recursiveMarkForUpdate(TRUE); } #endif diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 8e50f2dc08..b17d83486f 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -6020,6 +6020,17 @@ void LLViewerObject::updateVolume(const LLVolumeParams& volume_params) } } +void LLViewerObject::recursiveMarkForUpdate(BOOL priority) +{ + for (LLViewerObject::child_list_t::iterator iter = mChildList.begin(); + iter != mChildList.end(); iter++) + { + LLViewerObject* child = *iter; + child->markForUpdate(priority); + } + markForUpdate(priority); +} + void LLViewerObject::markForUpdate(BOOL priority) { if (mDrawable.notNull()) diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 09b87e4a3a..a3a9a075ba 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -419,7 +419,8 @@ public: void setIcon(LLViewerTexture* icon_image); void clearIcon(); - void markForUpdate(BOOL priority); + void recursiveMarkForUpdate(BOOL priority); + virtual void markForUpdate(BOOL priority); void updateVolume(const LLVolumeParams& volume_params); virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max); virtual F32 getBinRadius(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d4a601d394..004f335a5a 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3403,7 +3403,7 @@ bool LLVOVolume::canBeAnimatedObject() const F32 est_tris = recursiveGetEstTrianglesMax(); if (est_tris <= 0 || est_tris > getAnimatedObjectMaxTris()) { - LL_INFOS() << "est_tris " << est_tris << " is outside limit of 1-" << getAnimatedObjectMaxTris() << LL_ENDL; + LL_DEBUGS("AXON") << "est_tris " << est_tris << " is outside limit of 1-" << getAnimatedObjectMaxTris() << LL_ENDL; return false; } return true; @@ -3987,7 +3987,7 @@ void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_u bool was_enabled = (getControlAvatar() != NULL); if (enabled != was_enabled) { - LL_INFOS() << (U32) this + LL_DEBUGS("AXON") << (U32) this << " calling onSetExtendedMeshFlags, enabled " << (U32) enabled << " was_enabled " << (U32) was_enabled << " local_origin " << (U32) local_origin |