NGon fan fill fallback had an error in the indicies it returned.

Further changes need to be added but theres a bug in Blender that prevents the NGon function from working.
https://projects.blender.org/tracker/index.php?func=detail&aid=4544&group_id=9&atid=125

Lightwave major update by Alessandro Pirovano (uaraus) intergrated with my changes.
Tested with ~ 500 models to import without throwing an error.
 Added subsurf back, image loading fixes and removed meshtools dependancy
This commit is contained in:
Campbell Barton 2006-06-30 11:22:45 +00:00
parent 3ba91bce8e
commit 6f8b6b3a35
2 changed files with 463 additions and 309 deletions

@ -609,7 +609,7 @@ def ngon(from_data, indices):
oldmode = Mesh.Mode()
Mesh.Mode(Mesh.SelectModes['VERTEX'])
temp_mesh.sel= True # Select all verst
temp_mesh.sel= 1 # Select all verst
# Must link to scene
scn= Scene.GetCurrent()
@ -624,7 +624,7 @@ def ngon(from_data, indices):
if not new_indices: # JUST DO A FAN, Cant Scanfill
print 'Warning Cannot scanfill!- Fallback on a triangle fan.'
new_indices = [ [indices[0], indices[i-1], indices[i]] for i in xrange(2, len(indices)) ]
new_indices = [ [0, i-1, i] for i in xrange(2, len(indices)) ]
else:
# Use real scanfill.
# See if its flipped the wrong way.

File diff suppressed because it is too large Load Diff