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_vrml2/export_vrml2.py | |
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_vrml2/export_vrml2.py')
-rw-r--r-- | io_scene_vrml2/export_vrml2.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/io_scene_vrml2/export_vrml2.py b/io_scene_vrml2/export_vrml2.py index 22114582..d259e0b5 100644 --- a/io_scene_vrml2/export_vrml2.py +++ b/io_scene_vrml2/export_vrml2.py @@ -150,7 +150,7 @@ def save_bmesh(fw, bm, def save_object(fw, global_matrix, - scene, obj, + depsgraph, scene, obj, use_mesh_modifiers, use_color, color_type, use_uv, @@ -163,7 +163,7 @@ def save_object(fw, global_matrix, if is_editmode: bpy.ops.object.editmode_toggle() - me = obj.to_mesh(scene, True, 'PREVIEW') + me = obj.evaluated_get(depsgraph).to_mesh() bm = bmesh.new() bm.from_mesh(me) @@ -227,6 +227,7 @@ def save(operator, path_mode='AUTO'): scene = context.scene + depsgraph = context.evaluated_depsgraph_get() # store files to copy copy_set = set() @@ -245,7 +246,7 @@ def save(operator, if obj.type == 'MESH': fw("\n# %r\n" % obj.name) save_object(fw, global_matrix, - scene, obj, + depsgraph, scene, obj, use_mesh_modifiers, use_color, color_type, use_uv, |