Fix the last commit

master
sfan5 2014-08-16 22:31:17 +02:00
parent 558634174c
commit b0d8924a6a
2 changed files with 6 additions and 6 deletions

View File

@ -3,14 +3,14 @@ Ks 0.0 0.0 0.0
illum 1
#if {TEXTURES}
# Only the diffuse colors seems to have any effect, the ambient color stays white
Kd {r} {g} {b}
d {a}
#else
Kd 1.0 1.0 1.0
d 1.0
map_Ka {texture}
map_Kd {texture}
#else
# Only the diffuse colors seems to have any effect, the ambient color stays white
Kd {r} {g} {b}
d {a}
#endif

View File

@ -188,7 +188,7 @@ else:
obj.write("usemtl %s\n" % nname.replace(":", "__"))
objd = open("models/" + nodetbl[nname][0] + ".obj", 'r')
tmp = parse_arglist(nodetbl[nname][4])
tmp['TEXTURES'] = str('-t' in optargs)
tmp['TEXTURES'] = str(('-t', '') in optargs)
ppctx = pp_new(tmp, strip_empty=True)
for line in objd:
line = pp_process(ppctx, line)
@ -223,7 +223,7 @@ else:
'g': str(c[2]/255),
'b': str(c[3]/255),
'a': str(tmp1),
'TEXTURES': str('-t' in optargs),
'TEXTURES': str(('-t', '') in optargs),
}
tmp.update(parse_arglist(nodetbl[node][4]))
ppctx = pp_new(tmp, strip_empty=True)