POV-Ray : Newsgroups : povray.general : Macro Problem : Re: Macro Problem Server Time
25 Apr 2024 21:32:52 EDT (-0400)
  Re: Macro Problem  
From: Thorsten Froehlich
Date: 22 Apr 2018 14:20:07
Message: <web.5adcd12bff561b5af773ca290@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> The parser is a bit old and creaky in the joints, and some of its
> features may interfere in unexpected ways.
>
> For instance, while parsing the parameter list of a macro invocation,
> the parser doesn't like directives (`#if`, `#else`, `#break`, ...) after
> a `texture{}` statement -- presumably as an unintended side effect of
> the layered textures feature (`texture{} texture{}`).
>
> A simple workaround is to first assign the result of the texture macro
> to a temp variable, and then use that temp variable in the object macro
> invocation.

I would argue that the layered texture feature is defective by design. It is
pretty much the only case where two blocks of the same kind without any wrapper
have a special meaning. For other cases, namely with the addition of "material"
this has been fixed a long time ago. Maybe it is time to force something similar
for layered textures... at least outside scene objects.


Post a reply to this message

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