Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    Include files with POV-Ray
How they work and How to make your own include files
Deutsch Deutsch

Home
- POV-Ray Tutorial

  - POV-Ray Details

  - About Variables

  - A Short
    Include File Tutorial
      Why Include Files?
      Self-made Include Files
          and how to call them.
      Special Notations, ".inc"
          "#local / #declare"
      Where to store
      Design of Include Files
    >Adding a new item
        to the 'Insert Menu'

                                                       

Adding a new item to the 'Insert Menu'
(POV-Ray for Windows version 3.6 or 3.7)

We render the object, we want to add to the 'Insert Menu' in a handy small thumbnail resolution like 160 x 120 pixels in POV-Ray. We should choose a view that shows all esential details of the object.
Then we make a small text containing all what's necessary to include this object in a POV-Ray file:
Table_01.jpg
Thumbnail of '10 - Table_01.jpg'
for the 'insert menu'
.
//------------------------------------
#include "Table_01.inc"
//------------------------------------
object{ Table_01
        scale<1,1,1>
        rotate<0,0,0>
        translate<0,0,0>
      }
//------------------------------------
The text file '10 - Table_01.txt'
for the 'insert menu'

Now we need to create a subdirectory for our own insert menu idems.
We call it i.e. '00 - MyInsertMenu'. (The part '00 - ' will not be visible in the POV-Ray editor, the numbers determine the sequence in which the items will be ordered!)

Insert Menu Listing

We have to open this subdirectory and insert both (the image and the short-cut text) with the same name and numbering in this subdirectory. (In POV-Ray 3.62 the thumbnail image must be a .bmp!)
Insert Menu Listing

If we now open the POV-Ray editor with a scene text, we can use our new object like all the other objects in the insert menu:
using Table_01
Using our 'Table_01' in a scene file via the 'insert menu'.
top

© Friedrich A. Lohmüller, 2015
www.f-lohmueller.de
 
Visitors:
(since May-1999)
Thanks for your visit!