LDraw.org Discussion Forums

Full Version: Official MPD clarification
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Michael Heidemann has requested that we add official clarification of how tools should deal with the MPD language extension.

See here:

Given the importance of the MPD meta command, I think it would be good if, somewhere in the official specs, we stressed that support for the MPD meta command is highly recommended, and also note that the MPD meta command can be used in LDraw files with any file extension, not just in files with ".mpd" as the file extension.

I always took the extension thing as a naming convention only, I also think this is kinda implied because the specs don't talk about handling a mpd, ldr or dat differently based on their extension name, it's a hint/guideline only.

Maybe we could add the naming convention rules more clearly somewhere?

Although in practice only advanced LDraw users will be using .mpd correctly all the time. For example most complicated model files start out as a single model, so unless you plan ahead it will be saved as a ldr the first time around.

And then there are the default windows settings hiding extensions to make it even more unclear Smile
I have always believed that MPD support should mandatory, rather than an "extension" or second-class syntax. It is a central, indispensible part of LDraw. That said, I don't think SR3D Builder supports it, which is very sad. I am in favor of adding prominent language to the LDraw File Format spec heavily encouraging authors to write MPD-compliant programs; i.e., "ignore this at your peril."

I very strongly support adding explicit language to clarify that all recognized LDraw file extensions can contain any content. This isn't a change, since the specification has already said this implicitly for all of the seven years I've been paying attention. Unfortunately, that obliqueness, combined with MLCad's annoying save behavior, means the question of whether MPD files must have a .mpd extension keeps coming up every couple years. It would be great to be done with that once and for all.

(Aside: the proliferation of LDraw file extensions is unhealthy. There should have only been one, and it should have been .ldr. Now there are four: .dat, .mpd, .ldr, and .l3b.)

I think SR3D Builder will happily load an MPD file, but then lose all MPD-specific information (flatten the file, basically). I think that is part of the reason it has its own file extension, even though the files are basically just LDraw files. (Its files may also contain flexible part definitions that don't work elsewhere.)

I agree that MPD support should be strongly recommended, though.
I also strongly suggest that the MPD extension become part of the spec. Basically we should just fold it into the existing File Format doc.

While we're at it we should also change the name of the "Colour Definition Language Extension" to "Colour Definition Specification" since it's already part of the spec.
Based on the replies here, I think the following changes should be made to the LDraw file format spec:
  • Update the LDraw file format version number to 1.1.0 (not 1.0.2)
  • Add the following sub-section under the "Basic parsing / file content" sub-section of the "LDraw Files" section:
    Quote:Multi-Part Dat (MPD)
    Any LDraw file, no matter its file extension, may be a Multi-Part Dat file (file with other files wrapped inside). This is done using the MPD Language Extension.
  • Change the "MPD Statements" sub-section of the "META Commands" section to be as follows:
    Quote:Support for the MPD Language Extension is required.

Also, update the File Format Restrictions for the Official Library spec. Add the following new paragraph to the "META Commands" section directly above its last paragraph (the one starting with "Legacy parts"):
Quote:To reiterate: No other meta-commands (including the MPD meta-command) are allowed in official parts.
I'm fine with this , with a (small) side note:

If 1.1 version compliance software MUST support mpd metas, shouldn't the contents of the mpd extension document be inlined and or more visible in the 1.1 spec. Instead of a tiny 'support ... is required' footnote.

edit: never mind, didn't realize the first part actually says it all Smile