Skip to content

Commit

Permalink
fix duplicate mesh entries
Browse files Browse the repository at this point in the history
  • Loading branch information
lsalzman committed Sep 21, 2023
1 parent b8152c6 commit 79149c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2010-2022 Lee Salzman
Copyright (c) 2010-2023 Lee Salzman

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IQM Developer Kit 2021-06-13
IQM Developer Kit 2023-09-21

*** Format information ***

Expand Down
8 changes: 3 additions & 5 deletions blender-2.93/iqm_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
bl_info = {
"name": "Export Inter-Quake Model (.iqm/.iqe)",
"author": "Lee Salzman",
"version": (2022, 10, 21),
"version": (2023, 9, 21),
"blender": (2, 93, 0),
"location": "File > Export > Inter-Quake Model",
"description": "Export to the Inter-Quake Model format (.iqm/.iqe)",
Expand Down Expand Up @@ -812,7 +812,7 @@ def collectAnims(context, armature, scale, bones, animspecs):
return anims


def collectMeshes(context, bones, scale, matfun, useskel = True, usecol = False, usemods = False, filetype = 'IQM', namedmaterialmeshes=False):
def collectMeshes(context, bones, scale, matfun, useskel = True, usecol = False, usemods = False, filetype = 'IQM', namedmaterialmeshes = False):
vertwarn = []
objs = context.selected_objects #context.scene.objects
meshes = []
Expand Down Expand Up @@ -874,9 +874,7 @@ def collectMeshes(context, bones, scale, matfun, useskel = True, usecol = False,
newmeshname = f"{obj.name}_{matname}"
else:
newmeshname = obj.name

mesh = Mesh(newmeshname, matname, data.vertices)
meshes.append(mesh)
materials[obj.name, matindex] = mesh

verts = mesh.verts
Expand Down Expand Up @@ -1027,7 +1025,7 @@ def exportIQE(file, meshes, bones, anims):
file.write('\n')


def exportIQM(context, filename, usemesh = True, usemods = False, useskel = True, usebbox = True, usecol = False, scale = 1.0, animspecs = None, matfun = (lambda prefix, image: image), derigify = False, boneorder = None, namedmaterialmeshes=False):
def exportIQM(context, filename, usemesh = True, usemods = False, useskel = True, usebbox = True, usecol = False, scale = 1.0, animspecs = None, matfun = (lambda prefix, image: image), derigify = False, boneorder = None, namedmaterialmeshes = False):
armature = findArmature(context)
if useskel and not armature:
print('No armature selected')
Expand Down

0 comments on commit 79149c1

Please sign in to comment.