|
![](/i/fill.gif) |
"Mathuin" <mat### [at] gmail com> wrote in message
news:web.48e3fa9f79b5340cd8a103ef0@news.povray.org...
> Now what I really want to do is have "content.inc" and "othercontent.inc"
> and
> "stillothercontent.inc" then modify the template to contain '#include
> Content'
> and have the specific include file chosen via the command line something
> like
> this: povray -Itemplate.pov Declare=Content="content.inc" Alas, the
> command-line version of Declare appears to be limited to floats.
Three approaches immediately spring to mind.
1. Write a two line script that first writes the name of your include file
into another include file then calls POV-Ray. For example, a DOS .bat file
could be something like:
echo #include "%1">contentwrapper.inc
povray -Itemplate.pov ....
This would write an #include statement embedding the first parameter passed
to the script into the file 'contentwrapper.inc' then it would invoke
POV-Ray with your template.pov scene which would #include contentwrapper.inc
which would, in turn, #include the nested file of your choice.
2. Use floats with an #if or #switch directive to select the #include file
statement of your dreams.
3. Number your include files (e.g. content42.inc) and use the concat
function within your #include statement e.g.
#include concat("content",Content,".inc")
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |