Current uruprp_export.py code:
- Code: Select all
#generate the funny file
print "Writing %s" %(agename + ".fni")
initxt=alcFindBlenderText("init")
fnitxt=""
for line in initxt.asLines():
fnitxt=fnitxt + line + "\n"
if fnitxt!="":
age.setInit(fnitxt)
It is the old Carriage return/Linefeed on Windows thing again. So we need to add a \r (Carriage return). The function which writes the age file already adds this btw.
My fix:
- Code: Select all
#generate the funny file
print "Writing %s" %(agename + ".fni")
initxt=alcFindBlenderText("init")
fnitxt=""
for line in initxt.asLines():
fnitxt=fnitxt + line + "\r\n"
fnitxt=fnitxt[:-2]
if fnitxt!="":
age.setInit(fnitxt)
I also stripped the stuff that is added after the last line. This will make sure that no fni file is written when there is no fni info, instead of a fni file with an empty line as it does now. And which may be causing the problem reported here: viewtopic.php?f=10&t=1402
Edit: added to the SVN contrib section now.