Featurebug
=== Pull request version === Re-enabled fix for avatar body invisibility featurebug (archaic) Added option to adjust maximum attachment span with settings Added option to enable automatic derendering of huge attachments (use with care) Conflicts: indra/newview/app_settings/settings_effervescence.xml
This commit is contained in:
@@ -17225,6 +17225,28 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<string>Random</string>
|
<string>Random</string>
|
||||||
</map>
|
</map>
|
||||||
|
<key>DerenderHugeAttachments</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Allow the viewer to automatically hide attachmnets that are really just way too big</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</map>
|
||||||
|
<key>MaxAttachmentSpan</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Size constraint for attachments (minimum value == 256.0)</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>F32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<real>1280.0</real>
|
||||||
|
</map>
|
||||||
</map>
|
</map>
|
||||||
</llsd>
|
</llsd>
|
||||||
|
|
||||||
|
|||||||
@@ -1616,13 +1616,16 @@ void LLVOAvatar::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax)
|
|||||||
|
|
||||||
void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
|
void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
|
||||||
{
|
{
|
||||||
|
static const LLCachedControl<bool> control_derender_huge_attachments("DerenderHugeAttachments", true);
|
||||||
|
static const LLCachedControl<F32> control_max_attachment_span("MaxAttachmentSpan", 5.0f * DEFAULT_MAX_PRIM_SCALE);
|
||||||
|
|
||||||
LLVector4a buffer(0.25f);
|
LLVector4a buffer(0.25f);
|
||||||
LLVector4a pos;
|
LLVector4a pos;
|
||||||
pos.load3(getRenderPosition().mV);
|
pos.load3(getRenderPosition().mV);
|
||||||
newMin.setSub(pos, buffer);
|
newMin.setSub(pos, buffer);
|
||||||
newMax.setAdd(pos, buffer);
|
newMax.setAdd(pos, buffer);
|
||||||
|
|
||||||
float max_attachment_span = DEFAULT_MAX_PRIM_SCALE * 5.0f;
|
float max_attachment_span = llmax<F32>(DEFAULT_MAX_PRIM_SCALE, control_max_attachment_span);
|
||||||
|
|
||||||
//stretch bounding box by joint positions
|
//stretch bounding box by joint positions
|
||||||
for (polymesh_map_t::iterator i = mPolyMeshes.begin(); i != mPolyMeshes.end(); ++i)
|
for (polymesh_map_t::iterator i = mPolyMeshes.begin(); i != mPolyMeshes.end(); ++i)
|
||||||
@@ -1645,10 +1648,12 @@ void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
|
|||||||
|
|
||||||
mPixelArea = LLPipeline::calcPixelArea(center, size, *LLViewerCamera::getInstance());
|
mPixelArea = LLPipeline::calcPixelArea(center, size, *LLViewerCamera::getInstance());
|
||||||
|
|
||||||
|
static std::vector<LLViewerObject*> removal;
|
||||||
|
|
||||||
//stretch bounding box by attachments
|
//stretch bounding box by attachments
|
||||||
/*for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
|
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
|
||||||
iter != mAttachmentPoints.end();
|
iter != mAttachmentPoints.end();
|
||||||
++iter)
|
++iter)
|
||||||
{
|
{
|
||||||
LLViewerJointAttachment* attachment = iter->second;
|
LLViewerJointAttachment* attachment = iter->second;
|
||||||
|
|
||||||
@@ -1661,13 +1666,7 @@ void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
|
|||||||
attachment_iter != attachment->mAttachedObjects.end();
|
attachment_iter != attachment->mAttachedObjects.end();
|
||||||
++attachment_iter)
|
++attachment_iter)
|
||||||
{
|
{
|
||||||
const LLViewerObject* attached_object = (*attachment_iter);*/
|
const LLViewerObject* attached_object = (*attachment_iter);
|
||||||
std::vector<std::pair<LLViewerObject*,LLViewerJointAttachment*> >::iterator attachment_iter = mAttachedObjectsVector.begin();
|
|
||||||
for(;attachment_iter!=mAttachedObjectsVector.end();++attachment_iter)
|
|
||||||
{
|
|
||||||
if(attachment_iter->second->getValid())
|
|
||||||
{
|
|
||||||
const LLViewerObject* attached_object = attachment_iter->first;
|
|
||||||
if (attached_object && !attached_object->isHUDAttachment())
|
if (attached_object && !attached_object->isHUDAttachment())
|
||||||
{
|
{
|
||||||
LLDrawable* drawable = attached_object->mDrawable;
|
LLDrawable* drawable = attached_object->mDrawable;
|
||||||
@@ -1691,12 +1690,26 @@ void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
|
|||||||
update_min_max(newMin,newMax,ext[0]);
|
update_min_max(newMin,newMax,ext[0]);
|
||||||
update_min_max(newMin,newMax,ext[1]);
|
update_min_max(newMin,newMax,ext[1]);
|
||||||
}
|
}
|
||||||
|
else if(control_derender_huge_attachments)
|
||||||
|
{
|
||||||
|
removal.push_back((LLViewerObject *)attached_object);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(removal.size() > 0)
|
||||||
|
{
|
||||||
|
for(std::vector<LLViewerObject*>::iterator removal_iter = removal.begin(); removal_iter != removal.end(); ++removal_iter)
|
||||||
|
{
|
||||||
|
LLViewerObject *object_to_remove = *removal_iter;
|
||||||
|
gObjectList.killObject(object_to_remove);
|
||||||
|
}
|
||||||
|
removal.clear();
|
||||||
|
}
|
||||||
|
|
||||||
//pad bounding box
|
//pad bounding box
|
||||||
|
|
||||||
newMin.sub(buffer);
|
newMin.sub(buffer);
|
||||||
|
|||||||
Reference in New Issue
Block a user