|
Reference: Specifications: MPD Language Extension
The L-CAD group has defined a file format called Multi-Part DAT, or MPD, that
allows multiple LDraw files in a single file.
This format was originally intended as a way to easily distribute LDraw files
through mailing lists or newsgroups, or any other text-based system.
Today, MPD is frequently used as a way to manage complex designs, keeping
'submodels' in the same physical file as the master model.
The MPD specification is simple: there are only two meta-statements,
only one of which is commonly used.
The common statement is 0 FILE, the less common statement is 0 NOFILE.
An MPD file is simply the contenation of any number of LDraw files.
At the beginning of each file's text, there is a FILE meta-statement, to
separate and name the files.
The end of each file, or just the last file in the MPD, may be marked with a
0 NOFILE line.
The NOFILE command is only required if the file's contents are followed by
non-LDraw content (such as the poster's signature lines).
In order to support the inclusion of LDraw files in message systems (like email),
any text lines before the first FILE statement will be discarded.
It is considered to be an error for any LDraw code (other than comment lines)
to appear before the first 0 FILE statement.
Also, no LDraw commands should appear after a NOFILE meta-statement, and
before the next FILE meta-statement.
When an MPD file is used to store a multi-file model, the first file in the
MPD is treated as the 'main model' -- all other files in the MPD will only
be rendered if they are referenced by the main model, directly or indirectly.
So far, there are no clear scoping or namespace rules on MPD files.
If you put a file named stud.dat in your MPD file, don't be surprised to
see your stud.dat file appear on the top of every single brick in your
scene.
Suggested file name extension: | mpd |
Suggested MIME type: | application/x-multi-part-ldraw |
The format of a FILE meta-statement is
0 FILE model.ldr
where model.ldr is the name of the following LDraw file.
The format of a NOFILE meta-statement is
0 NOFILE
there are no options or parameters.
This information was originally written by Jacob Sparre Andersen, reformatted and expanded by Steve Bliss.
For questions, contact Steve Bliss or post
on the lugnet.cad newsgroup.
|