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:
authorJohn Phan <darkneter@gmail.com>2010-10-11 22:03:54 +0400
committerJohn Phan <darkneter@gmail.com>2010-10-11 22:03:54 +0400
commitef2d0ba8974d20545e38b2d43438998f5ff61ec6 (patch)
tree929d79ec6424994af082f304861df1902ef618a5 /io_export_unreal_psk_psa.py
parente5fd9d36abeafe71c44d9f920b21c816cd87b0e5 (diff)
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.
Diffstat (limited to 'io_export_unreal_psk_psa.py')
-rw-r--r--io_export_unreal_psk_psa.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 74a34616..a2759072 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -641,6 +641,7 @@ def triangulateNMesh(object):
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 @@ def parse_meshes(blender_meshes, psk_file):
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 @@ def parse_meshes(blender_meshes, psk_file):
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 @@ def parse_armature(blender_armature, psk_file, psa_file):
#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