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
1f2ceb97
Commit
1f2ceb97
authored
4 years ago
by
Andrey Kleshchev
Browse files
Options
Downloads
Patches
Plain Diff
SL-13583 Some behavior tweaks #2
parent
d240d381
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/llfloatermodelpreview.cpp
+2
-0
2 additions, 0 deletions
indra/newview/llfloatermodelpreview.cpp
indra/newview/llmodelpreview.cpp
+12
-0
12 additions, 0 deletions
indra/newview/llmodelpreview.cpp
indra/newview/llmodelpreview.h
+1
-0
1 addition, 0 deletions
indra/newview/llmodelpreview.h
with
15 additions
and
0 deletions
indra/newview/llfloatermodelpreview.cpp
+
2
−
0
View file @
1f2ceb97
...
...
@@ -348,6 +348,8 @@ void LLFloaterModelPreview::onUploadOptionChecked(LLUICtrl* ctrl)
auto
name
=
ctrl
->
getName
();
// update the option and notifications
// (this is a bit convoluted, because of the current structure of mModelPreview)
// FIX ME! mViewOption is malfunctioning here! mViewOption doesn't have values like "upload_skin"!
// This needs to translate values like "upload_skin" into "show_skin_weights"
mModelPreview
->
mViewOption
[
name
]
=
!
mModelPreview
->
mViewOption
[
name
];
mModelPreview
->
refresh
();
// a 'dirty' flag for render
mModelPreview
->
resetPreviewTarget
();
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llmodelpreview.cpp
+
12
−
0
View file @
1f2ceb97
...
...
@@ -180,6 +180,7 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
,
mResetJoints
(
false
)
,
mModelNoErrors
(
true
)
,
mLastJointUpdate
(
false
)
,
mFirstSkinUpdate
(
true
)
,
mHasDegenerate
(
false
)
,
mImporterDebug
(
LLCachedControl
<
bool
>
(
gSavedSettings
,
"ImporterDebug"
,
false
))
{
...
...
@@ -2799,11 +2800,22 @@ BOOL LLModelPreview::render()
{
if
(
flags
==
LEGACY_RIG_OK
)
{
if
(
mFirstSkinUpdate
)
{
// auto enable weight upload if weights are present
// (note: all these UI updates need to be somewhere that is not render)
mViewOption
[
"show_skin_weight"
]
=
true
;
skin_weight
=
true
;
fmp
->
childSetValue
(
"upload_skin"
,
true
);
mFirstSkinUpdate
=
false
;
}
fmp
->
enableViewOption
(
"show_skin_weight"
);
fmp
->
setViewOptionEnabled
(
"show_joint_overrides"
,
skin_weight
);
fmp
->
setViewOptionEnabled
(
"show_joint_positions"
,
skin_weight
);
mFMP
->
childEnable
(
"upload_skin"
);
mFMP
->
childSetValue
(
"show_skin_weight"
,
skin_weight
);
}
else
if
((
flags
&
LEGACY_RIG_FLAG_TOO_MANY_JOINTS
)
>
0
)
{
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llmodelpreview.h
+
1
−
0
View file @
1f2ceb97
...
...
@@ -301,6 +301,7 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
U32
mLegacyRigFlags
;
bool
mLastJointUpdate
;
bool
mFirstSkinUpdate
;
JointNameSet
mJointsFromNode
;
JointTransformMap
mJointTransformMap
;
...
...
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