My Lightwave Export Script


(mxopivypx) #1

I just finished a Lightwave Export script…so im very proud of myself right now…lol. I know there’s probly other ones out there, but i took the challenge cause I want to understand Python better. Right now, its just for mesh exporting. I’m probly going to try and implement layers if i can, and maybe some basic material settings. Any way, Its here if anybody needs it or wants it.

http://www.seas.upenn.edu/~adamgm/Scripts/LWOExport.py

To use it, select the object that you want to export, fill in the File name and Directory variables and alt-p to your hearts content.
If it seems to be incompatable with your version of blender just post, and I’ll see what I can do to fix it.

Adam


(hannibar) #2

thanks. This is just what I need. I almost gave up on lightwave because I couldn’t export my models (crappy VRML export!).

I will try it as soon as I can.


(wavk) #3

Hey it’s not a crappy vrml export script, it’s one of the best out there. Lightwave’s import sux. Bigtime. Lightwave’s import of dxf is bad, too. The only import Lightwave does do well is obj.

Thanks for the script, I’d like to see those scripts integrated in the file menu of the open source release. It’s a bit irritating to have to load in export scripts every time.

Keep up the good work,

Wybren van Keulen
Funny Farm


(mxopivypx) #4

I was testin out the script yesterday and realized that for some reason, if you have a single edge in the mesh thats not connected to a face, the only thing that turns up in lightwave is the vertices…as soon as i figure out why its doing this ill update the script


(Lyubomir) #5

Thanks you for the script!
It seems that it always exports face normals flipped inside, even after apllying “Calculate Normals” or “Flip Normals” in Blender.
Unfartunately, Lightwave Modeller has no automatic Calculate Normals option and it’s a real pain in the hip :x to individually select faces and flip them…
I hope it’s my mistake though :slight_smile:

Lyubomir


(eeshlo) #6

There is a small error in the script, face.v.reverse doesn’t work like that (it returns a reference to the function, it doesn’t call it), it should be face.v.reverse()


(mxopivypx) #7

Thanks eeshlo for pointing that out. That should fix the normals problem that Lyubomir was having…just remember to calc normals outside first in blender. One more important note: Unless a mesh has a material assigned to it, it will only show up in lightwave as vertices.

Here is the Update:

http://www.seas.upenn.edu/~adamgm/Scripts/LWOExp11.py

Adam


(mthoenes) #8

Many thanks Adam. I have been moving blender models into messiah Studio. This will be abig help.

Regards


(Lyubomir) #9

I tested the newer version of the script with some really complex models and it works fine.

Lyubomir


(scorpius) #10

Don’t forget the Import Export Suite available on my site. It can import LW 5.5 and 6.0 as well as export. Other formats are supported as well.