|
|
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
|
|
|
|
On 8-11-2018 2:05, clipka wrote:
> 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.
Maybe it could also be achieved if each room were embedded in a separate
macro?
--
Thomas
Post a reply to this message
|
|