Skip to content
Snippets Groups Projects
Commit 61129c73 authored by Graham Linden's avatar Graham Linden
Browse files

NORSPEC-346 fix knock-on causing alpha mask edits to cause materials to get...

NORSPEC-346 fix knock-on causing alpha mask edits to cause materials to get removed and revert to alpha blend
parent c93354cf
No related branches found
No related tags found
No related merge requests found
......@@ -259,8 +259,13 @@ class LLPanelFace : public LLPanel
// need to get per-face answer to this question for sane alpha mode retention on updates.
//
bool is_alpha_face = object->isImageAlphaBlended(face);
U8 default_alpha_mode = is_alpha_face ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
// need to keep this original answer for valid comparisons in logic below
//
U8 original_default_alpha_mode = is_alpha_face ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
U8 default_alpha_mode = original_default_alpha_mode;
if (!current_material.isNull())
{
default_alpha_mode = current_material->getDiffuseAlphaMode();
......@@ -285,7 +290,7 @@ class LLPanelFace : public LLPanel
new_material->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
}
bool is_default_blend_mode = (new_alpha_mode == default_alpha_mode);
bool is_default_blend_mode = (new_alpha_mode == original_default_alpha_mode);
bool is_need_material = !is_default_blend_mode || !new_normal_map_id.isNull() || !new_spec_map_id.isNull();
if (!is_need_material)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment