LDraw.org Discussion Forums
New Blender Importer/Exporter for Blender 2.82 - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw File Processing and Conversion (https://forums.ldraw.org/forum-22.html)
+--- Thread: New Blender Importer/Exporter for Blender 2.82 (/thread-24153.html)



New Blender Importer/Exporter for Blender 2.82 - Matthew Morrison - 2020-08-05

After months of work, I've released my Blender LDraw handler. https://github.com/cuddlyogre/ExportLdraw

Download the project zip, and extract the contents to C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\ExportLdraw, then in Blender, go to Edit > Preferences > Add-ons > search for LDraw and check the box next to Import-Export: Export LDraw. Menu options are in Import and Export.

Please install it and show me what you can do.

I need to write up proper instructions, but here's the readme :

Code:
LDraw Handler for Blender 2.82, written by Matthew Morrison [cuddlyogre] - cuddlyogre@gmail.com - www.cuddlyogre.com

Materials were taken almost wholesale from https://github.com/TobyLobster/ImportLDraw. I added my own glass material that was taken from a BlenderArtists thread, but most of it is unchanged. I essentially learned Python by dissecting and studying this plugin, and it inspired me to make my own. My plugin wouldn't exist without this one.

I have to write up actual instructions, but normal usage is straightforward.

Importing: File > Import > LDraw (.mpd/.ldr/.l3b/.dat)

Exporting requires a bit of setup, but once that's taken care of: File > Export > LDraw (.mpd/.ldr/.l3b/.dat)

I have a few parts in the official parts library that were created in Blender and exported using my plugin.

You are able to export parts and models with the correct project setup. You can even build entire models in Blender, but the workflow needs to be figured out for that to be any kind of fun.

I built this plugin with performance and compatibility in mind. It handles MLCad parts, LDCad projects, ldr, and mpd. It also processes most official META commands. For instance, STEP will set keyframes so you can watch the model be built. Theoretically, you could build and entire animation in an MPD file if you did it right. TEXMAP support is really all that's missing feature wise.

https://omr.ldraw.org/files/337 loads in about 13 seconds https://omr.ldraw.org/files/338 has lots of incorrectly written parts and MLCAD parts that import correctly

You are able to choose the logo you want to show on studs, or no logo or stud at all.

It works with Eevee and Cycles right out of the gate.

On my TODO is the ability to replace selected parts with different resolution parts. For instances, 338 from eariler has a lot of gaps in the tires and fender because the model is built with parts with different resolutions.

Pull requests and examples of my plugin in action are welcome.



RE: New Blender Importer/Exporter for Blender 2.82 - Matthew Morrison - 2020-08-05

This thread should probably be moved to LDraw Editors and Viewers.


RE: New Blender Importer/Exporter for Blender 2.82 - N. W. Perry - 2020-08-05

(2020-08-05, 5:19)Matthew Morrison Wrote: After months of work, I've released my Blender LDraw handler. https://github.com/cuddlyogre/ExportLdraw

Download the project zip, and extract the contents to C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\ExportLdraw, then in Blender, go to Edit > Preferences > Add-ons > search for LDraw and check the box next to Import-Export: Export LDraw. Menu options are in Import and Export.

Please install it and show me what you can do.

The equivalent path for MacOS would apparently be: /Applications/Blender.app/Contents/Resources/2.83/scripts/addons/ExportLdraw

Can't wait to fiddle around with this. First I guess I need to learn Blender itself… ;-)


RE: New Blender Importer/Exporter for Blender 2.82 - Travis Cobbs - 2020-08-05

(2020-08-05, 5:27)Matthew Morrison Wrote: This thread should probably be moved to LDraw Editors and Viewers.

No, this is a converter. Blender is not an LDraw program, and a Blender importer definitely counts as "file processing and conversion".


RE: New Blender Importer/Exporter for Blender 2.82 - Orion Pobursky - 2020-08-05

(2020-08-05, 19:17)Travis Cobbs Wrote: No, this is a converter. Blender is not an LDraw program, and a Blender importer definitely counts as "file processing and conversion".

I moved the thread to this (Conversion) forum. I forget where it was (Parts authoring maybe?)


RE: New Blender Importer/Exporter for Blender 2.82 - Matthew Morrison - 2020-08-05

(2020-08-05, 19:42)Orion Pobursky Wrote: I moved the thread to this (Conversion) forum. I forget where it was (Parts authoring maybe?)

Thank you!


RE: New Blender Importer/Exporter for Blender 2.82 - Manfred Schäfer - 2020-10-09

Hello,

what is the difference or the advantage of this add-on compared to the "ImportLDraw" add-on?


Regards

Manfred