diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-29 21:00:07 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-29 21:23:23 +0300 | 
| commit | 069304ca394d4d6069f00bb976f2d75e82bf675c (patch) | |
| tree | f882ecf526effeda207d418049391a315b17cc2f /indra/newview/llagentwearables.cpp | |
| parent | f6515257a0cc405d6549c5d56302fb0d90176807 (diff) | |
| parent | 1e4f2ec07e32a142f35817d3186a124df3f8cd25 (diff) | |
Merge branch 'master' (DRTVWR-543) into DRTVWR-559
# Conflicts:
#	autobuild.xml
#	indra/llrender/llgl.cpp
#	indra/newview/CMakeLists.txt
#	indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
| -rw-r--r-- | indra/newview/llagentwearables.cpp | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index be168ff5dd..2e769dc737 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -37,6 +37,7 @@  #include "llgesturemgr.h"  #include "llinventorybridge.h"  #include "llinventoryfunctions.h" +#include "llinventorymodelbackgroundfetch.h"  #include "llinventoryobserver.h"  #include "llinventorypanel.h"  #include "lllocaltextureobject.h" @@ -1582,6 +1583,14 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)  		return;  	} +    if (!item->isFinished()) +    { +        LL_WARNS() << "Tried to edit wearable that isn't loaded" << LL_ENDL; +        // Restart fetch or put item to the front +        LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false); +        return; +    } +  	LLViewerWearable* wearable = gAgentWearables.getWearableFromItemID(item_id);  	if (!wearable)  	{ @@ -1595,6 +1604,18 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)  		return;  	} +    S32 shape_count = gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE); +    S32 hair_count = gAgentWearables.getWearableCount(LLWearableType::WT_HAIR); +    S32 eye_count = gAgentWearables.getWearableCount(LLWearableType::WT_EYES); +    S32 skin_count = gAgentWearables.getWearableCount(LLWearableType::WT_SKIN); +    if (!shape_count || !hair_count || !eye_count || !skin_count) +    { +        // Don't let user edit wearables if avatar is cloud due to missing parts. +        // Let user edit wearables if avatar is cloud due to missing textures. +        LL_WARNS() << "Cannot modify wearable. Avatar is cloud and missing parts." << LL_ENDL; +        return; +    } +  	const BOOL disable_camera_switch = LLWearableType::getInstance()->getDisableCameraSwitch(wearable->getType());  	LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance");  	LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch); | 
