|
|
In article <38D02C53.7176F1A8@nigels.com>, nig### [at] eisanetau wrote:
> I think the "interface block" concept is the most promising
> formulation that we have so far. It's something like
> the main(..) function in C, you're only allowed to have one.
>
> > This seems too rigid, though.
>
> Perhaps a bit rigid, but still very useful. And it's not
> an unreasonable solution to the problem. It certainly
> beats editing POV script by hand.
But if there can only be one in each scene, the only logical place would
be the main scene file. So you couldn't have the scene file request
values from the user...and you would still have to remember the variable
names.
I rather like the prompt_user() function idea, you would just have to
use it sparingly, make sure to put it in the right places(not in long
loops and not after long calculations, for example), and just generally
be careful with it, at least until support could be extended to support
pre-parsing operations.
If you really have a problem with remembering variable names and don't
want to use comments as a reminder, maybe you could put a list of
#declare's(with default values) of the variables in a separate include
file, make copies of that, and design the include file so it only takes
one variable-the name of the include file you want it to use for input.
You could just edit the values in a copy of the file, no need to
remember any names other than the one file name variable(and the name of
the main include file, but you would have to remember that one anyway.
:-) ).
// parameter file
...miscellaneous variable declarations...
...just make a copy of this file and modify as needed...
// end parameter file
// main include file
#ifndef(paramFile)
#declare paramFile = "defaultParams.inc"
#end
#include paramFile
...
// end main include file
// scene file
...you only have to remember this variable...
#declare paramFile = "myParams.inc"
#include "main include file.inc"
...
// end scene file
I hope that made some sense.
--
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
|