The language allows include files to be specified by placing the line
#include "filename.inc"
at any point in the input file. The filename may be specified by any valid string expression but it usually is a literal string enclosed in double quotes. It may be up to 40 characters long (or your computer's limit), including the two double-quote characters.
The include file is read in as if it were inserted at that point in the file. Using include is almost the same as cutting and pasting the entire contents of this file into your scene.
Include files may be nested. You may have at most 10 nested include files. There is no limit on un-nested include files.
Generally, include files have data for scenes but are not scenes in themselves. By convention scene files end in .pov
and include files end with .inc
.
It is legal to specify drive and directory information in the file specification however it is discouraged because it makes scene files less portable between various platforms. Use of full lower case is also recommended but not required.
It is typical to put standard include files in a special sub-directory. POV-Ray can only read files in the current directory or one referenced by the Library_Path
option or +L
switch. See section "Library Paths".
You may use the #local
directive to declare identifiers which are temporary in duration and local to the include file in scope. For details see "#declare vs. #local".