|
![](/i/fill.gif) |
hello, here's some more food for thought regarding aliased includes:
/* test.pov */
#include "test1.inc"
light_source { 4-8*z 1 }
object { test1_sphere
//texture { t_sph }
//texture { test2_t_sph }
translate z*5
}
/* test1.inc */
#include "test2.inc"
#local test2_t_sph = t_sph // <- *1* povray parser makes included declare
local to this file...
#declare test1_sphere = sphere { 0, 1
texture { test2_t_sph } // <- ... we use it prefixing with our
chosen alias ...
}
#undef t_sph // <- *2* ... and undef all included #declares at the end
/* test2.inc */
#declare t_sph = texture {
pigment { rgb y }
finish { diffuse .6 phong .9 phong_size 50 }
}
It works well. If you uncomment the given textures in test.pov, it won't
render, since the symbols are hidden as expected.
So, if povray's parser gives us a help in making steps *1* and *2* a
reality, we can get better symbol scoping with very little effort.
Post a reply to this message
|
![](/i/fill.gif) |