POV-Ray : Newsgroups : povray.animations : Passing variables between files?? : Re: Passing variables between files?? Server Time
28 Jul 2024 16:22:52 EDT (-0400)
  Re: Passing variables between files??  
From: Michael Soda
Date: 18 Jun 1999 17:53:10
Message: <376ABF75.3B4D8D79@erols.com>
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!

Bill DeWitt wrote:

> #declare Yada = NUMBER;
> #include "The File That needs Yada.inc"
>
> Michael Soda <mso### [at] erolscom> wrote in message
> news:3765920A.B16A2958@erols.com...
> > Does anyone know how to pass values from one file into another?
> > Almost exactely like "clock" in an .ini file.  The value is
> > increased/changed
> > in  one file, and used in another?
> >
> > I'm trying to render different "legs" of an entire animation sequence,
> > and
> > for each count of clock from 0 to 1, I need to render different things,
> > and
> > I just want to set a variable in Clock ("leg" or something) that would
> > be
> > passed into the main POV file, and based on this "leg" value, render
> > different legs of the overall animation.
> >
> > either it's not possible, or if it is, I'm a dunce, and can't find info
> > on it
> > in the documentation.
> >


Post a reply to this message

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