Permalink
Browse files

fixed triangulate problem

  • Loading branch information...
jlamarche
jlamarche committed Apr 5, 2011
1 parent e817dd4 commit 7b06a67922fbc1cf8648c71a534c6a939096bb7c
Showing with 0 additions and 26 deletions.
  1. +0 −26 Blender Export/objc_blend_2.57 (RC1)/io_export_objective_c_header.py
@@ -37,7 +37,6 @@ def triangulateNMesh(object):
for i in scene.objects: i.select = False #deselect all objects
object.select = True
scene.objects.active = object #set the mesh object to current
-# bpy.ops.object.mode_set(mode='OBJECT')
print("Checking mesh if needs to convert quad to Tri...")
for face in object.data.faces:
if (len(face.vertices) > 3):
@@ -80,21 +79,6 @@ def do_export(context, props, filepath):
me_ob = triangulateNMesh(ob)
current_scene = context.scene
apply_modifiers = props.apply_modifiers
- #
- # bpy.ops.object.mode_set(mode='OBJECT')
- # me_da = ob.data.copy() #copy data
- # me_ob = ob.copy() #copy object
-
-
- # bpy.context.scene.objects.link(me_ob)
- # for i in current_scene.objects: i.select = False #deselect all objects
- # me_ob.select = True
- # current_scene.objects.active = me_ob #set the mesh object to current
- # bpy.ops.object.mode_set(mode='EDIT') #Operators
- # bpy.ops.mesh.select_all(action='SELECT')#select all the face/vertex/edge
- # bpy.ops.mesh.quads_convert_to_tris() #Operators
- # bpy.context.scene.update()
- # bpy.ops.object.mode_set(mode='OBJECT') # set it in object
mesh = me_ob.to_mesh(current_scene, apply_modifiers, 'PREVIEW')
@@ -105,16 +89,6 @@ def do_export(context, props, filepath):
if props.rot_x90:
mesh.transform(mat_x90)
-
- #mesh.select = True
- #
- # #current_scene.objects.active = mesh #set the mesh object to current
- # bpy.ops.object.mode_set(mode='EDIT') #Operators
- # bpy.ops.mesh.select_all(action='SELECT')#select all the face/vertex/edge
- # bpy.ops.mesh.quads_convert_to_tris() #Operators
- # current_scene.update()
- # bpy.ops.object.mode_set(mode='OBJECT') # set it in object
- # bpy.ops.mesh.quads_convert_to_tris()
file = open(filepath, "wb")
theHeader = '//If not using MC3D, change 1 to 0 to add needed types\n#if 1\n\t#import "MC3DTypes.h"\n#else\n\

0 comments on commit 7b06a67

Please sign in to comment.