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
c8283782
Commit
c8283782
authored
9 years ago
by
Brad Payne (Vir Linden)
Browse files
Options
Downloads
Patches
Plain Diff
SL-234 WIP - fix for enforcement of MaxJointsPerMeshObject limit
parent
8970e9c6
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/llskinningutil.cpp
+12
-3
12 additions, 3 deletions
indra/newview/llskinningutil.cpp
with
12 additions
and
3 deletions
indra/newview/llskinningutil.cpp
+
12
−
3
View file @
c8283782
...
...
@@ -154,6 +154,8 @@ void LLSkinningUtil::remapSkinInfoJoints(LLVOAvatar *avatar, LLMeshSkinInfo* ski
return
;
}
U32
max_joints
=
getMeshJointCount
(
skin
);
// Compute the remap
std
::
vector
<
U32
>
j_proxy
(
skin
->
mJointNames
.
size
());
for
(
U32
j
=
0
;
j
<
skin
->
mJointNames
.
size
();
++
j
)
...
...
@@ -163,13 +165,19 @@ void LLSkinningUtil::remapSkinInfoJoints(LLVOAvatar *avatar, LLMeshSkinInfo* ski
}
S32
top
=
0
;
std
::
vector
<
U32
>
j_remap
(
skin
->
mJointNames
.
size
());
// Fill in j_remap for all joints that will
make the cu
t.
// Fill in j_remap for all joints that will
be kep
t.
for
(
U32
j
=
0
;
j
<
skin
->
mJointNames
.
size
();
++
j
)
{
if
(
j_proxy
[
j
]
==
j
)
{
// Joint will be included
j_remap
[
j
]
=
top
++
;
j_remap
[
j
]
=
top
;
if
(
top
<
max_joints
-
1
)
{
top
++
;
}
}
}
// Then use j_proxy to fill in j_remap for the joints that will be discarded
...
...
@@ -189,7 +197,7 @@ void LLSkinningUtil::remapSkinInfoJoints(LLVOAvatar *avatar, LLMeshSkinInfo* ski
for
(
U32
j
=
0
;
j
<
skin
->
mJointNames
.
size
();
++
j
)
{
if
(
j_proxy
[
j
]
==
j
)
if
(
j_proxy
[
j
]
==
j
&&
new_joint_names
.
size
()
<
max_joints
)
{
new_joint_names
.
push_back
(
skin
->
mJointNames
[
j
]);
new_inv_bind_matrix
.
push_back
(
skin
->
mInvBindMatrix
[
j
]);
...
...
@@ -199,6 +207,7 @@ void LLSkinningUtil::remapSkinInfoJoints(LLVOAvatar *avatar, LLMeshSkinInfo* ski
}
}
}
llassert
(
new_joint_names
.
size
()
<=
max_joints
);
for
(
U32
j
=
0
;
j
<
skin
->
mJointNames
.
size
();
++
j
)
{
...
...
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