POV-Ray : Newsgroups : povray.general : A question of Style : Re: A question of Style Server Time
30 Jul 2024 20:25:51 EDT (-0400)
  Re: A question of Style  
From: Charles C
Date: 4 Jul 2008 20:11:45
Message: <486ebc41@news.povray.org>
Leroy Whetstone wrote:

>  I was wondering do many use this trick?
>  And if you do what type do you save the file as?
>  I save objects like a boat,rock as a '.pov' and macros as an '.inc'.

I name scene files .pov and just about everything else .inc.
I do something like #ifndef(Main_Scene_File)  ... Then check for other 
common variables like colors to be a little bit safe.... Then later in 
the include file, I give it it's own camera and lighting, maybe a floor 
etc all of which are ignored unless Main_Scene_File matches a string 
which happens to be the same as the file name of the include file.   I'm 
really into making object includes self-demonstrating.

For large include files which are themselves only part of something 
bigger and can't easily self-demonstrate, I do something like:
#ifndef(Main_Scene_File) #include "myscene.pov"
#else
...(else parse this file)....
...
...
#end //end "#ifndef(Main_Scene_File)" from beginning of file

Charles


Post a reply to this message

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