diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-16 16:01:17 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-16 17:43:14 +0300 |
commit | 901868a4b2fc6e70d9c74119d97c57de132859a3 (patch) | |
tree | 94f96b6fd5f8a1ec509c6551f504cad958c1688f /io_export_pc2.py | |
parent | 2e5b7a4a044ab982af66def583ae16bb563a1357 (diff) |
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
Diffstat (limited to 'io_export_pc2.py')
-rw-r--r-- | io_export_pc2.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/io_export_pc2.py b/io_export_pc2.py index 5e69d14f..a5ad1b0c 100644 --- a/io_export_pc2.py +++ b/io_export_pc2.py @@ -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() |