Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Niflib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant Kim
Niflib
Commits
24fa242d
Commit
24fa242d
authored
19 years ago
by
Shon Ferguson
Browse files
Options
Downloads
Patches
Plain Diff
Corrected skeleton root calculation.
parent
e1ff09a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nif_attrs.h
+21
-2
21 additions, 2 deletions
nif_attrs.h
with
21 additions
and
2 deletions
nif_attrs.h
+
21
−
2
View file @
24fa242d
...
...
@@ -1322,8 +1322,27 @@ public:
WriteUInt
(
FindRoot
().
get_index
(),
out
);
}
blk_ref
FindRoot
()
const
{
//Find Skeleton Root - first node in ancestry that has 'not a skin influence' flag set
blk_ref
block
(
_owner
);
//Find Skeleton Root - first node in ancestry of any bone that has 'not a skin influence' flag set
//Get skin data to find a bone
blk_ref
skin_dat_blk
=
_owner
->
GetAttr
(
"Data"
);
//If there is no skin data, return a null block
if
(
skin_dat_blk
.
is_null
()
==
true
)
{
return
blk_ref
(
-
1
);
}
//Get bones from skin data
ISkinData
*
skin_dat_int
=
QuerySkinData
(
skin_dat_blk
);
vector
<
blk_ref
>
bones
=
skin_dat_int
->
GetBones
();
//If size of bones is zero, return a null block
if
(
bones
.
size
()
==
0
)
{
return
blk_ref
(
-
1
);
}
//Arbitrarily start at the first bone in the list
blk_ref
block
=
bones
[
0
];
blk_ref
par
;
int
flags
;
while
(
true
)
{
...
...
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