POV-Ray : Newsgroups : povray.windows : Can't read ../../file.inc : Re: Can't read ../../file.inc Server Time: 24 Sep 2020 17:57:53 GMT
  Re: Can't read ../../file.inc  
From: Alain
Date: 14 Feb 2011 21:04:25
Le 2011/02/13 20:47, dickbalaska a écrit :
> Chris Cason<del### [at] deletethistoopovrayorg>  wrote:
>> Hi Dick,
>>
>> Good to hear from you after all these years.
>>
>> I can't say exactly what the cause is as I don't know your full dir layout.
>> Since the windows version of POV changes the current working directory to
>> that containing the scene or INI file, any relative file references will be
>> based on that location, not the directory that an included file is in. If
>> the failure is not related to this then I'll need to look into it further.
>>
>> -- Chris
>
> Hi Chris!
>
> Well, it's just a standard tree...
> - ttfo + ttfo.pov
>         |
>         + haus   --+ haus.inc
>         |          + kitchen  + cabinets.inc
>         |          |          - kitchen.inc
>         |          |
>         |          - fishtank + fishtank.inc
>         |                     - fish1.inc
>         |
>         - ttCommon + mainDecls.inc
>                    - splineColefax.inc
>
> A full render starts at ttfo.pov.  This still works on 3.7 because everything is
> tree'd below the root directory.  But to develop the fishtank, I render
> fishtank.inc and have to go up a few levels to get to the includes.
>
> I manage the includes like this
>    #declare ttCommonDir="../../ttCommon/"
>    #include concat(ttCommonDir, "splineColefax.inc")
>
> so depending on which (development) directory I am rendering from, I change the
> "#declare ttCommonDir" and everybody can be found.
>
> I have reduced the problem to; while rendering fishtank.inc, I can copy
> splineColefax.inc to haus and reference it as #include "../splineColefax.inc"
> but I can not copy it to ttfo and reference it as
> #include "../../splineColefax.inc" .
>
> dik
>
>
>
>
>

In your place, I'd place splineColefax.inc in the common include folder.
That way, it's available for any of your scene.

General tip:
Place general library include files in the include folder and only place 
scene specific includes in the file's folder.



Alain


Post a reply to this message

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