diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-11-08 19:56:09 +0000 | 
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-11-08 19:56:09 +0000 | 
| commit | c7a0b25977a5ca30fc1726370f6363349ff9f836 (patch) | |
| tree | a0f005c212bffe32e6db5c42542dfc272a3c525d | |
| parent | 14f429329f5e9c570ff4e79f177f3bb8d0471252 (diff) | |
SL-831 - animesh objects are not required to have any tris. If they have no tris, we don't bother making a control avatar for them.
| -rw-r--r-- | indra/newview/llselectmgr.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llvovolume.cpp | 16 | 
2 files changed, 14 insertions, 5 deletions
| diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index e8b2d1ec8c..f666f447cb 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -691,7 +691,7 @@ bool LLSelectMgr::enableLinkObjects()  			new_value = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly);  		}  	} -    if (!LLSelectMgr::getInstance()->getSelection()->checkAnimatedObjectLinkable()) +    if (!LLSelectMgr::getInstance()->getSelection()->checkAnimatedObjectEstTris())      {          new_value = false;      } @@ -7451,6 +7451,7 @@ bool LLObjectSelection::checkAnimatedObjectEstTris()  bool LLObjectSelection::checkAnimatedObjectLinkable()  { +    LL_ERRS() << "Not using this restriction" << LL_ENDL;      // Can't link if any of the roots is currently an animated object  	for (root_iterator iter = root_begin(); iter != root_end(); ++iter)  	{ diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 9d98822082..54029f75fd 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3410,9 +3410,9 @@ void LLVOVolume::setExtendedMeshFlags(U32 flags)  bool LLVOVolume::canBeAnimatedObject() const  {      F32 est_tris = recursiveGetEstTrianglesMax(); -    if (est_tris <= 0 || est_tris > getAnimatedObjectMaxTris()) +    if (est_tris < 0 || est_tris > getAnimatedObjectMaxTris())      { -        LL_DEBUGS("AXON") << "est_tris " << est_tris << " is outside limit of 1-" << getAnimatedObjectMaxTris() << LL_ENDL; +        LL_DEBUGS("AXON") << "est_tris " << est_tris << " is outside limit of 0-" << getAnimatedObjectMaxTris() << LL_ENDL;          return false;      }      return true; @@ -5138,8 +5138,16 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)              {                  if (!vobj->getControlAvatar())                  { -                    LL_DEBUGS("AXON") << vobj_name << " calling linkControlAvatar()" << LL_ENDL; -                    vobj->linkControlAvatar(); +                    F32 tri_count = vobj->getRootEdit()->recursiveGetEstTrianglesMax(); +                    if (tri_count <= 0.f) +                    { +                        LL_DEBUGS("AXON") << vobj_name << " not calling linkControlAvatar(), because no tris" << LL_ENDL; +                    } +                    else +                    { +                        LL_DEBUGS("AXON") << vobj_name << " calling linkControlAvatar()" << LL_ENDL; +                        vobj->linkControlAvatar(); +                    }                  }                  if (vobj->getControlAvatar())                  { | 
