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
a46fdc10
Commit
a46fdc10
authored
8 years ago
by
Brad Payne (Vir Linden)
Browse files
Options
Downloads
Patches
Plain Diff
SL-315 - option to skip hud joints in anim_tool.py
parent
e8afa4c4
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
scripts/content_tools/anim_tool.py
+15
-3
15 additions, 3 deletions
scripts/content_tools/anim_tool.py
with
15 additions
and
3 deletions
scripts/content_tools/anim_tool.py
+
15
−
3
View file @
a46fdc10
...
...
@@ -491,10 +491,21 @@ def get_elt_pos(elt):
return
(
0.0
,
0.0
,
0.0
)
def
resolve_joints
(
names
,
skel_tree
,
lad_tree
):
print
"
resolve joints, no_hud is
"
,
args
.
no_hud
if
skel_tree
and
lad_tree
:
matches
=
[
element
.
get
(
"
name
"
)
for
element
in
skel_tree
.
getroot
().
iter
()
if
(
element
.
get
(
"
name
"
)
in
names
)
or
(
element
.
tag
in
names
)]
matches
.
extend
([
element
.
get
(
"
name
"
)
for
element
in
lad_tree
.
getroot
().
iter
()
if
(
element
.
get
(
"
name
"
)
in
names
)
or
(
element
.
tag
in
names
)])
return
matches
all_elts
=
[
elt
for
elt
in
skel_tree
.
getroot
().
iter
()]
all_elts
.
extend
([
elt
for
elt
in
lad_tree
.
getroot
().
iter
()])
matches
=
[]
for
elt
in
all_elts
:
if
elt
.
get
(
"
name
"
)
is
None
:
continue
print
elt
.
get
(
"
name
"
),
"
hud
"
,
elt
.
get
(
"
hud
"
)
if
args
.
no_hud
and
elt
.
get
(
"
hud
"
):
print
"
skipping hud joint
"
,
elt
.
get
(
"
name
"
)
continue
if
elt
.
get
(
"
name
"
)
in
names
or
elt
.
tag
in
names
:
matches
.
append
(
elt
.
get
(
"
name
"
))
return
list
(
set
(
matches
))
else
:
return
names
...
...
@@ -513,6 +524,7 @@ def resolve_joints(names, skel_tree, lad_tree):
parser
.
add_argument
(
"
--skel
"
,
help
=
"
name of the avatar_skeleton file
"
,
default
=
"
avatar_skeleton.xml
"
)
parser
.
add_argument
(
"
--lad
"
,
help
=
"
name of the avatar_lad file
"
,
default
=
"
avatar_lad.xml
"
)
parser
.
add_argument
(
"
--set_version
"
,
nargs
=
2
,
type
=
int
,
help
=
"
set version and sub-version to specified values
"
)
parser
.
add_argument
(
"
--no_hud
"
,
help
=
"
omit hud joints from list of attachments
"
,
action
=
"
store_true
"
)
parser
.
add_argument
(
"
infilename
"
,
help
=
"
name of a .anim file to input
"
)
parser
.
add_argument
(
"
outfilename
"
,
nargs
=
"
?
"
,
help
=
"
name of a .anim file to output
"
)
args
=
parser
.
parse_args
()
...
...
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