Skip to content
Snippets Groups Projects
Commit 3f2f9e4d authored by M Bouchard Guillaume's avatar M Bouchard Guillaume
Browse files

better use of blender api

parent 481a8384
No related branches found
No related tags found
No related merge requests found
...@@ -31,12 +31,12 @@ def faces_from_mesh(ob, apply_modifier=False, triangulate=True): ...@@ -31,12 +31,12 @@ def faces_from_mesh(ob, apply_modifier=False, triangulate=True):
Split the quad into two triangles Split the quad into two triangles
''' '''
if ob.type not in ('MESH', 'CURVE', 'SURFACE', 'META'):
return ()
# get the modifiers # get the modifiers
mesh = ob.create_mesh(bpy.context.scene, try:
True, "PREVIEW") if apply_modifier else ob.data mesh = ob.create_mesh(bpy.context.scene,
apply_modifier, "PREVIEW")
except SystemError:
return ()
def iter_face_index(): def iter_face_index():
''' '''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment