|
|
Hi all.
There's a bug in the #default directive parsing, that may be put in
evidence with the following code:
#declare Use_Rad = off;
#if (Use_Rad = off)
#debug "\nUse_Rad = off\n"
#default { texture { finish { ambient 0.4 diffuse 0.6 } } }
#else
#debug "\nUse_Rad = on\n"
#default { texture { finish { ambient 0.0 diffuse 1.0 } } }
#end
camera {
location <1, 2, -6>
look_at <0, 1, 0>
}
plane { y, 0
texture {
pigment { checker color rgb 0, color rgb 1 }
}
}
sphere { y, 1
texture {
pigment { color rgb <1, .2, .2> }
}
}
light_source { <10, 10, -10>, color rgb 1 }
Whether Use_Rad is on or off, the default texture applied is always the
seconde one.
Vahur Krouverk found that the bug is in tokenize.c:
CASE (DEFAULT_TOKEN)
+ if (Skipping)
+ {
+ UNGET
+ EXIT
+ }
+ else
+ {
Parse_Default();
EXIT
+ }
END_CASE
The lines with a "+" must be added to correct the bug.
He also saw that this bug is present with INIT_SPLINE_TOKEN, etc...
Bye.
Bouf.
Post a reply to this message
|
|