POV-Ray : Newsgroups : povray.general : New Get macro : Re: New Get macro Server Time: 22 Sep 2020 15:37:56 GMT
  Re: New Get macro  
From: Bald Eagle
Date: 13 Jul 2020 21:35:03
"Leroy" <whe### [at] gmailcom> wrote:

>  So I combine them by using the Get variable. If the Get variable was not
> defined then a display would show what the file did. If included from another
> file with Get defined, there was no display. Which works for a single call to
> a file or a group of files. The trouble comes when you have nest several these
> 'Get' files.It can be hard to Test just part of the nested group.
>
> What the Get macro does is keep track of how many files have been include and
> kills the Get variable when it is no longer needed. Here it is!

So - this seems very much like how I set up a lot of my include files - using an
"SDL" variable - which if set, ignores the leading code block of the file, and
if not, #declares all of the usual things one needs to render the file (as a
standalone scene) like #version, camera, light_source, etc.

You've gone an extra step and created a macro and stack - which is what I've
been playing with in another set of files that is under development.

I think what you have is good - and would benefit from being supplemented with a
series of files to demonstrate the function and utility of the macro, and
highlight the tricky situation(s) that might exist and which the macro and stack
solves.
Then wrap it up in a [version-marked] zip file.


Post a reply to this message

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