MAINT-2564 FIXED Alpha mask does not hide hair in the Outfit Editor

Wed, 21 Feb 2018 15:10:40 +0200

author
maxim_productengine<mnikolenko@productengine.com>
date
Wed, 21 Feb 2018 15:10:40 +0200
changeset 55295
1cc71faf5b25
parent 55294
ad11009ccf96
child 55296
e7f8a14d0adc

MAINT-2564 FIXED Alpha mask does not hide hair in the Outfit Editor

indra/newview/llpaneleditwearable.cpp file | annotate | diff | revisions
indra/newview/llvoavatar.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llpaneleditwearable.cpp	Wed Feb 21 01:25:05 2018 +0200
     1.2 +++ b/indra/newview/llpaneleditwearable.cpp	Wed Feb 21 15:10:40 2018 +0200
     1.3 @@ -1624,7 +1624,7 @@
     1.4          initPreviousAlphaTextureEntry(TEX_UPPER_ALPHA);
     1.5          initPreviousAlphaTextureEntry(TEX_HEAD_ALPHA);
     1.6          initPreviousAlphaTextureEntry(TEX_EYES_ALPHA);
     1.7 -        initPreviousAlphaTextureEntry(TEX_LOWER_ALPHA);
     1.8 +        initPreviousAlphaTextureEntry(TEX_HAIR_ALPHA);
     1.9  }
    1.10  
    1.11  void LLPanelEditWearable::initPreviousAlphaTextureEntry(LLAvatarAppearanceDefines::ETextureIndex te)
     2.1 --- a/indra/newview/llvoavatar.cpp	Wed Feb 21 01:25:05 2018 +0200
     2.2 +++ b/indra/newview/llvoavatar.cpp	Wed Feb 21 15:10:40 2018 +0200
     2.3 @@ -7366,11 +7366,13 @@
     2.4  			debugColorizeSubMeshes(i,LLColor4::blue);
     2.5  		}
     2.6  	}
     2.7 +	static LLUUID default_alpha_uuid = LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID"));
     2.8 +	bool hair_alpha_exists = (getImage(TEX_HAIR_ALPHA, 0) && getImage(TEX_HAIR_ALPHA, 0)->getID() != default_alpha_uuid);
     2.9  
    2.10  	// set texture and color of hair manually if we are not using a baked image.
    2.11  	// This can happen while loading hair for yourself, or for clients that did not
    2.12  	// bake a hair texture. Still needed for yourself after 1.22 is depricated.
    2.13 -	if (!is_layer_baked[BAKED_HAIR] || isEditingAppearance())
    2.14 +	if (!is_layer_baked[BAKED_HAIR] || (isEditingAppearance() && !hair_alpha_exists))
    2.15  	{
    2.16  		const LLColor4 color = mTexHairColor ? mTexHairColor->getColor() : LLColor4(1,1,1,1);
    2.17  		LLViewerTexture* hair_img = getImage( TEX_HAIR, 0 );

mercurial