-> Double Sided Faces fix for FLT import

Faces marked as double sided in FLT file were
not getting the proper face flags on import to blender.
Fixed.
This commit is contained in:
Geoffrey Bantle 2008-03-28 00:30:46 +00:00
parent 812af46d41
commit d32ec4297d

@ -1282,21 +1282,23 @@ class InterNode(Node):
lodlist = list() lodlist = list()
for child in self.children: for child in self.children:
if child.props.has_key('type') and child.props['type'] == 73: if child.props.has_key('type') and child.props['type'] == 73:
lodlist.append(child) if child.props['5d!switch out'] != 0:
child.vis = False
#lodlist.append(child)
def LODmin(a,b): #def LODmin(a,b):
if a.props['5d!switch in'] < b.props['5d!switch in']: # if a.props['5d!switch in'] < b.props['5d!switch in']:
return a # return a
return b # return b
min= None #min= None
if len(lodlist) > 1: #if len(lodlist) > 1:
for lod in lodlist: # for lod in lodlist:
lod.vis = False # lod.vis = False
min = lodlist[0] # min = lodlist[0]
for i in xrange(len(lodlist)): # for i in xrange(len(lodlist)):
min= LODmin(min,lodlist[i]) # min= LODmin(min,lodlist[i])
min.vis = True # min.vis = True
Node.blender_import(self) # Attach faces to self.faceLs Node.blender_import(self) # Attach faces to self.faceLs