LDraw.org Standards: MPD Language Extension
Maintained by: The LDraw.org Standards Committee
Writers: Steve Bliss, Orion Pobursky
Guidelines for the proper naming of OMR files
MPD files or "Multi-Part Documents" are a way to combine several LDraw files into one consolidated source. This allows for ease in posting or emailing a model made up of many subparts.
The MPD file uses 2 META Commands, only one of which is commonly used. The common statement is
0 FILE, the less common statement is
To create a MPD file simply include the code for each individual file in the MPD file. At the beginning of each file's text, insert a
0 FILE statement. This separates and names the files.
The end of each file, or just the last file in the MPD, may be marked with a
0 NOFILE line. The
0 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
0 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
0 NOFILE statement, and before the next
0 FILE 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.
MPD META Statements
0 FILE <model>
<model> is the name of the following LDraw file.
There are no options or parameters.