|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Ilya Razmanov <ily### [at] gmailcom> wrote:
>
> Found it.
>
https://news.povray.org/povray.general/message/%3CXnsAC0E5196CA622seed7%40news.povray.org%3E/#%3CXnsAC0E5196CA622seed
7%
> 40news.povray.org%3E
>
> So what you do is this:
>
> #if (input_file_name = "MySceneFile.inc")
>
> Camera
> Lights
> whatever else
>
> #end
>
> Then rest of your scene is _just_ the include file.
>
> That way, if you're including your file in another file, it doesn't run the
> extra scene setup code.
> But if you're running it as a standalone file, you obviously need the scene
> setup stuff to render anything - and so it's all right there.
>
> - BW
That works alright. But, I've use this for a long time
#ifndef(Get)
do what ever
#end
Then define 'Get' in the calling file. This works even if you change the name of
the inc file. Which I do often when I'm testing ideas.
I really should use the 'input_file_name' test more.
Have fun!
Post a reply to this message
|
|