POV-Ray : Newsgroups : povray.advanced-users : Detecting .inc file inclusion from another file : Re: Detecting .inc file inclusion from another file Server Time
29 Jun 2024 02:02:11 EDT (-0400)
  Re: Detecting .inc file inclusion from another file  
From: clipka
Date: 19 Jun 2010 17:03:29
Message: <4c1d30a1$1@news.povray.org>
Am 19.06.2010 22:37, schrieb stbenge:

> Is there a method for finding out if an .inc file was included from
> another file, within the included file itself?

None that I know of - unless you know which file(s) it might be included 
by, and setting a certain variable there before including. E.g.:

//---------------------------
// my_scene.pov
//---------------------------
#declare MY_INCLUDE_FLAG = 1;
#incude "my_include_file.inc"
...

//---------------------------
// my_include_file.inc
//---------------------------
#ifndef (MY_INCLUDE_FLAG)
   // set camera etc.
#end
...


Post a reply to this message

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