POV-Ray : Newsgroups : povray.animations : Passing variables between files?? : Re: Passing variables between files?? Server Time
28 Jul 2024 16:23:23 EDT (-0400)
  Re: Passing variables between files??  
From: Cliff Bowman
Date: 19 Jun 1999 00:34:50
Message: <376b1da3.13033823@news.povray.org>
On Fri, 18 Jun 1999 17:51:49 -0400, Michael Soda <mso### [at] erolscom>
wrote:

>let me give more detail as to what I'm trying to do
>
>I want to simulate moving water, so I want my *.inc file, which
>contains an object full of water to translate the water based on
>the clock value.  BUT, I only want to do this if I'm animating.
>So...I was going to set a variable in my main *.pov file called
>"animation" to true, when animating...and I want the *.inc file
>to translate the water, based on this variable. If it's true...than
>translate it by the clock...if not, translate it ZERO.
>
>So...I have this
>
>*.ini  -->  *.pov  <-- *.inc
>
>I have the variable in the *.pov file, but the *.inc file can't see it....
>and the *.inc file is used for other things, so I don't want to set the
>animation variable in there.
>
>You see what I'm saying?  I kinda wanted to declare a GLOBAL
>type variable that can be used by ALL files being used at that time...
>
>I guess the include is only way to do this.
>
>Also, I wanted to set a variable in the *.pov file that specifies what "leg"
>of the animation I was on, and based on this variable, my *ini file would
>have different starting frames, and stopping frames....but I don't think
>I can have #IF checks in the *.ini file.....
>
>oh well....if you can think of ANYTHING else that might help, let me know!
>Thanks for you help!
>
Odd - I regularly do this without any difficulty.

Most (all?) of Chris Colefax's include files require the declaration
of one or more "global variables" before actually #include-ing the
file. Those include files can see the variables just fine (they rely
on that ability)

I've also got a .ini file which specifies which segment of an
animation to render based on clock values (although due to poor math I
cheated and changed clock to run from 0 to 900 instead of 0 to 1 -
makes working out the clock values for subset renders easier for me).

Maybe you could try posting your files for people to see if they can
spot the problem?

I'm not great at POV, but if you want to e-mail me, watch the annoying
spamblock address!


Cheers,

Cliff Bowman
Why not pay my 3D Dr Who site a visit at
http://www.geocities.com/Area51/Dimension/7855/
PS change ".duffnet" to ".net" if replying via e-mail


Post a reply to this message

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