diff options
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 403bff5a9e..07032ca0ae 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3349,22 +3349,25 @@ bool LLVOVolume::canBeAnimatedObject() const { return false; } -// AXON remove this check if animated object attachments are allowed -#if 0 - if (isAttachment()) - { - return false; - } -#endif if (!getVolume()) { return false; } + if (!isRootEdit()) + { + return false; + } const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(getVolume()->getParams().getSculptID(), this); if (!skin) { return false; } + F32 est_tris = recursiveGetEstTrianglesHigh(); + if (est_tris > getAnimatedObjectMaxTris()) + { + LL_INFOS() << "est_tris " << est_tris << " exceeds limit " << getAnimatedObjectMaxTris() << LL_ENDL; + return false; + } return true; } @@ -3833,6 +3836,15 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const return (U32)shame; } +F32 LLVOVolume::getEstTrianglesHigh() const +{ + if (isMesh()) + { + return gMeshRepo.getEstTrianglesHigh(getVolume()->getParams().getSculptID()); + } + return 0.f; +} + F32 LLVOVolume::getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_value) const { F32 radius = getScale().length()*0.5f; |