POV-Ray : Newsgroups : povray.general : Macro Problem : Re: Macro Problem Server Time
23 Apr 2024 21:59:32 EDT (-0400)
  Re: Macro Problem  
From: clipka
Date: 22 Apr 2018 07:10:54
Message: <5adc6dbe$1@news.povray.org>
Am 22.04.2018 um 07:47 schrieb Sven Littkowski:

> When calling the texture macro directly from another file, it works. But
> when calling it from within the parameter liner of another macro, I get
> the error message you cans see as comment behind one of the lines. Why?
> Why? Why?

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.


Post a reply to this message

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