POV-Ray : Newsgroups : povray.bugreports : Textures with declarartions : Re: Textures with declarartions Server Time
28 Jun 2024 02:32:27 EDT (-0400)
  Re: Textures with declarartions  
From: Dan Connelly
Date: 2 Oct 1998 01:07:11
Message: <3614516E.33BD46D4@flash.net>
It appears to me the problem is that the parser believes you
are defining a recursive compound texture..... butted
textures after a #declare are grouped.

So this may be a fundamental weakness in the syntax rather than
a bug in the implementation.

This should also "fail" :

sphere {
  0, 1
  #declare X = texture { pigment { color rgb 1 } }
  texture { pigment { color rgb 0 } }
}

The solution to this is for ALL "#" directives be semicolon terminated,
or at least all #declares..... I wonder why this wasn't done?

Dan

Friedemann Schmidt wrote:
> 
> Hi,
> 
> With POV-Ray for Windows v3.0 and v3.1 this works:
> 
>   sphere {
>     0, 1
>     texture {
>       #declare X = texture { pigment { color rgb <1, 0, 0> } }
>       #declare Dummy = 1234;
>       X
>     }
>   }
> 
> This doesn't work - it causes an error like "Missing pigment"
> 
>   sphere {
>     0, 1
>     texture {
>       #declare X = texture { pigment { color rgb <1, 0, 0> } }
>       X
>     }
>   }
> 




-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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