LDraw.org Discussion Forums

Full Version: Export of .mpd to single 'stand-alone' .ldr file ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
As if often the case (!) - the mistake was mine - not the model.

Error in my code meant that parent matrix was not being applied to sub-model lines if the sub-model line was a reference to another sub-model.

Courmorant model now flattens correctly (my flattened version attached).
Hi, I'd just like to add my 0.02 € to this thread,
to avoid confusion.
The 0 ROTATION element is just MLCad specific,
and it has nothing to do with MPDs or how they rotate the files contained within them.
It only tells MLCad WHERE to put the rotation point for the GUI,
has nothing to do with the rotation point around which the part gets rotated when used in its parent mpd!
Make sure you do _NOT_ use this line for the rotation when inlining into a single ldr...
I hope it's not a problem that I bump this very old topic, but I'm also interested in a .mpd to .ldr converter.
Is there any converter available?
I suppose the topic starter got something to work, because he said he needed such a converter for animations and he has a lot of animations on his website.
Maybe you should give MPDCenter a try Smile
Give the attached Python script a try (test example included) - I implemented it because I'm trying to add a motor to the 42005 Lego Monster Truck following the MPD file from rebrickable, but I couldn't find any tool to give me a flat LDR file so I can use tools like Bricksmith to bisect the model since the steps provided in the MPD file are pretty useless when you're trying to figure out how to build this thing...

Supports nested LDR references, but does NOT support references to other MPD files.
Works only on one file at a time.

How to use:
unzip, then you should have a mpd2ldr.py file - that file must be executable.
Now just call "./mpd2ldr.py filename.mpd" and the output will be filename.ldr
Has to be used from the command line (I've tried it on a Mac only)

I hope it works for you, and please forgive me if I don't provide support Smile
Use LeoCAD, it now has full MPD support and can easily export the main model assembly to ldr, hassle free.
Well...
I see all kind of scary rocket-science type of answers in this thread.
I personally have always done the MPD to LDR conversion directly in MLCAD using the export menu.
In case you have multiple steps it generates an LDR file for each step, but you just take the last step (biggest file size) and you got your converted file.
As simple as that :-)

- Mattia
Pages: 1 2 3