POV-Ray : Newsgroups : povray.general : Object on or off ??? : Re: Object on or off ??? Server Time
4 Aug 2024 02:17:29 EDT (-0400)
  Re: Object on or off ???  
From: Peter Ketting
Date: 16 Aug 2003 12:39:02
Message: <3f3e5e26$1@news.povray.org>
"BorisW37" wrote in message

> I saw it in somebody elses scripts but cant remember where...
> I need to easily turn certain object on or off.
> Let say i have object my_sphere, used as a trouble shooting marker for
> development purpose only. But intsead of puting /* ..... */ every time in
> need to get rid of it, can i write
> my_sphere = true/false, or something along those lines

This is the way I do it. If I need a fast test render of a complex object, I
declare a variable named "DEBUG" in my main pov source.

#declare DEBUG = true;

Then in my object code I put blocks like these

#declare MyComplexObject = object {
    object { blah blah }
#ifndef (DEBUG)
    object { more complex shapes blah blah }
#end
}

This way you only have to remove the DEBUG declare statement if you need a
full render.

Please note that there really is no right ot wrong way to do this, everyone
prefers a different method but it all comes down to the same results. Just
thought I would share my method :)

Cheers,
Peter


Post a reply to this message

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