POV-Ray : Newsgroups : povray.general : INC questions : Re: INC questions Server Time
9 Aug 2024 03:19:42 EDT (-0400)
  Re: INC questions  
From: Christoph Hormann
Date: 23 Aug 2000 10:43:59
Message: <39A3E358.D37B8ADB@schunter.etc.tu-bs.de>
Tom Melly wrote:
> 
> Two questions regarding .inc files:
> 
> 1. Is there any way to make an include file automatically detect whether it
> was called or not? In my case I have an include file/macro that will
> generate a bolt of lightning. I would like the file to generate an sample
> scene if run directly, but not when called (without the user having to
> set/change a variable).

I don't see any way without modifying the scene file, but the modification is
quite simple:

#declare No_Sample = true;
#include "incfile.pov"

And the incfile.pov with

#if (No_Sample)

   [sample code]

#end

> 2. Would I post such a macro to scene-files or utilities?

scene-files IMO, because utilities is for seperate programs (no pov-code)

Christoph

--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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