diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-15 15:11:13 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-16 11:34:11 +0300 |
commit | e5c3ae31189b3acb54d33061da2bd27c3d0abad5 (patch) | |
tree | a53fe430313980bc37f98966d35d2c390cdbfb62 /io_scene_x3d | |
parent | 05baedacbfdb15b74a2c89a790e8b3f196ef1417 (diff) |
Addons: Adopt for Dependency Graph API changes
Mainly search-and-replace approach.
Tested the enabled-by-default export/import addons. Seems to work with
an exception of X3D which is still referencing Blender Internal material
properties.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4866
Diffstat (limited to 'io_scene_x3d')
-rw-r--r-- | io_scene_x3d/export_x3d.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index ff5ec0a3..491675e7 100644 --- a/io_scene_x3d/export_x3d.py +++ b/io_scene_x3d/export_x3d.py @@ -217,6 +217,7 @@ def h3d_is_object_view(scene, obj): def export(file, global_matrix, + depsgraph, scene, view_layer, use_mesh_modifiers=False, @@ -1421,8 +1422,9 @@ def export(file, elif obj_type in {'MESH', 'CURVE', 'SURFACE', 'FONT'}: if (obj_type != 'MESH') or (use_mesh_modifiers and obj.is_modified(scene, 'PREVIEW')): + obj_for_mesh = obj.evaluated_get(depsgraph) if use_mesh_modifiers else obj try: - me = obj.to_mesh(scene, use_mesh_modifiers, 'PREVIEW') + me = obj_for_mesh.to_mesh() except: me = None do_remove = True @@ -1588,6 +1590,7 @@ def save(context, export(file, global_matrix, + context.evaluated_depsgraph_get(), context.scene, context.view_layer, use_mesh_modifiers=use_mesh_modifiers, |