POV-Ray : Newsgroups : povray.general : Include files that need other include files : Re: Include files that need other include files Server Time
11 Aug 2024 01:22:59 EDT (-0400)
  Re: Include files that need other include files  
From: Philip Bartol
Date: 24 Sep 1999 15:58:01
Message: <37ebd7c9@news.povray.org>
In article <37eb3572@news.povray.org>, Nieminen Juha <war### [at] cctutfi> wrote:
>  For example, if you #include "textures.inc" you get an error. The reason
>is that you didn't #include "colors.inc" before.
>  That doesn't make sense. If "textures.inc" needs "colors.inc", why doesn't
>it #include "colors.inc" by itself?
>  If I #include "textures.inc" I expect it to work as is.

This could be accomplished with the existing stuff by declaring a variable in 
each file and checking for it... hadn't thought of that before, but I know it 
can be a problem... with some of the projects I've done so far I've ran into 
this while developing some of the more detailed objects to be included in a 
bigger scene. I think what you would check for would be something like:

#ifndef (_Colors_Inc_ID)
   #include "colors.inc"
#end

if you need the "colors.inc" file, then have colors.inc declare a variable 
itself as:

#declare _Colors_Inc_ID=1;

or something.... maybe a slight revision for 3.5?

PHIL

---------------------------------------------------


Post a reply to this message

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