[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1089] trunk/py/scripts/addons/ io_export_unreal_psk_psa.py: fix bug in converting triangle bool when there no tmp mesh it deleted original mesh .

John Phan darkneter at gmail.com
Mon Oct 11 20:03:54 CEST 2010


Revision: 1089
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1089
Author:   darknet
Date:     2010-10-11 20:03:54 +0200 (Mon, 11 Oct 2010)

Log Message:
-----------
fix bug in converting triangle bool when there no tmp mesh it deleted original mesh. added coplanar face which vectors are selected in edit mode.

Modified Paths:
--------------
    trunk/py/scripts/addons/io_export_unreal_psk_psa.py

Modified: trunk/py/scripts/addons/io_export_unreal_psk_psa.py
===================================================================
--- trunk/py/scripts/addons/io_export_unreal_psk_psa.py	2010-10-08 17:57:13 UTC (rev 1088)
+++ trunk/py/scripts/addons/io_export_unreal_psk_psa.py	2010-10-11 18:03:54 UTC (rev 1089)
@@ -641,6 +641,7 @@
 		bpy.context.scene.unrealtriangulatebool = True
 		print("Triangulate Mesh Done!")
 	else:
+		bpy.context.scene.unrealtriangulatebool = False
 		print("No need to convert tri mesh.")
 		me_ob = object
 	return me_ob
@@ -687,7 +688,7 @@
 	print ("----- parsing meshes -----")
 	print("Number of Object Meshes:",len(blender_meshes))
 	for current_obj in blender_meshes: #number of mesh that should be one mesh here
-	
+		bpy.ops.object.mode_set(mode='EDIT')
 		current_obj = triangulateNMesh(current_obj)
 		#print(dir(current_obj))
 		print("Mesh Name:",current_obj.name)
@@ -850,7 +851,29 @@
 					dindex0 = current_face.vertices[0];
 					dindex1 = current_face.vertices[1];
 					dindex2 = current_face.vertices[2];
+					print(dir(current_mesh.vertices[dindex0]))
+					#current_mesh.vertices[dindex0].co.x = 0;
+					#current_mesh.vertices[dindex0].co.y = 0;
+					#current_mesh.vertices[dindex0].co.z = 0;
+					#current_mesh.vertices[dindex1].co.x = 0;
+					#current_mesh.vertices[dindex1].co.y = 0;
+					#current_mesh.vertices[dindex1].co.z = 0;
+					#current_mesh.vertices[dindex2].co.x = 0;
+					#current_mesh.vertices[dindex2].co.y = 0;
+					#current_mesh.vertices[dindex2].co.z = 0;
+					
+					current_mesh.vertices[dindex0].select = True
+					current_mesh.vertices[dindex1].select = True
+					current_mesh.vertices[dindex2].select = True
+					
+					#print(dir(current_mesh))
+					
+					#current_mesh.vertices[dindex1] = 0
+					#current_mesh.vertices[dindex2] = 0
+					#print(dir(current_face))
 					raise RuntimeError("normal vector coplanar with face! points:", current_mesh.vertices[dindex0].co, current_mesh.vertices[dindex1].co, current_mesh.vertices[dindex2].co)
+				#print(dir(current_face))
+				current_face.select = True
 				#print((current_face.use_smooth))
 				#not sure if this right
 				#tri.SmoothingGroups
@@ -1037,6 +1060,9 @@
 	
 	#magic 0 sized root bone for UT - this is where all armature dummy bones will attach
 	#dont increment nbone here because we initialize it to 1 (hackity hackity hack)
+	
+	print(dir(bpy))
+	#bpy.types.report({'INFO'}, exportmessage)
 
 	#count top level bones first. NOT EFFICIENT.
 	child_count = 0




More information about the Bf-extensions-cvs mailing list