Import von FBX didn't work. #98345

Closed
opened 2022-05-24 03:17:05 +02:00 by Alex Ander · 6 comments

System Information
Operating system: Linux-5.15.0-30-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: NVIDIA GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 510.73.05

Blender Version
Broken: version: 3.1.2, branch: blender-v3.1-release, commit date: 2022-03-31 17:40, hash: blender/blender@cc66d1020c
Worked: (newest version of Blender that worked as expected)

Short description of error
Tried to import an FBX, got following error.

bpy.context.space_data.system_folders_active = 2
bpy.ops.object.select_all(action='DESELECT')
Python: Traceback (most recent call last):
  File "/usr/share/blender/scripts/addons/io_scene_fbx/__init__.py", line 216, in execute
    if import_fbx.load(self, context, filepath=path, **keywords) == {'FINISHED'}:
  File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 2603, in load
    _(); del _
  File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 2602, in _
    fbx_item[1] = blen_read_geom(fbx_tmpl, fbx_obj, settings)
  File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 1300, in blen_read_geom
    blen_read_geom_layer_color(fbx_obj, mesh)
  File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 1100, in blen_read_geom_layer_color
    blen_read_geom_array_mapped_polyloop(
  File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 987, in blen_read_geom_array_mapped_polyloop
    blen_read_geom_array_setattr(blen_read_geom_array_gen_indextodirect(fbx_layer_index, stride),
  File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 843, in blen_read_geom_array_setattr
    _process(blen_data, blen_attr, fbx_data, xform, item_size, blen_idx, fbx_idx)
  File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 838, in _process
    setattr(blen_data[blen_idx], blen_attr, fbx_data[fbx_idx:fbx_idx + item_size])
ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 0

location: <unknown location>:-1

pirate.fbx (was downloaded from turbosquid if it's matter)

Exact steps for others to reproduce the error
Just tried to import attached FBX into empty project.

Commentary
I tried also the last BETA with same result.
I found old similar bugs here, some of them was marked as resolved. #44806, #43095, #53011
and also found a conversation about similar error on blenderartists where they said, the problem was one of bones, scaled to 0.

I tried it in Autodesk Viewer and it also shows errors, though could render the model:

TranslationWorker-TextureResizingFailed The drawing's textures were not correctly processed.
TranslationWorker-ThumbnailGenerationFailed The drawing's thumbnails were not properly created.

**System Information** Operating system: Linux-5.15.0-30-generic-x86_64-with-glibc2.35 64 Bits Graphics card: NVIDIA GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 510.73.05 **Blender Version** Broken: version: 3.1.2, branch: blender-v3.1-release, commit date: 2022-03-31 17:40, hash: `blender/blender@cc66d1020c` Worked: (newest version of Blender that worked as expected) **Short description of error** Tried to import an FBX, got following error. ``` bpy.context.space_data.system_folders_active = 2 bpy.ops.object.select_all(action='DESELECT') Python: Traceback (most recent call last): File "/usr/share/blender/scripts/addons/io_scene_fbx/__init__.py", line 216, in execute if import_fbx.load(self, context, filepath=path, **keywords) == {'FINISHED'}: File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 2603, in load _(); del _ File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 2602, in _ fbx_item[1] = blen_read_geom(fbx_tmpl, fbx_obj, settings) File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 1300, in blen_read_geom blen_read_geom_layer_color(fbx_obj, mesh) File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 1100, in blen_read_geom_layer_color blen_read_geom_array_mapped_polyloop( File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 987, in blen_read_geom_array_mapped_polyloop blen_read_geom_array_setattr(blen_read_geom_array_gen_indextodirect(fbx_layer_index, stride), File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 843, in blen_read_geom_array_setattr _process(blen_data, blen_attr, fbx_data, xform, item_size, blen_idx, fbx_idx) File "/usr/share/blender/scripts/addons/io_scene_fbx/import_fbx.py", line 838, in _process setattr(blen_data[blen_idx], blen_attr, fbx_data[fbx_idx:fbx_idx + item_size]) ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 0 location: <unknown location>:-1 ``` [pirate.fbx](https://archive.blender.org/developer/F13101797/pirate.fbx) (was downloaded from [turbosquid ](https://www.turbosquid.com/3d-models/pirate-3d-model-1792196) if it's matter) **Exact steps for others to reproduce the error** Just tried to import attached FBX into empty project. **Commentary** I tried also the last BETA with same result. I found old similar bugs here, some of them was marked as resolved. #44806, #43095, #53011 and also found a conversation about similar error on [blenderartists ](https://blenderartists.org/t/fbx-import-on-2-75a-giving-me-errors/649458/5) where they said, the problem was one of bones, scaled to 0. I tried it in Autodesk Viewer and it also shows errors, though could render the model: ``` TranslationWorker-TextureResizingFailed The drawing's textures were not correctly processed. TranslationWorker-ThumbnailGenerationFailed The drawing's thumbnails were not properly created. ```
Author

Added subscriber: @Alex-Ander

Added subscriber: @Alex-Ander
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @mont29

Added subscriber: @mont29

Thing is, there seems to be many issues with this file... We do not have the time to investigate a 20MB binary FBX file, but will add a check/workaround for this error in the importer code for now.

We can only asses whether this is actually a bug in FBX importer, or a broken FBX file, if we get a much smaller reproducible case.

Thing is, there seems to be many issues with this file... We do not have the time to investigate a 20MB binary FBX file, but will add a check/workaround for this error in the importer code for now. We can only asses whether this is actually a bug in FBX importer, or a broken FBX file, if we get a much smaller reproducible case.

This issue was referenced by 514aca8ac9

This issue was referenced by 514aca8ac9cf485a27676fca5441a6445aef498b

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne self-assigned this 2022-06-13 12:58:45 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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: blender/blender-addons#98345
No description provided.