POV-Ray : Newsgroups : povray.general : POV-CSDL (or Java Binding?) : Re: POV-CSDL (or Java Binding?) Server Time
10 Aug 2024 13:20:27 EDT (-0400)
  Re: POV-CSDL (or Java Binding?)  
From: Nigel Stewart
Date: 15 Mar 2000 07:49:50
Message: <38CF869F.1C9FA350@nigels.com>
> Yes, that would work...as long as you put everything at the start of the
> scene. Which isn't always possible, with includes and macros for example.

Here is a model which might be closer to a solution:

One limitation of POV script is that it's not possible to
pass values into it without editing the source.  There is
no C-style main(int argc,char *argv[]) and no way to
read environment variables.  In this sense, a pov scene
is a void main(void) except that you can control the
clock timer variable.

I would suggest a mechanism where values can be passed
at the command line, or alternatively, edited at an 
interactive prompt in text or GUI form.  You support
some sort of block declaration at the start of the POV
file that _allows_ but doesn't _require_ passing from 
command line or a text or GUI editor.  You only support
it if it's the first thing in the file, and you take
notice of the first block only.  The defaults are used
for subsequent blocks.

If you try to pass something on the command line that
isn't in the first block, an error results.  If you
want to edit the parameters manually, you must enable
it via command line or in the GUI.

An example:

interface 
{
	#declare X = 0;
	#declare Y = 1;
	#decalre Z = "hello";
}

c:\> povray +w320 +h240 +ifile.pov +DX=5 +DY=0 +DZ=bye

That's the idea anyway - it solves the parser stalling
problem, and it simplifies the prompting, because no
timeout is necessary.

And, I think it's not so ambitous that we'd be 
waiting around for POV 4.0 to implement it.

--
Nigel Stewart (nig### [at] nigelscom)
Research Student, Software Developer
Y2K is the new millenium for the mathematically challenged.


Post a reply to this message

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