|
|
I tried following:
test.pov:
#include "test1.inc"
#include "test2.inc"
test1.inc:
#debug "\ntest1.inc included\n"
test2:inc:
#include "test1.inc"
and then:
POV_Mega +itest.pov
.... pov mesasges ...
Parsing...
test1.inc included
test1.inc include
<----ERROR
test1.inc:2: error: No objects in scene.
So, included test1.inc two times.
If I understand you correctly, then such check would disallow recursive
tricks with includes.
Geoff Wedig wrote:
>
> Disnel <dis### [at] itamcascz> wrote:
> > Josh English wrote:
> >>
> >> I thought that including a file like "colors.inc" increased the memory usage
> >> or had some other effect to slow down parsing.
>
> > But if you inlude texture.inc, for example, you NEED colors.inc,
> > regardless
> > if it is included automatically from textures.inc or manually from your
> > POV file before #include "textures.inc".
>
> Does POV make sure it hasn't already included a particular include? I think
> not, or a lot of the include file style functions wouldn't work multiple
> times. Parsing a long include of essentially just definitions (even if they
> overwrite only themselves) could take quite a bit of time, if it's a long
> file.
>
> So there is some use in checking to see if a particular include (not of the
> type where including multiple times can have different results) has already
> been included.
>
> Geoff
Post a reply to this message
|
|