From: Mikko Rasa Date: Tue, 11 Jun 2019 21:07:38 +0000 (+0300) Subject: Fix a data corruption issue in mesh exporter X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=aa1ef522b3b2bdde8f005878fed6668f52b8d949;hp=6a231263b8f9147579b91c3b2d6bf093a698bc7a 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. --- 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