|
|
This problem goes back to version 3.6, and possibly 3.5 (I forget now),
which is also present in 3.7 beta 6.
This minimal scene shows what happens when an #if directive is used within
the second layer texture. At parse time it's seen as a syntax error, expects
a closing brace but instead there's the #. Seems it is okay if the layered
texture is not predeclared (used directly in an object). I haven't had much
time to check into it. I remember when I brought this up before it would
work under certain circumstances so perhaps this is why, meaning it must be
predeclared. Sorry to bring this up again so late in the game. Better late
than never, right? Likewise with the beta 7...?
/* test for directive error in layered texture. camera and light not needed
*/
#local A=yes;
#declare LT=
texture {
pigment {rgb 1}
finish {
#if (A=yes)
ambient 1
#end
}
}
texture {
pigment {green 1 filter 1}
finish {
ambient 1
// comment out this directive...
// #if (A=yes)
// ambient 1
// #end
// ...and it will render.
}
}
sphere {4*z, 1 texture {LT}}
Post a reply to this message
|
|