Update for Depsgraph API changes

Addresses new behavior of object.to_mesh().

This is corresponding part for D4875.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4876
This commit is contained in:
Sergey Sharybin
2019-05-16 15:01:17 +02:00
parent 2e5b7a4a04
commit 901868a4b2
29 changed files with 152 additions and 61 deletions

View File

@ -112,7 +112,10 @@ def do_export(context, props, filepath):
float(v.co[2]))
file.write(thisVertex)
bpy.data.meshes.remove(me, do_unlink=True)
if apply_modifiers:
ob.evaluated_get(depsgraph).to_mesh_clear()
else:
me = ob.to_mesh_clear()
file.flush()
file.close()