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
971ea9f3
Commit
971ea9f3
authored
8 years ago
by
Brad Payne (Vir Linden)
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-7005 - added ability to set base priority and joint priority in anim_tool.py
parent
93db7eac
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
+16
-2
16 additions, 2 deletions
scripts/content_tools/anim_tool.py
with
16 additions
and
2 deletions
scripts/content_tools/anim_tool.py
+
16
−
2
View file @
971ea9f3
...
@@ -406,8 +406,13 @@ def add_joint(self, name, priority):
...
@@ -406,8 +406,13 @@ def add_joint(self, name, priority):
def
delete_joint
(
self
,
name
):
def
delete_joint
(
self
,
name
):
j
=
self
.
find_joint
(
name
)
j
=
self
.
find_joint
(
name
)
if
j
:
if
j
:
if
args
.
verbose
:
print
"
removing joint
"
,
name
anim
.
joints
.
remove
(
j
)
anim
.
joints
.
remove
(
j
)
anim
.
num_joints
=
len
(
self
.
joints
)
anim
.
num_joints
=
len
(
self
.
joints
)
else
:
if
args
.
verbose
:
print
"
joint not found to remove
"
,
name
def
summary
(
self
):
def
summary
(
self
):
nj
=
len
(
self
.
joints
)
nj
=
len
(
self
.
joints
)
...
@@ -500,9 +505,9 @@ def resolve_joints(names, skel_tree, lad_tree):
...
@@ -500,9 +505,9 @@ def resolve_joints(names, skel_tree, lad_tree):
for
elt
in
all_elts
:
for
elt
in
all_elts
:
if
elt
.
get
(
"
name
"
)
is
None
:
if
elt
.
get
(
"
name
"
)
is
None
:
continue
continue
print
elt
.
get
(
"
name
"
),
"
hud
"
,
elt
.
get
(
"
hud
"
)
#
print elt.get("name"),"hud",elt.get("hud")
if
args
.
no_hud
and
elt
.
get
(
"
hud
"
):
if
args
.
no_hud
and
elt
.
get
(
"
hud
"
):
print
"
skipping hud joint
"
,
elt
.
get
(
"
name
"
)
#
print "skipping hud joint", elt.get("name")
continue
continue
if
elt
.
get
(
"
name
"
)
in
names
or
elt
.
tag
in
names
:
if
elt
.
get
(
"
name
"
)
in
names
or
elt
.
tag
in
names
:
matches
.
append
(
elt
.
get
(
"
name
"
))
matches
.
append
(
elt
.
get
(
"
name
"
))
...
@@ -532,6 +537,8 @@ def resolve_joints(names, skel_tree, lad_tree):
...
@@ -532,6 +537,8 @@ def resolve_joints(names, skel_tree, lad_tree):
parser
.
add_argument
(
"
--lad
"
,
help
=
"
name of the avatar_lad file
"
,
default
=
os
.
path
.
join
(
path_to_skel
,
"
avatar_lad.xml
"
))
parser
.
add_argument
(
"
--lad
"
,
help
=
"
name of the avatar_lad file
"
,
default
=
os
.
path
.
join
(
path_to_skel
,
"
avatar_lad.xml
"
))
parser
.
add_argument
(
"
--set_version
"
,
nargs
=
2
,
type
=
int
,
help
=
"
set version and sub-version to specified values
"
)
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
(
"
--no_hud
"
,
help
=
"
omit hud joints from list of attachments
"
,
action
=
"
store_true
"
)
parser
.
add_argument
(
"
--base_priority
"
,
help
=
"
set base priority
"
,
type
=
int
)
parser
.
add_argument
(
"
--joint_priority
"
,
help
=
"
set joint priority for all joints
"
,
type
=
int
)
parser
.
add_argument
(
"
infilename
"
,
help
=
"
name of a .anim file to input
"
)
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
"
)
parser
.
add_argument
(
"
outfilename
"
,
nargs
=
"
?
"
,
help
=
"
name of a .anim file to output
"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
@@ -591,6 +598,13 @@ def resolve_joints(names, skel_tree, lad_tree):
...
@@ -591,6 +598,13 @@ def resolve_joints(names, skel_tree, lad_tree):
if
args
.
set_version
:
if
args
.
set_version
:
anim
.
version
=
args
.
set_version
[
0
]
anim
.
version
=
args
.
set_version
[
0
]
anim
.
sub_version
=
args
.
set_version
[
1
]
anim
.
sub_version
=
args
.
set_version
[
1
]
if
args
.
base_priority
is
not
None
:
print
"
set base priority
"
,
args
.
base_priority
anim
.
base_priority
=
args
.
base_priority
if
args
.
joint_priority
is
not
None
:
print
"
set joint priority
"
,
args
.
joint_priority
for
joint
in
anim
.
joints
:
joint
.
joint_priority
=
args
.
joint_priority
if
args
.
dump
:
if
args
.
dump
:
anim
.
dump
(
args
.
dump
)
anim
.
dump
(
args
.
dump
)
if
args
.
summary
:
if
args
.
summary
:
...
...
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