|
 |
Le 2026-07-14 à 07:37, Maetes a écrit :
> Is there a way to find out in an included script where it is relative to the
> executed script?
>
> Problem: I include a script that needs to include more scripts, textures in
> separate files, or images. Unfortunately, it is the case that the path of the
> executed script applies in the included script.
>
> #include "textures.inc"
>
> therefore does not lead to success there.
>
> At the moment I do this by setting a path before the first include.
>
> #declare Coupe_Path = ".. /base/cars/coupe/";
>
> I then use this path with Concat, and thus include further scripts and images.
>
> Is there a better method?
>
> I think there is the possibility to give general include_path, but I don't want
> to use it. That would be too many and the folder structure changes often.
>
> Ma
>
>
>
When POV-Ray looks for include files, it start in the same folder as the
current scene file, then, it search in the include folder.
When searching for an include from inside another include file, it
search in the folder where the first include is located.
So, create a folder for your scene.
Place any custom include in that same folder.
Avoid placing your custom includes in the includes folder.
Benefits : Your project is easier to manage. If you want to publish your
scene, you can simply zip the whole folder and get all of the required
files.
Post a reply to this message
|
 |