diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-11-16 20:23:39 +0000 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-11-16 20:23:39 +0000 |
commit | 6e75ceeff3b145c159f23e3a24576d0622ee4e1d (patch) | |
tree | 793370cd8fef15e2afe1f824e997ed6b8d13dffd | |
parent | 64e5cfc05452993bf15a31d9d4a0deeb1414edf0 (diff) |
SL-704 - more cleanup of AXON commented code
-rw-r--r-- | indra/newview/llvovolume.cpp | 81 | ||||
-rw-r--r-- | indra/newview/llvovolume.h | 1 |
2 files changed, 10 insertions, 72 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 96f2255265..ee3ecb2237 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3433,47 +3433,6 @@ bool LLVOVolume::isAnimatedObject() const #endif } -// Make sure animated objects in a linkset are consistent. The rules are: -// Only the root of a linkset can have the animated object flag set -// Only the root of a linkset can have a control avatar (iff the animated object flag is set) -// Only skinned mesh volumes can have the animated object flag set, or a control avatar -// -// AXON REVIEW BASED ON FINAL RULES -bool LLVOVolume::isAnimatedObjectStateConsistent() const -{ - if (!canBeAnimatedObject()) - { - if ((getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG) || - mControlAvatar.notNull()) - { - LL_WARNS("AXON") << "Non animatable object has mesh enabled flag or mControlAvatar. Flags " - << getExtendedMeshFlags() << " cav " << mControlAvatar.get() << LL_ENDL; - return false; - } - } - if (!isRootEdit()) - { - if ((getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG) || - mControlAvatar.notNull()) - { - LL_WARNS("AXON") << "Non root object has mesh enabled flag or mControlAvatar. Flags " - << getExtendedMeshFlags() << " cav " << mControlAvatar.get() << LL_ENDL; - return false; - } - } - // If we get here, we have a potentially animatable root volume. - bool is_animation_enabled = getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG; - bool has_control_avatar = (mControlAvatar.notNull()); - if (is_animation_enabled != has_control_avatar) - { - LL_WARNS("AXON") << "Inconsistent state: animation enabled " << is_animation_enabled - << " has control avatar " << has_control_avatar - << " flags " << getExtendedMeshFlags() << " cav " << mControlAvatar.get() << LL_ENDL; - return false; - } - return true; -} - // Called any time parenting changes for a volume. Update flags and // control av accordingly. This is called after parent has been // changed to new_parent. @@ -3507,25 +3466,6 @@ void LLVOVolume::updateAnimatedObjectStateOnReparent(LLViewerObject *old_parent, old_volp->getControlAvatar()->removeAttachmentOverridesForObject(this); } } - - if (old_volp) - { - if (!old_volp->isAnimatedObjectStateConsistent()) - { - LL_WARNS("AXON") << "old_volp failed consistency check" << LL_ENDL; - } - } - if (new_volp) - { - if (!new_volp->isAnimatedObjectStateConsistent()) - { - LL_WARNS("AXON") << "new_volp failed consistency check" << LL_ENDL; - } - } - if (!isAnimatedObjectStateConsistent()) - { - LL_WARNS("AXON") << "child object failed consistency check" << LL_ENDL; - } } //---------------------------------------------------------------------------- @@ -3984,17 +3924,19 @@ void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_u } if (!local_origin && param_type == LLNetworkData::PARAMS_EXTENDED_MESH) { - // AXON better if we could compare the before and after flags directly. U32 extended_mesh_flags = getExtendedMeshFlags(); bool enabled = (extended_mesh_flags & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG); + // AXON This is kind of a guess. Better if we could compare + // the before and after flags directly. What about cases where + // there's no control avatar for optimization reasons? bool was_enabled = (getControlAvatar() != NULL); if (enabled != was_enabled) { LL_DEBUGS("AXON") << (U32) this - << " calling onSetExtendedMeshFlags, enabled " << (U32) enabled - << " was_enabled " << (U32) was_enabled - << " local_origin " << (U32) local_origin - << LL_ENDL; + << " calling onSetExtendedMeshFlags, enabled " << (U32) enabled + << " was_enabled " << (U32) was_enabled + << " local_origin " << (U32) local_origin + << LL_ENDL; onSetExtendedMeshFlags(extended_mesh_flags); } } @@ -5159,13 +5101,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) bool bake_sunlight = LLPipeline::sBakeSunlight && drawablep->isStatic(); - // AXON why this variable? Only different from rigged if - // there are no LLFaces associated with the drawable. - bool is_rigged = false; + bool any_rigged_face = false; if (rigged && rigged_av) { - // AXON don't we want to do this for standalone animesh as well? rigged_av->addAttachmentOverridesForObject(vobj); if (!LLApp::isExiting() && rigged_av->isSelf() && debugLoggingEnabled("AvatarAttachments")) { @@ -5198,7 +5137,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } facep->setState(LLFace::RIGGED); - is_rigged = true; + any_rigged_face = true; //get drawpool of avatar with rigged face LLDrawPoolAvatar* pool = get_avatar_drawpool(vobj); @@ -5542,7 +5481,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } } - if (is_rigged) + if (any_rigged_face) { if (!drawablep->isState(LLDrawable::RIGGED)) { diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index afeb1c852b..afd6c234ee 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -278,7 +278,6 @@ public: void setExtendedMeshFlags(U32 flags); bool canBeAnimatedObject() const; bool isAnimatedObject() const; - bool isAnimatedObjectStateConsistent() const; void updateAnimatedObjectStateOnReparent(LLViewerObject *old_parent, LLViewerObject *new_parent); std::map<LLUUID, S32> mObjectSignaledAnimations; // requested state of Animation name/value |