Object %r can't be written into a 3DS file #2

Closed
opened 2024-08-27 08:37:53 +02:00 by Gottfried Hofmann · 3 comments
Contributor

When exporting the object in the .blend attached, I get a warning that object %r cannot be exported and the resulting 3DS file is only 1kb (see attached 3DS).

Here is a screenshot of the error, it only pops up in the UI, nothing is written to the console and instead of giving the name of the object that failed to export, it only reads %r. It would be better if it would also show the name of the object:

image

When exporting the object in the .blend attached, I get a warning that object %r cannot be exported and the resulting 3DS file is only 1kb (see attached 3DS). Here is a screenshot of the error, it only pops up in the UI, nothing is written to the console and instead of giving the name of the object that failed to export, it only reads %r. It would be better if it would also show the name of the object: ![image](/attachments/ab404d43-5d4f-4668-b640-144b800e213c)
Gottfried Hofmann changed title from Object %r can'T be written into a 3DS file to Object %r can't be written into a 3DS file 2024-08-27 08:38:11 +02:00
Author
Contributor

I created a PR for the second part of the issue, it will make the name of the object that cannot be exported show up in the warning: #3

I created a PR for the second part of the issue, it will make the name of the object that cannot be exported show up in the warning: https://projects.blender.org/extensions/io_scene_3ds/pulls/3
Author
Contributor

Here is the output of dump() for the chunk that breaks the export:

ID='0x4000' size=829819
name = broken
ID='0x4100' size=829806
ID='0x4110' size=165092
vertices = (13757 items)
ID='0x4120' size=664654
faces = (66455 items)
ID='0x4130' size=16
name = noname1
face_list = (0 items)
ID='0x4130' size=16
name = noname2
face_list = (0 items)
ID='0x4130' size=16
name = noname3
face_list = (0 items)
ID='0x4130' size=16
name = noname4
face_list = (0 items)
ID='0x4130' size=132926
name = noname5
face_list = (66455 items)
ID='0x4130' size=16
name = noname6
face_list = (0 items)
ID='0x4160' size=54
xx = -1.0
xy = 0.0
xz = 0.0
yx = -0.0
yy = -1.0
yz = 0.0
zx = 0.0
zy = 0.0
zz = 1.0
tx = -77.0
ty = -295.0
tz = 0.0

Here is the output of dump() for the chunk that breaks the export: ID='0x4000' size=829819 name = broken ID='0x4100' size=829806 ID='0x4110' size=165092 vertices = (13757 items) ID='0x4120' size=664654 faces = (66455 items) ID='0x4130' size=16 name = noname1 face_list = (0 items) ID='0x4130' size=16 name = noname2 face_list = (0 items) ID='0x4130' size=16 name = noname3 face_list = (0 items) ID='0x4130' size=16 name = noname4 face_list = (0 items) ID='0x4130' size=132926 name = noname5 face_list = (66455 items) ID='0x4130' size=16 name = noname6 face_list = (0 items) ID='0x4160' size=54 xx = -1.0 xy = 0.0 xz = 0.0 yx = -0.0 yy = -1.0 yz = 0.0 zx = 0.0 zy = 0.0 zz = 1.0 tx = -77.0 ty = -295.0 tz = 0.0
Collaborator

@GottfriedHofmann The 3ds format uses unsigned shorts to store the vertices and faces (always triangles), this means the vertex and face count is limited to 65535. Your mesh has 66455 faces, those have to be reduced. You can split up the meshes, to multplie objects, then you can export them. The vertex and triangle count can be seen in the blender statistics.
For further info have a look here:
Integer types
3ds wikipedia

Edit: The PR has been merged
Commit 57d633fb31 fixes the issue with the broken names, usually names in 3ds are limited to the DOS 8.3 format but it seems to be no problem if it is longer, I increased the max name length to 24 characters

@GottfriedHofmann The 3ds format uses unsigned shorts to store the vertices and faces (always triangles), this means the vertex and face count is limited to 65535. Your mesh has 66455 faces, those have to be reduced. You can split up the meshes, to multplie objects, then you can export them. The vertex and triangle count can be seen in the blender statistics. For further info have a look here: [Integer types](https://kotlinlang.org/docs/unsigned-integer-types.html) [3ds wikipedia](https://en.wikipedia.org/wiki/.3ds) Edit: The PR has been merged Commit 57d633fb31e48ba35a561b706ffd754d08215287 fixes the issue with the broken names, usually names in 3ds are limited to the DOS 8.3 format but it seems to be no problem if it is longer, I increased the max name length to 24 characters
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: extensions/io_scene_3ds#2
No description provided.