From aa1ef522b3b2bdde8f005878fed6668f52b8d949 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 12 Jun 2019 00:07:38 +0300 Subject: [PATCH] Fix a data corruption issue in mesh exporter Apparently mathutils.Vector can refer to external data, in this case the mesh's UV coordinates, which gets deleted with the mesh. Copy the values to make sure they are retained. --- blender/io_mspgl/mesh.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blender/io_mspgl/mesh.py b/blender/io_mspgl/mesh.py index 125bc5bb..91648d28 100644 --- a/blender/io_mspgl/mesh.py +++ b/blender/io_mspgl/mesh.py @@ -61,8 +61,8 @@ class Vertex: self.tan = None self.bino = None self.index = vertex.index - self.co = vertex.co - self.normal = vertex.normal + self.co = mathutils.Vector(vertex.co) + self.normal = mathutils.Vector(vertex.normal) self.flag = False self.edges = [] self.faces = [] @@ -148,7 +148,7 @@ class UvLayer: else: self._layer = arg self.name = arg.name - self.uvs = [d.uv for d in self.data] + self.uvs = [mathutils.Vector(d.uv) for d in self.data] self.unit = None self.hidden = False -- 2.45.2