New Blender Importer/Exporter for Blender 2.82


New Blender Importer/Exporter for Blender 2.82
#1
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.
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#2
This thread should probably be moved to LDraw Editors and Viewers.
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#4
(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".
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#5
(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?)
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#6
(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!
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#3
(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… ;-)
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#7
Hello,

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


Regards

Manfred
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#8
(2020-10-09, 9:51)Manfred Schäfer Wrote: Hello,

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


Regards

Manfred

I guess the biggest advantage is that this exporter "exports" to a blender file (obviously), but the key difference is that the blender import plugin may only work for certain versions of Blender. So if the author does not keep up with the blender plugin it may not work in future Blender versions.

Hence I believe this may be the better option.
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#15
(2020-12-16, 15:30)Rob Frydryck Wrote: I guess the biggest advantage is that this exporter "exports" to a blender file (obviously), but the key difference is that the blender import plugin may only work for certain versions of Blender. So if the author does not keep up with the blender plugin it may not work in future Blender versions.

Hence I believe this may be the better option.

So can this export a model as a .ldr file or only single parts and if it can what setup is required? I'm asking because the README file didn't seem to say how only that you could export but didn't say exactly what! I would appreciate any information you can provide me!
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#16
(2021-04-13, 23:40)Anderson Wrote: So can this export a model as a .ldr file or only single parts and if it can what setup is required? I'm asking because the README file didn't seem to say how only that you could export but didn't say exactly what! I would appreciate any information you can provide me!

Maybe you can find helpful the comment I made in this same thread (https://forums.ldraw.org/thread-24153-po...l#pid40723) after looking at the example files.
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#9
(2020-10-09, 9:51)Manfred Schäfer Wrote: Hello,

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


Regards

Manfred

Sorry for the delay in response. Life distracting me and whatnot.

The primary advantages are performance and accuracy of the import.

Models that take 60 seconds or more in the other plugin take about 10 seconds to import with mine. 

Parts that don't follow the spec correctly and shortcut parts will import correctly in my plugin. I found that the other plugin has problems in this area.

You're also able to create whole models and new parts with my plugin. I need to write up the instructions on how to do so, but I've got parts in the official library that were made with this plugin.
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#10
(2020-08-05, 5:19)Matthew Morrison Wrote: Please install it and show me what you can do.

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

Code:
...
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 just discovered this add-on and I am very interested on the export part, Cool but all my attempts end with an empty file (just the two bytes of an end of line). Confused My tests have been with Blender meshes: the monkey and the ico sphere. Could you give some brief instructions?

Compared with ImportLdraw I miss the options that position the camera, add an environment and put the model on a ground plane. That makes rendering easier for people with little knowledge of Blender, not my case.
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#11
(2021-03-01, 23:22)Jose Alfonso Wrote: I just discovered this add-on and I am very interested on the export part, Cool but all my attempts end with an empty file (just the two bytes of an end of line). Confused My tests have been with Blender meshes: the monkey and the ico sphere. Could you give some brief instructions?

Compared with ImportLdraw I miss the options that position the camera, add an environment and put the model on a ground plane. That makes rendering easier for people with little knowledge of Blender, not my case.
I'll work on getting a tutorial out soon.
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#12
I've added some exporting instructions to the Readme and some examples in the example folder.
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#13
(2021-03-29, 13:47)Matthew Morrison Wrote: I've added some exporting instructions to the Readme and some examples in the example folder.

Matthew,

it would be best creating a page at the LDraw wiki with an exhaustive tutorial and additionally send me a description for the Third Party Page.

w.
LEGO ergo sum
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#17
Thank you for your comments.

I'm working qol changes like panels to speed things up. I just have to learn the API for it and get the time together to do it. I also plan on writing up much better instructions and recording a tutorial when I have the time.

This plugin was originally a tool for just me so I welcome as much input as I can get.
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#14
(2021-03-29, 13:47)Matthew Morrison Wrote: I've added some exporting instructions to the Readme and some examples in the example folder.

Sorry, but your instructions are a little messy. Confused  It is not clear in which tabs the different customs properties must go, but I have figured from your example how to export an object without subparts and predefined colors: just adding the custom property ldraw_export_polygons=1 in Object tab. For me that covers most situations. Maybe the extension should create a panel in the Sidebar to add that custom properties in the right tabs. Idea

In the exported file there is no header, but I have seen one in the Text Editor in your example. I think the header should be added automatically by the exporter, not creating a text file in Blender. You just have to add two new fields in the Export Panel: Author and Description. I think those two and Filename are the essential data for a header. Keywords could also be a field, but I am not sure about History because is a multiline info.
Reply
RE: New Blender Importer/Exporter for Blender 2.82
#18
(2021-03-29, 19:03)Jose Alfonso Wrote: Sorry, but your instructions are a little messy. Confused  It is not clear in which tabs the different customs properties must go, but I have figured from your example how to export an object without subparts and predefined colors: just adding the custom property ldraw_export_polygons=1 in Object tab. For me that covers most situations. Maybe the extension should create a panel in the Sidebar to add that custom properties in the right tabs. Idea

In the exported file there is no header, but I have seen one in the Text Editor in your example. I think the header should be added automatically by the exporter, not creating a text file in Blender. You just have to add two new fields in the Export Panel: Author and Description. I think those two and Filename are the essential data for a header. Keywords could also be a field, but I am not sure about History because is a multiline info.

I'll add that to the list!
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)