[Bf-extensions-cvs] [c3c0fd18] blender2.8: 3D Print Toolbox: update to 2.8 API
Philipp Oeser
noreply at git.blender.org
Thu Dec 6 11:03:58 CET 2018
Commit: c3c0fd18ee1d58f8c9e7b03329894503afffa732
Author: Philipp Oeser
Date: Thu Dec 6 11:02:50 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBAc3c0fd18ee1d58f8c9e7b03329894503afffa732
3D Print Toolbox: update to 2.8 API
would fail to calculate Volume or Area for object with modifier
Fixes T58798
===================================================================
M object_print3d_utils/mesh_helpers.py
===================================================================
diff --git a/object_print3d_utils/mesh_helpers.py b/object_print3d_utils/mesh_helpers.py
index 6a18e3e2..56dbfc65 100644
--- a/object_print3d_utils/mesh_helpers.py
+++ b/object_print3d_utils/mesh_helpers.py
@@ -32,7 +32,7 @@ def bmesh_copy_from_object(obj, transform=True, triangulate=True, apply_modifier
if apply_modifiers and obj.modifiers:
import bpy
- me = obj.to_mesh(bpy.context.scene, True, 'PREVIEW')
+ me = obj.to_mesh(depsgraph=bpy.context.depsgraph, apply_modifiers=True)
bm = bmesh.new()
bm.from_mesh(me)
bpy.data.meshes.remove(me)
More information about the Bf-extensions-cvs
mailing list