POV-Ray : Newsgroups : povray.general : Small Request (maybe). : Re: Small Request (maybe). Server Time
9 Aug 2024 11:24:42 EDT (-0400)
  Re: Small Request (maybe).  
From: Thorsten Froehlich
Date: 25 Jul 2000 06:01:22
Message: <397d6572@news.povray.org>
In article <slr### [at] zero-ppslocaldomain> , 
ste### [at] zeroppsuklinuxnet (Steve) wrote:

> I know that all the info for the Win95 version is kept in a file that
> you can customise, so I wanted a copy of that file and couldn't find
> one anywhere on the POV server without d/l'ing a Win version which
> I have now way of unpacking as I don't have access to any Microsoft
> based machines.

If you refer to the original template menu file, the specification is in the
Mac documentation...


         Thorsten



(The following format described is rev 2, 9/25/95 [esp].  The built-in
POV-Ray template importer reads a specially formatted text file, and builds
a multi-level (hierarchical) menu structure that connects specific menu
items to blocks of text that can be automatically inserted into the user's
text file at the current cursor insertion point, simply by choosing that
menu item.  The user imports the text once (or has it automatically imported
every time they start POV-Ray). This process builds the menu structure.
Then whenever the user wants a particular item, he chooses it off the
TEMPLATES menu, and it is inserted into the current text file.  Although the
syntax and code of the template reader can handle up to 4 menus deep, it is
suggested to keep it down to 2 levels and group things in a fairly flat and
logical manner.  You are free to rearrange the items and add your own.  As
long as you follow the file format described below, your changes will appear
in the Templates menu the next time you run POV-Ray.

When the Import Template reader sees a command string in the form @xxx,
starting in the first character of the line, it reads the line and processes
it accordingly.  The 4-character command is not case sensitive, so "@mt1"
and "@Mt1" are legal, though I would prefer to have them remain all lower
case. Note that empty lines are not skipped, they are added to the current
menu item text. If this weren't done, you couldn't add any blank lines as
part of a template into your file.  The side effect of this is that if you
want to separate items in the template file for legibility, you MUST use the
@com comment command.

COMMANDS
@com.Any text here... - this is a comment line, ignored by the parser.

@mt1.Title - this means define a new level-1 menu, and give it the name
"Title". All level 2 menus will go under this level 1 menu, until another
level 1 menu is defined.  There must not be anything else on these special
lines.

@mt2.Title2 - this means define a new level-2 menu (under a previously
defined level 1 menu) and give it the name "Title2".  Any lines immediately
following this line will be used as the text to be inserted.  Blank lines
are valid and counted, so that the user can insert blank lines.  The end of
the text block is determined when the next @xxx command is reached.

(Yes, I know you're thinking, "Oh good!  I can define @mt3 & @mt4!"  Let's
not do this, I don't think it is a good U.I. idea :-)

@@@@ - This is an end-of-file mark, ignore anything after this in the file.

TEMPLATE EXAMPLE:

@mt1.Statements
@mt2.File Boilerplate
// Persistence of Vision RayTracer Scene description file
// File: ??.pov
// Version: 3
// Description: ??
// Date: mm/dd/yy
// Author: ??
//

@mt2.Background
// Set the color of the background (sky)
background { color red 0.1 green 0.3 blue 0.8 }
@mt2.Camera
// set viewer's position in the scene
camera
{
  location  <0,  1, -6>   // <X Y Z>
  direction 2.0*z         // which way are we looking <X Y Z>
  up        y             // which way is +up <X Y Z>
  right     4/3*x         // which way is +right <X Y Z> and aspect ratio
  look_at   <0,  0,  0>    // point center of view at this point <X Y Z>
}
@mt1.Textures
@mt2.Pigment-rgb
  pigment { color rgb <1,2,3> }
@mt2.Pigment-agate
  pigment { agate agate_turb 1 }
@@@@

That was an end-of-file (eof) token, so all this text after it is ignored.


Post a reply to this message

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