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_export_unreal_psk_psa.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_export_unreal_psk_psa.py')
-rw-r--r-- | io_export_unreal_psk_psa.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py index c4fb410e..4851586b 100644 --- a/io_export_unreal_psk_psa.py +++ b/io_export_unreal_psk_psa.py @@ -981,7 +981,8 @@ def triangulate_mesh(object): view_layer = bpy.context.view_layer me_ob = object.copy() - me_ob.data = object.to_mesh(bpy.context.scene, True, 'PREVIEW') # write data object + depsgraph = bpy.context.evaluated_depsgraph_get() + me_ob.data = object.evaluated_get(depsgraph).to_mesh() # write data object bpy.context.collection.objects.link(me_ob) bpy.context.scene.update() bpy.ops.object.mode_set(mode='OBJECT') @@ -1006,7 +1007,7 @@ def triangulate_mesh(object): verbose("Triangulated mesh") - me_ob.data = me_ob.to_mesh(bpy.context.scene, True, 'PREVIEW') # write data object + me_ob.data = me_ob.evaluated_get(depsgraph).to_mesh() # write data object bpy.context.scene.update() return me_ob @@ -2100,7 +2101,8 @@ def rebuildmesh(obj): smoothings = [] uvfaces = [] # print("creating array build mesh...") - mmesh = obj.to_mesh(bpy.context.scene, True, 'PREVIEW') + depsgraph = bpy.context.evaluated_depsgraph_get() + mmesh = obj.evaluated_get(depsgraph).to_mesh() uv_layer = mmesh.tessface_uv_textures.active for face in mmesh.tessfaces: |