Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-05-15 15:11:13 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-05-16 11:34:11 +0300
commite5c3ae31189b3acb54d33061da2bd27c3d0abad5 (patch)
treea53fe430313980bc37f98966d35d2c390cdbfb62 /oscurart_tools
parent05baedacbfdb15b74a2c89a790e8b3f196ef1417 (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 'oscurart_tools')
-rw-r--r--oscurart_tools/mesh/shapes_to_objects.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/oscurart_tools/mesh/shapes_to_objects.py b/oscurart_tools/mesh/shapes_to_objects.py
index 3b9a80a1..c2af30ed 100644
--- a/oscurart_tools/mesh/shapes_to_objects.py
+++ b/oscurart_tools/mesh/shapes_to_objects.py
@@ -44,11 +44,12 @@ class ShapeToObjects(Operator):
OBJACT = bpy.context.view_layer.objects.active
has_keys = hasattr(getattr(OBJACT.data, "shape_keys", None), "key_blocks")
if has_keys:
+ depsgraph = bpy.context.evaluated_depsgraph_get()
for SHAPE in OBJACT.data.shape_keys.key_blocks[:]:
print(SHAPE.name)
bpy.ops.object.shape_key_clear()
SHAPE.value = 1
- mesh = OBJACT.to_mesh(bpy.context.depsgraph, True, calc_undeformed=False)
+ mesh = OBJACT.evaluated_get(depsgraph).to_mesh()
object = bpy.data.objects.new(SHAPE.name, mesh)
bpy.context.scene.collection.objects.link(object)
else: