|
![](/i/fill.gif) |
Ron Parker wrote:
> Something like this would be, though:
>
> #macro a(foo)
> #declare Switch=foo;
> #end
>
> #macro b()
> #if (Switch)
> // do one thing
> #else
> // do another thing
> #end
> #end
Yes, that would work -- though it would have a large impact on parsing
time in the case of the spline include, where b() is called once for
every segment of the spline. But what I'm wondering is if we need to
use this workaround -- so far I've not heard anyone explain WHY nested
calls are explicitly outlawed in MegaPOV. If the official verion can do
it, why can't Mega? Especially if, as Ron says (and I agree), the
nested macro calls are "cleaner"? If there was no reason from the
parsing standpoint to limit nested macros, and it was merely to coerce
people to unroll them, then perhaps a warning rather than an error would
be more appropriate?
-Alex V.
Post a reply to this message
|
![](/i/fill.gif) |