Here's another gem from Matt Ebb on exporting 3D curves, specifically to 3DS Max.
Matt writes:
Over the last few weeks at the studio I've been working in Blender alongside 3DS Max and I've needed to export 3D bézier curve (spline) data between the two apps.
...
So with no ready made options, I tried an idea - I read up on MaxScript and made a Python script for Blender that takes the curve data and and uses it to generate a MaxScript, that when run inside 3DS Max will generate the same curve using the MaxScript API. There are a few advantages to this, there's a very fine level of control and you can easily export every feature that's supported by both Blender and Max, without worrying if an intermediary format supports those specific features too. However there are drawbacks - it's a pain to use since you have to open up and run a MaxScript each time, rather than just importing a file. I'd rather support an existing standard format, so it's more widely useful for other people than just me.
...
It's my first exporter and I didn't use any fancy XML libraries, so it may be rough (although it gets the job done fine).
Also, please be aware that the script
needs a current CVS build. It's using a new internal python function that ideasman just made recently.
He's open to any suggestions on how to improve the script and I'm sure the community will come through with some helpful ideas.
Get more details at Matt's website.
The script is available, here.
6 Comments
Nice work. Always good to have more options
This is such a small little script, I don't know if it really deserves the attention! But there have been a few good things happening for i/o in Blender recently - I think many people will be interested that there is now an FBX exporter under development (in CVS) and Campbell is doing a cracking job on it: http://blenderartists.org/forum/showthread.php?t=92082
It definitively deserves the attention !
I think that writting scripts that write scripts are always good to put some attention on because often that's a very good way to go about solving translation problems.
But people need also to keep in mind that this is no beginner-level stuff. Scripts that write scripts can be very dangerous and should only be used if you know what you are doing...
http://www.blendernation.com/2007/04/24/blender-242-security-advisory/
Wow, Matt, way to push the envelope!! I'm sure Falk and others that are using Max and Blender are going to really benefit from this. It amazes me how much you continue to give back to the community, in so many areas - bravo, sir!!
One of the things I would love are more solid import export options to work better with other applications. I could've used quite a few of them not to long ago. Hell, if anyone has a working idea to get models from inventor into blender, you would MAKE MY MONTH!!! there's some inventor vrml export script around, but it didn't import into blender, neither did other vrml's by the way.
It's quite annoying when commercial apps start taking out their import/export capabilities, only to work with their other commercial apps....
I have been growing a wishlist for blender over the last 2 months, and import export options are among them.