fprint not accepting "\n" new line character

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 10 October 2007   #1
fprint not accepting "\n" new line character

hi,

i am writing xyz position of a particle for each frame(1-100) in text file and i am writing "new line" character after every frame so xyz values goes to new line.
but when it writes values to file, "\n" is neglected.

code ----------------------------------------
for($i=$initial_frame;$i<=$final_frame;$i++){// ------- this loop is for reading info
of one particle in all frames
currentTime $i;
float $temp[] = `getParticleAttr -at position particleShape1.pt[$n]`;
string $one_particle_one_frames = $temp[0]+" "+$temp[1]+" "+$temp[2]+"\n";
$one_particle_all_frames[$n] =$one_particle_all_frames[$n] + $one_particle_one_frames;
}
fprint $fileid $one_particle_all_frames[$n];


/----------------------------------------------------
but when it writes, all the values come in same line


kindly suggest
Thanks
 
Old 10 October 2007   #2
Originally Posted by chayanvinayak: hi,


for($i=$initial_frame;$i<=$final_frame;$i++){// ------- this loop is for reading info
of one particle in all frames
currentTime $i;
float $temp[] = `getParticleAttr -at position particleShape1.pt[$n]`;
string $one_particle_one_frames = $temp[0]+" "+$temp[1]+" "+$temp[2]+"\n";
$one_particle_all_frames[$n] =$one_particle_all_frames[$n] + $one_particle_one_frames;
}
fprint $fileid $one_particle_all_frames[$n];


/----------------------------------------------------


i did some testing on simple fprint with '\n' and didn't find any problem.
may be u messed up by double initializing $i
 
Old 10 October 2007   #3
Try using \r\n instead of just \n
__________________
seth hall lead vfx artist | visceral games rws

my highend3D scripts
my photography
 
Old 10 October 2007   #4
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:40 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.