From 79149c144c9d11663537be25c4ba714fb2bfe4ca Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Thu, 21 Sep 2023 02:39:56 -0400 Subject: [PATCH] fix duplicate mesh entries --- LICENSE | 2 +- README.txt | 2 +- blender-2.93/iqm_export.py | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/LICENSE b/LICENSE index 7dd9830..a133c14 100644 --- a/LICENSE +++ b/LICENSE @@ -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: diff --git a/README.txt b/README.txt index 5a29bc7..4f6228e 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -IQM Developer Kit 2021-06-13 +IQM Developer Kit 2023-09-21 *** Format information *** diff --git a/blender-2.93/iqm_export.py b/blender-2.93/iqm_export.py index ff1a0e8..1908775 100644 --- a/blender-2.93/iqm_export.py +++ b/blender-2.93/iqm_export.py @@ -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)", @@ -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 = [] @@ -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 @@ -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')