')
# Vertex Array
- self.writel(S_GEOM,3,'')
# Normal Array
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 3, '')
float_values=""
for v in vertices:
float_values+=" "+str(v.normal.x)+" "+str(v.normal.y)+" "+str(v.normal.z)
- self.writel(S_GEOM,4,''+float_values+'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 4, ''+float_values+'')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 3, '')
if (has_tangents):
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 3, '')
float_values=""
for v in vertices:
float_values+=" "+str(v.tangent.x)+" "+str(v.tangent.y)+" "+str(v.tangent.z)
- self.writel(S_GEOM,4,''+float_values+'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 4, ''+float_values+'')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 3, '')
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 3, '')
float_values=""
for v in vertices:
float_values+=" "+str(v.bitangent.x)+" "+str(v.bitangent.y)+" "+str(v.bitangent.z)
- self.writel(S_GEOM,4,''+float_values+'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 4, ''+float_values+'')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 3, '')
# UV Arrays
for uvi in range(uv_layer_count):
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 3, '')
float_values=""
for v in vertices:
try:
@@ -715,36 +715,36 @@ class DaeExporter:
# I don't understand this weird multi-uv-layer API, but with this it seems to works
float_values+=" 0 0 "
- self.writel(S_GEOM,4,''+float_values+'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 4, ''+float_values+'')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 3, '')
# Color Arrays
if (has_colors):
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 3, '')
float_values=""
for v in vertices:
float_values+=" "+str(v.color.x)+" "+str(v.color.y)+" "+str(v.color.z)
- self.writel(S_GEOM,4,''+float_values+'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,5,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 4, ''+float_values+'')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 5, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 3, '')
# Triangle Lists
- self.writel(S_GEOM,3,'')
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,3,'')
+ self.writel(S_GEOM, 3, '')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 3, '')
prim_type=""
if (triangulate):
@@ -758,22 +758,22 @@ class DaeExporter:
if (mat!=None):
matref = self.new_id("trimat")
- self.writel(S_GEOM,3,'<'+prim_type+' count="'+str(int(len(indices)))+'" material="'+matref+'">') # todo material
- mat_assign.append( (mat,matref) )
+ self.writel(S_GEOM, 3, '<'+prim_type+' count="'+str(int(len(indices)))+'" material="'+matref+'">') # todo material
+ mat_assign.append( (mat, matref) )
else:
- self.writel(S_GEOM,3,'<'+prim_type+' count="'+str(int(len(indices)))+'">') # todo material
+ self.writel(S_GEOM, 3, '<'+prim_type+' count="'+str(int(len(indices)))+'">') # todo material
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
for uvi in range(uv_layer_count):
- self.writel(S_GEOM,4,'')
+ self.writel(S_GEOM, 4, '')
if (has_colors):
- self.writel(S_GEOM,4,'')
+ self.writel(S_GEOM, 4, '')
if (has_tangents):
- self.writel(S_GEOM,4,'')
- self.writel(S_GEOM,4,'')
+ self.writel(S_GEOM, 4, '')
+ self.writel(S_GEOM, 4, '')
if (triangulate):
int_values=""
@@ -781,19 +781,19 @@ class DaeExporter:
for i in p:
int_values+=" "+str(i)
int_values+="
"
- self.writel(S_GEOM,4,int_values)
+ self.writel(S_GEOM, 4, int_values)
else:
for p in indices:
int_values=""
for i in p:
int_values+=" "+str(i)
int_values+="
"
- self.writel(S_GEOM,4,int_values)
+ self.writel(S_GEOM, 4, int_values)
- self.writel(S_GEOM,3,''+prim_type+'>')
+ self.writel(S_GEOM, 3, ''+prim_type+'>')
- self.writel(S_GEOM,2,'')
- self.writel(S_GEOM,1,'