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 /animation_add_corrective_shape_key.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 'animation_add_corrective_shape_key.py')
-rw-r--r-- | animation_add_corrective_shape_key.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/animation_add_corrective_shape_key.py b/animation_add_corrective_shape_key.py index ed72fcae..e40a7919 100644 --- a/animation_add_corrective_shape_key.py +++ b/animation_add_corrective_shape_key.py @@ -70,7 +70,8 @@ def extract_vert_coords(ob, verts): def extract_mapped_coords(ob, shape_verts): totvert = len(shape_verts) - mesh = ob.to_mesh(bpy.context.scene, True, 'PREVIEW') + depsgraph = context.evaluated_depsgraph_get() + mesh = ob.evaluated_get(depsgraph).to_mesh() # cheating, the original mapped verts happen # to be at the end of the vertex array @@ -201,7 +202,8 @@ class add_corrective_pose_shape(bpy.types.Operator): def func_object_duplicate_flatten_modifiers(context, obj): - mesh = obj.to_mesh(context.scene, True, 'PREVIEW') + depsgraph = context.evaluated_depsgraph_get() + mesh = obj.evaluated_get(depsgraph).to_mesh() name = obj.name + "_clean" new_object = bpy.data.objects.new(name, mesh) new_object.data = mesh |