POV-Ray : Newsgroups : povray.general : Details on layered textures/materials : Re: Details on layered textures/materials Server Time
3 May 2024 03:25:26 EDT (-0400)
  Re: Details on layered textures/materials  
From: Bald Eagle
Date: 7 Apr 2024 10:40:00
Message: <web.6612afd35a5579641f9dae3025979125@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Question to BE:
>
> Why has there to be at the end of the macro /twice/ an - exactly
> identical - declaration of M_Granite? if you take out (any) one of them,
> you get a parse error: "Cannot pass uninitialized identifier to
> non-optional LValue."
>
> Otherwise, works fine indeed.
>
> --
> Thomas

Now THAT is weird.

I "commented one out" using

#if (0)
 #declare M_Granite =
 texture {
   //interior {ior 1.6}
   #if (Pol) //polished
     #if (Type=off)
       T1_GranitePol
     #else
       T1_GranitePol
       T2_GranitePol
     #end  //Type
   #else //frosted
     #if (Type=off)
       T1_GraniteFro
       //Crand(0.25)
       //Tcrand
     #else
       T1_GraniteFro
       T2_GraniteFro
       //Crand(0.25)
       //Tcrand
     #end  //Type
   #end  //Pol
   scale M_scale
   rotate M_rotat
   translate M_trans
 } //material
#end

And that worked just fine.

But when I highlighted all of that and deleted it, then I got the same weird
error.

If I use /* */ to comment it out, I get the error also.

Makes NO sense, and it's deeply concerning, because how is anyone supposed to
code anything if fundamental #declare statements simply don't work?

- BW


Post a reply to this message

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