Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
e156e3ff
Commit
e156e3ff
authored
11 years ago
by
Graham Linden
Browse files
Options
Downloads
Patches
Plain Diff
NORSPEC-343 protect against edits that would set non-alpha faces to diffuse alpha mode blend
parent
f3952f9a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llpanelface.h
+7
-1
7 additions, 1 deletion
indra/newview/llpanelface.h
with
7 additions
and
1 deletion
indra/newview/llpanelface.h
+
7
−
1
View file @
e156e3ff
...
...
@@ -258,7 +258,8 @@ class LLPanelFace : public LLPanel
// _panel->isAlpha() "lies" when one face has alpha and the rest do not (NORSPEC-329)
// need to get per-face answer to this question for sane alpha mode retention on updates.
//
U8
default_alpha_mode
=
object
->
isImageAlphaBlended
(
face
)
?
LLMaterial
::
DIFFUSE_ALPHA_MODE_BLEND
:
LLMaterial
::
DIFFUSE_ALPHA_MODE_NONE
;
bool
is_alpha_face
=
object
->
isImageAlphaBlended
(
face
);
U8
default_alpha_mode
=
is_alpha_face
?
LLMaterial
::
DIFFUSE_ALPHA_MODE_BLEND
:
LLMaterial
::
DIFFUSE_ALPHA_MODE_NONE
;
if
(
!
current_material
.
isNull
())
{
...
...
@@ -278,6 +279,11 @@ class LLPanelFace : public LLPanel
LLUUID
new_normal_map_id
=
new_material
->
getNormalID
();
LLUUID
new_spec_map_id
=
new_material
->
getSpecularID
();
if
((
new_alpha_mode
==
LLMaterial
::
DIFFUSE_ALPHA_MODE_BLEND
)
&&
!
is_alpha_face
)
{
new_alpha_mode
=
LLMaterial
::
DIFFUSE_ALPHA_MODE_NONE
;
}
bool
is_default_blend_mode
=
(
new_alpha_mode
==
default_alpha_mode
);
bool
is_need_material
=
!
is_default_blend_mode
||
!
new_normal_map_id
.
isNull
()
||
!
new_spec_map_id
.
isNull
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment