|
![](/i/fill.gif) |
Now you know why I changed from suggesting the INI way to saying it could be
done within the scene file using that #fopen. Just seems easier than the old
shell commands as long as you are willing to manually enter the animation
file name.
I reworked your script so it would render here and you can see what I mean.
The frame number with zero padding is due to a -2 instead of the 2 you had
which left a space. I should have pointed that out before but I didn't know
you wanted constant double digits or whatever you'll be using. Rechecking
what I wrote before too and I notice I used the drive letter part of the
string wrong, should have been double backward slashes not double double
quotes (oops!).
#declare Scene_Name="location"
#macro SunPos(A,B,C,D,E,F,G,H)
<0,0,0>
#end
#if (clock_on=true)
#declare Fileout = concat("c:\\",Scene_Name,
str(frame_number,-2,0),".txt");
#fopen loop_files Fileout write
#write(loop_files,"\"Frame\",", frame_number, "\n")
#end
light_source {
<0,0,0>
color rgb 1 // light's color
translate SunPos(-2000, 6, 21, 4, clock, 0,
51.1666667,-1.8333333)*100000
}
#local Az=1;
#local Al=2;
#local Decl=3;
#local RA=4;
#local LST=5;
#local GST=6;
#if (clock_on=true)
#write(loop_files,"\"Azimuth and Altitude\",",Az,",",Al, "\n")
#write(loop_files,"\"Declination and RA\",",Decl,",",RA, "\n")
#write(loop_files,"\"LST and GST\",",LST,",",GST, "\n")
#end
The fact that the scene needs to know the file name at parse time, yet there
isn't a way to call for it from the scene file itself, is a barrier for this
kind of thing. Although, as I was first trying to suggest, Pre_Scene_Command
could be used to create the properly named file there wouldn't be a way the
POV (or a INC) can know the same automatically. Hence, manually writing it
into a declared string seems the only alternative.
Post a reply to this message
|
![](/i/fill.gif) |