POV-Ray : Newsgroups : povray.general : New Get macro : Re: New Get macro Server Time
19 Apr 2024 16:04:36 EDT (-0400)
  Re: New Get macro  
From: William F Pokorny
Date: 6 Aug 2020 07:56:01
Message: <5f2befd1$1@news.povray.org>
On 8/3/20 9:04 AM, William F Pokorny wrote:
> On 8/3/20 2:01 AM, ingo wrote:
...
>> This is what I add to the bottom of my include files
>>
>> #if(input_file_name="yourfile.inc")
>>
>>     put the test scene here
>>
>> #end
>>
>> When the .inc file is included from somewhere it does not render the test
>> scene. If run solo it renders the test.
>>
...
> Thank you! A neat trick. Happens I was recently thinking about the lack 
> of general testing of the shipped include files. I have Worries a few 
> macros might not be working properly glancing at the code.
...
> 

FYI. If using this self test trick on includes which switch versions 
internally as do the standard shipped includes, one needs to set the 
version ahead of the version change inside the include file. In other 
words, your command line needs to be something like:

povray +mv3.8 +irand.inc

otherwise, POV-Ray v3.7 onward stops with an error because the #version 
directive isn't the first line in the include file.

Bill P.


Post a reply to this message

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