Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2019-06-21 14:07:37 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2019-06-21 14:26:59 +0300
commit1c08d210faf6f86f67cba7edc1b4ece4dd5b09cf (patch)
tree77e5c757af99eea62999522b697a58bf8aeb612d /io_mesh_uv_layout
parent55f919089577119afa2623526ba285c4e620fc6e (diff)
Fix T65990: UV Layout Export error with 'Modified' checked
update for recent depsgraph API changes Reviewers: brecht Maniphest Tasks: T65990 Differential Revision: https://developer.blender.org/D5112
Diffstat (limited to 'io_mesh_uv_layout')
-rw-r--r--io_mesh_uv_layout/__init__.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/io_mesh_uv_layout/__init__.py b/io_mesh_uv_layout/__init__.py
index d068a008..e7f19c18 100644
--- a/io_mesh_uv_layout/__init__.py
+++ b/io_mesh_uv_layout/__init__.py
@@ -141,7 +141,10 @@ class ExportUVLayout(bpy.types.Operator):
polygon_data = list(self.iter_polygon_data_to_draw(context, meshes))
different_colors = set(color for _, color in polygon_data)
if self.modified:
- self.free_meshes(meshes)
+ depsgraph = context.evaluated_depsgraph_get()
+ for obj in self.iter_objects_to_export(context):
+ obj_eval = obj.evaluated_get(depsgraph)
+ obj_eval.to_mesh_clear()
export = self.get_exporter()
export(filepath, polygon_data, different_colors, self.size[0], self.size[1], self.opacity)
@@ -170,11 +173,6 @@ class ExportUVLayout(bpy.types.Operator):
yield obj
@staticmethod
- def free_meshes(meshes):
- for mesh in meshes:
- bpy.data.meshes.remove(mesh)
-
- @staticmethod
def currently_image_image_editor(context):
return isinstance(context.space_data, bpy.types.SpaceImageEditor)