Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
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
blender
blender-addons
Commits
55fc6729
Commit
55fc6729
authored
12 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
fix [#33086] Empty vertex group causes list index out of range error on export OBJ
parent
bbad0a24
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
io_scene_obj/export_obj.py
+7
-7
7 additions, 7 deletions
io_scene_obj/export_obj.py
with
7 additions
and
7 deletions
io_scene_obj/export_obj.py
+
7
−
7
View file @
55fc6729
...
...
@@ -457,12 +457,12 @@ def write_file(filepath, objects, scene,
if
EXPORT_POLYGROUPS
:
# Retrieve the list of vertex groups
vertGroupNames
=
ob
.
vertex_groups
.
keys
()
currentVGroup
=
''
# Create a dictionary keyed by face id and listing, for each vertex, the vertex groups it belongs to
vgroupsMap
=
[[]
for
_i
in
range
(
len
(
me_verts
))]
for
v_idx
,
v_ls
in
enumerate
(
vgroupsMap
):
v_ls
[:]
=
[(
vertGroupNames
[
g
.
group
],
g
.
weight
)
for
g
in
me_verts
[
v_idx
].
groups
]
if
vertGroupNames
:
currentVGroup
=
''
# Create a dictionary keyed by face id and listing, for each vertex, the vertex groups it belongs to
vgroupsMap
=
[[]
for
_i
in
range
(
len
(
me_verts
))]
for
v_idx
,
v_ls
in
enumerate
(
vgroupsMap
):
v_ls
[:]
=
[(
vertGroupNames
[
g
.
group
],
g
.
weight
)
for
g
in
me_verts
[
v_idx
].
groups
]
for
f
,
f_index
in
face_index_pairs
:
f_smooth
=
f
.
use_smooth
...
...
@@ -480,7 +480,7 @@ def write_file(filepath, objects, scene,
# Write the vertex group
if
EXPORT_POLYGROUPS
:
if
ob
.
vert
ex_group
s
:
if
vert
GroupName
s
:
# find what vertext group the face belongs to
vgroup_of_face
=
findVertexGroupName
(
f
,
vgroupsMap
)
if
vgroup_of_face
!=
currentVGroup
:
...
...
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