POV-Ray : Newsgroups : povray.general : A question of Style : Re: A question of Style Server Time
30 Jul 2024 20:24:04 EDT (-0400)
  Re: A question of Style  
From: SharkD
Date: 7 Jul 2008 02:44:39
Message: <4871bb57$1@news.povray.org>
Leroy Whetstone wrote:
> I've made several models and other things(macro,functions...) with POV. 
> Awhile back I got tired of having a test program for each of these. So 
> now I use #ifndef(Get)in all my Pov models and include files to bracket 
> a camera and lights and the object and what ever else I need to test the 
> file. Before you include the file you have to #declare Get=1;.
>  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 do the reverse: I store camera, lights, and common variables in a 
central location, also using #ifndef statements wherever possible. Then, 
in the scene I want to render, I include this file. I can always 
override the default variable states by declaring them before I do the 
inclusion.

See the "Game Sprites" item in the Object Collection for an example.

-Mike


Post a reply to this message

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