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>2012-04-26 21:18:05 +0400
committerJohn Phan <darkneter@gmail.com>2012-04-26 21:18:05 +0400
commitea861fa5f4578f2104009af6bd77837fd5b578ff (patch)
tree7a239431fbfbe917eb945aa31108ce4625a8d238
parent670952bb3eaa45dbe4867d675f23f77bd66483ca (diff)
error fixed on mesh and armature bones countv2.63av2.63
-rw-r--r--io_export_unreal_psk_psa.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 45a183fa..efefd9ce 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -907,6 +907,8 @@ def parse_smooth_groups( mesh ):
edge_sharing_list = determine_edge_sharing(mesh)
#print("faces:",len(mesh.tessfaces))
interval = math.floor(len(mesh.tessfaces) / 100)
+ if interval == 0: #if the faces are few do this
+ interval = math.floor(len(mesh.tessfaces) / 10)
#print("FACES:",len(mesh.tessfaces),"//100 =" "interval:",interval)
for face in mesh.tessfaces:
#print(dir(face))
@@ -1588,8 +1590,11 @@ def find_armature_and_mesh():
else:
raise Error("No mesh parented to armature")
- verbose("Found mesh: {}".format(mesh.name))
-
+ verbose("Found mesh: {}".format(mesh.name))
+ if len(armature.pose.bones) == len(mesh.vertex_groups):
+ print("Armature and Mesh Vertex Groups matches Ok!")
+ else:
+ raise Error("Armature bones:" + str(len(armature.pose.bones)) + " Mesh Vertex Groups:" + str(len(mesh.vertex_groups)) +" doesn't match!")
return armature, mesh