Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender_nif_plugin
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
Container Registry
Model registry
Operate
Environments
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
blender_nif_plugin
Commits
24349481
Commit
24349481
authored
3 years ago
by
Candoran2
Committed by
neomonkeus
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Changed armature export so that the pose position (pose or rest) is preserved.
parent
d22cc667
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
io_scene_niftools/modules/nif_export/geometry/mesh/__init__.py
+3
-2
3 additions, 2 deletions
...ene_niftools/modules/nif_export/geometry/mesh/__init__.py
io_scene_niftools/nif_export.py
+1
-5
1 addition, 5 deletions
io_scene_niftools/nif_export.py
with
4 additions
and
7 deletions
io_scene_niftools/modules/nif_export/geometry/mesh/__init__.py
+
3
−
2
View file @
24349481
...
@@ -452,7 +452,7 @@ class Mesh:
...
@@ -452,7 +452,7 @@ class Mesh:
# update bind position skinning data
# update bind position skinning data
# trishape.update_bind_position()
# trishape.update_bind_position()
# override pyffi
t
trishape.update_bind_position with custom one that is relative to the nif root
# override pyffi trishape.update_bind_position with custom one that is relative to the nif root
self
.
update_bind_position
(
trishape
,
n_root
)
self
.
update_bind_position
(
trishape
,
n_root
)
# calculate center and radius for each skin bone data block
# calculate center and radius for each skin bone data block
...
@@ -720,6 +720,7 @@ class Mesh:
...
@@ -720,6 +720,7 @@ class Mesh:
# get the armature influencing this mesh, if it exists
# get the armature influencing this mesh, if it exists
b_armature_obj
=
b_obj
.
find_armature
()
b_armature_obj
=
b_obj
.
find_armature
()
if
b_armature_obj
:
if
b_armature_obj
:
old_position
=
b_armature_obj
.
data
.
pose_position
b_armature_obj
.
data
.
pose_position
=
'
REST
'
b_armature_obj
.
data
.
pose_position
=
'
REST
'
# make sure the model has a triangulation modifier
# make sure the model has a triangulation modifier
...
@@ -730,7 +731,7 @@ class Mesh:
...
@@ -730,7 +731,7 @@ class Mesh:
eval_obj
=
b_obj
.
evaluated_get
(
dg
)
eval_obj
=
b_obj
.
evaluated_get
(
dg
)
eval_mesh
=
eval_obj
.
to_mesh
(
preserve_all_data_layers
=
True
,
depsgraph
=
dg
)
eval_mesh
=
eval_obj
.
to_mesh
(
preserve_all_data_layers
=
True
,
depsgraph
=
dg
)
if
b_armature_obj
:
if
b_armature_obj
:
b_armature_obj
.
data
.
pose_position
=
'
POSE
'
b_armature_obj
.
data
.
pose_position
=
old_position
return
eval_mesh
return
eval_mesh
def
ensure_tri_modifier
(
self
,
b_obj
):
def
ensure_tri_modifier
(
self
,
b_obj
):
...
...
This diff is collapsed.
Click to expand it.
io_scene_niftools/nif_export.py
+
1
−
5
View file @
24349481
...
@@ -100,11 +100,7 @@ class NifExport(NifCommon):
...
@@ -100,11 +100,7 @@ class NifExport(NifCommon):
return
{
'
FINISHED
'
}
return
{
'
FINISHED
'
}
for
b_obj
in
self
.
exportable_objects
:
for
b_obj
in
self
.
exportable_objects
:
# armatures should not be in rest position
if
b_obj
.
type
==
'
MESH
'
:
if
b_obj
.
type
==
'
ARMATURE
'
:
b_obj
.
data
.
pose_position
=
'
POSE
'
elif
b_obj
.
type
==
'
MESH
'
:
if
b_obj
.
parent
and
b_obj
.
parent
.
type
==
'
ARMATURE
'
:
if
b_obj
.
parent
and
b_obj
.
parent
.
type
==
'
ARMATURE
'
:
for
b_mod
in
b_obj
.
modifiers
:
for
b_mod
in
b_obj
.
modifiers
:
if
b_mod
.
type
==
'
ARMATURE
'
and
b_mod
.
use_bone_envelopes
:
if
b_mod
.
type
==
'
ARMATURE
'
and
b_mod
.
use_bone_envelopes
:
...
...
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