POV-Ray : Newsgroups : povray.general : auto-include? Server Time
13 Aug 2026 17:02:32 EDT (-0400)
  auto-include? (Message 1 to 3 of 3)  
From: Maetes
Subject: auto-include?
Date: 14 Jul 2026 07:45:00
Message: <web.6a56209760d42d89ccbbb3930225ff5@news.povray.org>
Imagine I had a model that is split into several files for a better overview.

car_base.inc
car_textures.inc
car_tyres.inc
.....

Would you include them all individually in your executing script?
Or would you expect all includes to be done automatically in e.g. car_base.inc?

I have quite a few models here that I would like to publish, but I'm not sure
about the handling.

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.

ma


Post a reply to this message

From: jr
Subject: Re: auto-include?
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

From: Maetes
Subject: Re: auto-include?
Date: 14 Jul 2026 08:10:00
Message: <web.6a5626437b696d2799aad3c930225ff5@news.povray.org>
Thanks for the hints, jr, didn't know this options.

but thats to complicated.
The more includes, the more complicated.

ma


Post a reply to this message

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