POV-Ray : Newsgroups : povray.newusers : passing values : Re: passing values Server Time: 19 Jan 2019 04:47:26 GMT
  Re: passing values  
From: clipka
Date: 8 Nov 2018 01:05:39
Am 08.11.2018 um 01:41 schrieb David Kraics:
> I am working on a scene involving the inside of a cabin. Each room is in a
> separate INC file. I use IF statements to make certain walls invisible so the
> inside of the room can be seen. Normally I do this by adjusting a #declared
> value in the individual INC file. Is there a way to pass a value from the main
> POV file to the INC file so I can do it in one location?

Any variable you declare in the main file is available in any file it 
subsequently includes.

E.g.:

     // main file
     #declare Foo = 42;
     #include "whatever.inc"

     // whatever.inc
     #debug concat("Foo is ", str(Foo,0,0), "\n")

This even works with files declared using `#local` in the main file.


Post a reply to this message

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