|
|
ingo <ing### [at] tagpovrayorg> wrote:
> I tried to use it to not render test scenes in an include file when the
> file is included instead of stand alone. Didn't succeed so far, only
> acheived the opposite result.
I usually define a variable at the top of my main scene files.
#declare SDL = true;
Then in any include file that I want to render when I'm working on them solo,
but just use as a plain include file when it's included, I do:
#ifdef (SDL)
// do nothing
#else
(all your global, camera, include, and other stuff you need to render the
file)
#end
and then at the end of the file I do the same check again
#ifdef (SDL)
// do nothing
#else
object {whatever}
and any other stuff that needs to be rendered
#end
I'll also usually write a check for a variable named "Verbose"
which triggers macros and such to spill their guts to the debug stream
if it's false, then everything just runs silent.
Post a reply to this message
|
|