|
|
"jan dvorak" <jan### [at] centrumcz> wrote in message
news:48e9aa41@news.povray.org...
> Hello,
> I'm creating some lego brick template macros.
> What are the conventions I should follow when submitting to the object
> collection (macro names, global variables etc.)?
It's mainly only naming conventions, in order to circumvent:
- conflicts with other stuff used in a persons scene
- operating system/file transfer issues.
You need to prefix names of everything (files, macros, functions, global and
local variables) with the contribution name followed by an underscore
(though the underscore is dropped if nothing significant follows the
contribution name). You can optionally choose a shorter prefix to use as
well, so, if you chose a name of 'KidsBricks' and a short name of 'KB' you
could name a variable 'KB_Width' or 'KidsBricks_Width'.
File names should be all in lowercase. There are a couple of files that need
to be named fairly precisely if you want the website to pick them up and
display them. For example the thumbnail image and a larger image file (e.g.
'kidsbricks.jpg' and 'kidsbricks.gif') and optionally a supporting html file
(e.g. 'kidsbricks.html').
There's a table showing examples on the help page at
http://lib.povray.org/usersguide/04contributing.html#prep.
Although the help page doesn't mention it; even local variables need the
prefix because, as someone recently pointed out, a local variable in a macro
or an include file could clash with a macro name someone chooses to use in
their own scene definitions.
p.s. It's probably best to avoid the name 'lego' as I believe this is a
registered trademark (unless you've sought their consent), but there are
various brands of kids building blocks and a generic kids building block
macro would be great.
Regards,
Chris B.
Post a reply to this message
|
|