POV-Ray : Newsgroups : povray.general : auto-include? : Re: auto-include? Server Time
13 Aug 2026 03:03:01 EDT (-0400)
  Re: auto-include?  
From: jr
Date: 14 Jul 2026 08:00:00
Message: <web.6a5623f37b696d276da32f146cde94f1@news.povray.org>
hi,

addressing both posts.

"Maetes" <nomail@nomail> wrote:

> Is there a way to find out in an included script where it is relative to the
> executed script?
> ...
> 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?

not really I think, but you could (perhaps) supply one or more paths via a CLI
declare, ie:
  $ povray ... declare=library_path=/some/path/

you'll need to "fuss" with quoting the construct for most shells, easier to use
an ini file, imo.



> Imagine I had a model that is split into several files for a better overview.
> ...
> If there should be an auto-include, the car_base.inc would have to be given a
> path where it can find the rest of the files - relative to the script executed.

there sort-of is, see 'include_header',
<https://wiki.povray.org/content/Reference:Scene_Parsing_Options#Include_File_Name>.



regards, jr.


Post a reply to this message

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