POV-Ray : Newsgroups : povray.general : How to pass a string from the command line - help? : How to pass a string from the command line - help? Server Time
30 Jul 2024 18:15:30 EDT (-0400)
  How to pass a string from the command line - help?  
From: Mathuin
Date: 1 Oct 2008 18:35:00
Message: <web.48e3fa9f79b5340cd8a103ef0@news.povray.org>
The canonical "hello world" scene file has the following components: includes,
camera, light source, a black-and-white checkered plane, and a shiny sphere
sitting on the plane.  I can create a template file "template.pov" that has
some of those components (includes, camera, light source) and a content file
"content.inc" with the others (plane, sphere).  This is easy enough for a
single template file and a single content file -- just replace the plane and
object with '#include "content.inc"' and put the plane and object in
"content.inc" and it just works.

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.  If I
absolutely have to change the #include line in the template to point at the
specific content I will, but that answer is not scalable.  Is there any other
way working from the command line that I can achieve this goal?  Thanks!


Post a reply to this message

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