Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
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
JennaHuntsman
XDG Integration
Commits
4705515e
Unverified
Commit
4705515e
authored
1 year ago
by
Maxim Nikolenko
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
SL-19303 switch automatically between Materials/PBR/Media based on current values
parent
2f035e45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!3
Update to main branch
,
!2
Rebase onto current main branch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llpanelface.cpp
+46
-24
46 additions, 24 deletions
indra/newview/llpanelface.cpp
with
46 additions
and
24 deletions
indra/newview/llpanelface.cpp
+
46
−
24
View file @
4705515e
...
@@ -1022,6 +1022,52 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
...
@@ -1022,6 +1022,52 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
}
}
}
// *NOTE: The "identical" variable is currently only used to decide if
// the texgen control should be tentative - this is not used by GLTF
// materials. -Cosmic;2022-11-09
bool
identical
=
true
;
// true because it is anded below
bool
identical_diffuse
=
false
;
bool
identical_norm
=
false
;
bool
identical_spec
=
false
;
LLTextureCtrl
*
texture_ctrl
=
getChild
<
LLTextureCtrl
>
(
"texture control"
);
LLTextureCtrl
*
shinytexture_ctrl
=
getChild
<
LLTextureCtrl
>
(
"shinytexture control"
);
LLTextureCtrl
*
bumpytexture_ctrl
=
getChild
<
LLTextureCtrl
>
(
"bumpytexture control"
);
LLUUID
id
;
LLUUID
normmap_id
;
LLUUID
specmap_id
;
LLSelectedTE
::
getTexId
(
id
,
identical_diffuse
);
LLSelectedTEMaterial
::
getNormalID
(
normmap_id
,
identical_norm
);
LLSelectedTEMaterial
::
getSpecularID
(
specmap_id
,
identical_spec
);
static
S32
selected_te
=
-
1
;
if
((
LLToolFace
::
getInstance
()
==
LLToolMgr
::
getInstance
()
->
getCurrentTool
())
&&
!
LLSelectMgr
::
getInstance
()
->
getSelection
()
->
isMultipleTESelected
())
{
S32
new_selection
=
LLSelectMgr
::
getInstance
()
->
getSelection
()
->
getFirstNode
()
->
getLastSelectedTE
();
if
(
new_selection
!=
selected_te
)
{
bool
te_has_media
=
objectp
->
getTE
(
new_selection
)
&&
objectp
->
getTE
(
new_selection
)
->
hasMedia
();
bool
te_has_pbr
=
objectp
->
getRenderMaterialID
(
new_selection
).
notNull
();
if
(
te_has_pbr
&&
!
((
mComboMatMedia
->
getCurrentIndex
()
==
MATMEDIA_MEDIA
)
&&
te_has_media
))
{
mComboMatMedia
->
selectNthItem
(
MATMEDIA_PBR
);
}
else
if
(
te_has_media
)
{
mComboMatMedia
->
selectNthItem
(
MATMEDIA_MEDIA
);
}
else
if
(
id
.
notNull
()
||
normmap_id
.
notNull
()
||
specmap_id
.
notNull
())
{
mComboMatMedia
->
selectNthItem
(
MATMEDIA_MATERIAL
);
}
selected_te
=
new_selection
;
}
}
mComboMatMedia
->
setEnabled
(
editable
);
mComboMatMedia
->
setEnabled
(
editable
);
LLRadioGroup
*
radio_mat_type
=
getChild
<
LLRadioGroup
>
(
"radio_material_type"
);
LLRadioGroup
*
radio_mat_type
=
getChild
<
LLRadioGroup
>
(
"radio_material_type"
);
...
@@ -1045,22 +1091,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
...
@@ -1045,22 +1091,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
updateVisibility
();
updateVisibility
();
// *NOTE: The "identical" variable is currently only used to decide if
// the texgen control should be tentative - this is not used by GLTF
// materials. -Cosmic;2022-11-09
bool
identical
=
true
;
// true because it is anded below
bool
identical_diffuse
=
false
;
bool
identical_norm
=
false
;
bool
identical_spec
=
false
;
LLTextureCtrl
*
texture_ctrl
=
getChild
<
LLTextureCtrl
>
(
"texture control"
);
LLTextureCtrl
*
shinytexture_ctrl
=
getChild
<
LLTextureCtrl
>
(
"shinytexture control"
);
LLTextureCtrl
*
bumpytexture_ctrl
=
getChild
<
LLTextureCtrl
>
(
"bumpytexture control"
);
LLUUID
id
;
LLUUID
normmap_id
;
LLUUID
specmap_id
;
// Color swatch
// Color swatch
{
{
getChildView
(
"color label"
)
->
setEnabled
(
editable
);
getChildView
(
"color label"
)
->
setEnabled
(
editable
);
...
@@ -1090,9 +1120,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
...
@@ -1090,9 +1120,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChild
<
LLUICtrl
>
(
"ColorTrans"
)
->
setValue
(
editable
?
transparency
:
0
);
getChild
<
LLUICtrl
>
(
"ColorTrans"
)
->
setValue
(
editable
?
transparency
:
0
);
getChildView
(
"ColorTrans"
)
->
setEnabled
(
editable
&&
has_material
);
getChildView
(
"ColorTrans"
)
->
setEnabled
(
editable
&&
has_material
);
// Specular map
LLSelectedTEMaterial
::
getSpecularID
(
specmap_id
,
identical_spec
);
U8
shiny
=
0
;
U8
shiny
=
0
;
bool
identical_shiny
=
false
;
bool
identical_shiny
=
false
;
...
@@ -1158,11 +1185,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
...
@@ -1158,11 +1185,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
// Texture
// Texture
{
{
LLSelectedTE
::
getTexId
(
id
,
identical_diffuse
);
// Normal map
LLSelectedTEMaterial
::
getNormalID
(
normmap_id
,
identical_norm
);
mIsAlpha
=
FALSE
;
mIsAlpha
=
FALSE
;
LLGLenum
image_format
=
GL_RGB
;
LLGLenum
image_format
=
GL_RGB
;
bool
identical_image_format
=
false
;
bool
identical_image_format
=
false
;
...
...
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