forked from bartvdbraak/blender
-> 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:
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):
|
||||||
|
# if a.props['5d!switch in'] < b.props['5d!switch in']:
|
||||||
|
# return a
|
||||||
|
# return b
|
||||||
|
|
||||||
def LODmin(a,b):
|
#min= None
|
||||||
if a.props['5d!switch in'] < b.props['5d!switch in']:
|
#if len(lodlist) > 1:
|
||||||
return a
|
# for lod in lodlist:
|
||||||
return b
|
# lod.vis = False
|
||||||
|
# min = lodlist[0]
|
||||||
min= None
|
# for i in xrange(len(lodlist)):
|
||||||
if len(lodlist) > 1:
|
# min= LODmin(min,lodlist[i])
|
||||||
for lod in lodlist:
|
# min.vis = True
|
||||||
lod.vis = False
|
|
||||||
min = lodlist[0]
|
|
||||||
for i in xrange(len(lodlist)):
|
|
||||||
min= LODmin(min,lodlist[i])
|
|
||||||
min.vis = True
|
|
||||||
|
|
||||||
|
|
||||||
Node.blender_import(self) # Attach faces to self.faceLs
|
Node.blender_import(self) # Attach faces to self.faceLs
|
||||||
|
Loading…
Reference in New Issue
Block a user