diff options
author | John Phan <darkneter@gmail.com> | 2013-01-22 21:07:52 +0400 |
---|---|---|
committer | John Phan <darkneter@gmail.com> | 2013-01-22 21:07:52 +0400 |
commit | ecc896f40392e9ac9ca17c268e468528da781fc6 (patch) | |
tree | f3c4f86d84ea0196b57cffc3248911150874cff6 | |
parent | 081c87ece1750117eeccd8bb6c9d0fbdd2717901 (diff) |
fixed error if point link is none.
-rw-r--r-- | io_export_unreal_psk_psa.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py index 90c5a974..d20adfb0 100644 --- a/io_export_unreal_psk_psa.py +++ b/io_export_unreal_psk_psa.py @@ -1285,11 +1285,16 @@ def parse_mesh( mesh, psk ): p.Point.X = vpos.x p.Point.Y = vpos.y p.Point.Z = vpos.z - - for point in points_linked[p]: - point_index = points.get(point) #point index - v_item = (point_index, vertex_weight) - vertex_list.append(v_item) + #print(p) + #print(len(points_linked[p])) + try: #check if point doesn't give error + for point in points_linked[p]: + point_index = points.get(point) #point index + v_item = (point_index, vertex_weight) + vertex_list.append(v_item) + except Exception:#if get error ignore them #not safe I think + print("Error link points!") + pass #bone name, [point id and wieght] #print("Add Vertex Group:",obj_vertex_group.name, " No. Points:",len(vertex_list)) |