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:
Diffstat (limited to 'mesh_tissue/lattice.py')
-rw-r--r--mesh_tissue/lattice.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/mesh_tissue/lattice.py b/mesh_tissue/lattice.py
index 4b53afe7..eb1269a3 100644
--- a/mesh_tissue/lattice.py
+++ b/mesh_tissue/lattice.py
@@ -306,6 +306,7 @@ class lattice_along_surface(Operator):
if len(bpy.context.selected_objects) != 2:
self.report({'ERROR'}, "Please, select two objects")
return {'CANCELLED'}
+ depsgraph = context.evaluated_depsgraph_get()
grid_obj = bpy.context.active_object
if grid_obj.type not in ('MESH', 'CURVE', 'SURFACE'):
self.report({'ERROR'}, "The surface object is not valid. Only Mesh,"
@@ -320,10 +321,7 @@ class lattice_along_surface(Operator):
break
try:
obj_dim = obj.dimensions
- obj_me = obj.to_mesh(
- bpy.context.scene, apply_modifiers=True,
- settings='PREVIEW'
- )
+ obj_me = obj.evaluated_get(depsgraph).to_mesh()
except:
self.report({'ERROR'}, "The object to deform is not valid. Only "
"Mesh, Curve, Surface and Font objects are allowed.")
@@ -333,8 +331,7 @@ class lattice_along_surface(Operator):
grid_obj = bpy.context.active_object
bpy.ops.object.convert(target='MESH')
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
- grid_mesh = grid_obj.to_mesh(bpy.context.scene, apply_modifiers=True,
- settings='PREVIEW')
+ grid_mesh = grid_obj.evaluated_get(depsgraph).to_mesh()
if len(grid_mesh.polygons) > 64 * 64:
bpy.ops.object.delete(use_global=False)