POV-Ray : Newsgroups : povray.newusers : getting the output file name : Re: getting the output file name Server Time
31 Jul 2024 04:25:19 EDT (-0400)
  Re: getting the output file name  
From: hughes, b 
Date: 17 Jan 2003 23:30:38
Message: <3e28d86e@news.povray.org>
"Ross Litscher" <lit### [at] osuedu> wrote in message
news:3e28c368@news.povray.org...
>
> hughes, b. <omn### [at] charternet> wrote in message
> news:3e28a561$1@news.povray.org...
> >
> > Yes, does. You can do INI commands to use %s and get the name into such
a
> > file. See the doc section 5.2.4  Shell-out to Operating System and the
> > part immediately following.
>
> I don't quite follow. I can create a file in povray without shelling out.
> how can i get the filename contained in %s into some kind of variable for
> use in pov code? what will a shell command get me? i guess if i knew the
> windows command to make a new file then i could do something like:
>
> Post_Scene_Command=make_new_file %s".txt"
>
> or something similar, but then that still wouldn't let me know what the
> filename is in the scenes pov code so i could continue with a #write (...)
> command to write into that file.

More like Pre_Scene_Command=command /c append >>c:\%s.txt   ;; or cmd if
WinXP
Then more commands to work on the file or something.

> maybe you are saying I should do a Post_Scene_Command to write the
filename
> to a file, then within the scene code do a #read  from that file to get
the
> filename i want into a variable?

Yes, except as I said above. But I'm not sure why you think you couldn't
know the files name for using in the scene file. Sounds like you are wanting
to use alternate names other than your scene's name, which is the %s in the
INI and that which would be the file created too. Only other way would be
parsing and rendering through a scene once first using #fopen YourFile
"c:\yourfile.txt" write then going through it a second time to make use of
it, at least I think so.

> i guess there are other ways to do what I ultmately wanted to do that
needed
> the filename accessible from within the scenes code.

I don't believe so. Even MegaPOV doesn't have a scene name keyword for use
soley within the SDL, I'm fairly certain it does not anyway. Alas, there
isn't any direct contact between the pov and ini for you to work with it in
the way I think you're asking about. However, you should still be able to
work around it.

Or I could be wrong.  ;-)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.