forked from bartvdbraak/blender
-> Fix for billboard faces
Faces with billboard render (axis with alpha) were not being preserved on import/export. Fixed
This commit is contained in:
parent
ead7a33247
commit
a7184e9afd
@ -504,6 +504,7 @@ class FaceDesc:
|
||||
self.renderstyle = 0
|
||||
self.twoside = 0
|
||||
self.name = None #uses next FLT name if not set... fix resolution of conflicts!
|
||||
self.billboard = 0
|
||||
|
||||
#Multi-Tex info. Dosn't include first UV Layer!
|
||||
self.uvlayer = list() #list of list of tuples for UV coordinates.
|
||||
@ -716,6 +717,9 @@ class FLTNode(Node):
|
||||
if "FLT_ID" in self.exportmesh.faces.properties:
|
||||
face_desc.name = face.getProperty("FLT_ID") #need better solution than this.
|
||||
|
||||
if uvok and face.mode & Blender.Mesh.FaceModes["BILLBOARD"]:
|
||||
face_desc.billboard = 1
|
||||
|
||||
self.face_lst.append(face_desc)
|
||||
if uvok:
|
||||
self.exportmesh.activeUVLayer = oldlayer
|
||||
@ -904,6 +908,9 @@ class FLTNode(Node):
|
||||
alpha = 1
|
||||
except:
|
||||
pass
|
||||
|
||||
if face_desc.billboard:
|
||||
alpha = 2
|
||||
|
||||
if face_desc.subface:
|
||||
if face_desc.subface == 'Push':
|
||||
|
@ -742,9 +742,13 @@ class InterNode(Node):
|
||||
self.mesh.faces.addPropertyLayer("FLT_SFLEVEL", Blender.Mesh.PropertyTypes["INT"])
|
||||
|
||||
for i, f in enumerate(self.mesh.faces):
|
||||
f.transp |= Blender.Mesh.FaceTranspModes["ALPHA"] #fix this!
|
||||
f.mode |= Blender.Mesh.FaceModes["LIGHT"]
|
||||
props = new_faces_props[i]
|
||||
if props[6]['template billboard'] > 0:
|
||||
f.transp |= Blender.Mesh.FaceTranspModes["ALPHA"]
|
||||
if props[6]['template billboard'] == 2:
|
||||
f.mode |= Blender.Mesh.FaceModes["BILLBOARD"]
|
||||
f.mode |= Blender.Mesh.FaceModes["LIGHT"]
|
||||
|
||||
#f.mat = props[0]
|
||||
f.image = props[1]
|
||||
f.uv = props[2]
|
||||
|
Loading…
Reference in New Issue
Block a user