diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c3243b7dae..b1568a07d9 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -26379,5 +26379,16 @@ Change of this parameter will affect the layout of buttons in notification toast
Value
0
+ FSAutoHideDefaultBodyParts
+
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 135bbe14ed..ff67922ccd 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -9625,6 +9625,13 @@ bool LLVOAvatar::processFullyLoadedChange(bool loading)
mNeedsImpostorUpdate = true;
mLastImpostorUpdateReason = 6;
}
+ // Automatically hide the default body until we know which parts we need
+ static LLCachedControl auto_hide_default_body(gSavedSettings, "FSAutoHideDefaultBodyParts");
+ if (auto_hide_default_body && fully_loaded_changed)
+ {
+ updateMeshVisibility();
+ }
+ //
return changed;
}
@@ -9822,6 +9829,18 @@ void LLVOAvatar::debugColorizeSubMeshes(U32 i, const LLColor4& color)
//-----------------------------------------------------------------------------
void LLVOAvatar::updateMeshVisibility()
{
+ // Automatically hide the default body until we know which parts we need
+ static LLCachedControl auto_hide_default_body(gSavedSettings, "FSAutoHideDefaultBodyParts");
+ // This aims to avoid most cases of "flesh-muppet"/"BOM-Monster"
+ // EARLY‐EXIT: hide all default‐body joints if we are still “cloud”, “gray”,
+ // downloading baked textures, or waiting for attachments.
+ //
+ if ( auto_hide_default_body && getRezzedStatus() < 4 )
+ {
+ hideAllDefaultBodyJoints();
+ return;
+ }
+ //
bool bake_flag[BAKED_NUM_INDICES];
memset(bake_flag, 0, BAKED_NUM_INDICES*sizeof(bool));
@@ -9926,6 +9945,31 @@ void LLVOAvatar::updateMeshVisibility()
}
}
+// Automatically hide the default body until we know which parts we need
+void LLVOAvatar::hideAllDefaultBodyJoints()
+{
+ static const S32 jointIDs[] =
+ {
+ MESH_ID_HAIR,
+ MESH_ID_HEAD,
+ MESH_ID_SKIRT,
+ MESH_ID_UPPER_BODY,
+ MESH_ID_LOWER_BODY,
+ MESH_ID_EYEBALL_LEFT,
+ MESH_ID_EYEBALL_RIGHT,
+ MESH_ID_EYELASH
+ };
+
+ for (S32 idx : jointIDs)
+ {
+ LLAvatarJoint* joint = getViewerJoint(idx);
+ if (joint)
+ {
+ joint->setVisible(false, true);
+ }
+ }
+}
+//
//-----------------------------------------------------------------------------
// updateMeshTextures()
// Uses the current TE values to set the meshes' and layersets' textures.
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 4cb80380fb..de68e03689 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -852,6 +852,7 @@ public:
virtual void dirtyMesh(); // Dirty the avatar mesh
void updateMeshData();
void updateMeshVisibility();
+ void hideAllDefaultBodyJoints(); //
LLViewerTexture* getBakedTexture(const U8 te);
// Matrix palette cache entry