[Bf-python] 3DS export

Joel Jensen yobert at gmail.com
Tue Sep 2 17:35:15 CEST 2008


Hello,

I've been using the blender 3D studio max exporter and ran in to some
issues.  Since the .3ds format stores its vertex/face counts in a 16
bit unsigned integer, blender will write a corrupted export on any
mesh with too many faces.  I think the way that people get around this
(if they happen to figure out why they can't import) is they split
their large meshes into smaller named meshes.

I'm a complete and utter newbie at python, but I've modified the
exporter to work with large meshes by splitting them into sub-objects
automatically.  This only works with too many faces.. If your vertex
count is too high per named object, it still breaks but now it warns
you on the console.  I chose to split after 40,000 faces to try to
avoid hitting the 65535 vertex mark. (usually enough are shared that
this is o.k.)

I'm quite sure I'm doing this in a terrible way, so if a
blender/python person could look at this and give me suggestions that
would be grand.  And sorry if I did the patch wrong, this is my first
patch too.

Really, I guess you could argue that any "good" model will not have
that many faces per named object, which I could agree with but then
suggest that we still patch the exporter to warn you and stop at 65535
faces instead of silently corrupting the export ;-)

-Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3ds_export.py.patch
Type: text/x-diff
Size: 4472 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20080902/71b0532b/attachment.patch>


More information about the Bf-python mailing list