FBX Import: Can't import FBX file. AttributeError:'NoneType' object has no attribute 'data' #82830

Closed
opened 2020-11-19 00:33:28 +01:00 by GeekyGami · 11 comments

System Information
Operating system: Windows-10-10.0.14393-SP0 64 Bits
Graphics card: GeForce GTX 1060 3GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.15

Blender Version
Broken: version: 2.91.0 Beta, branch: master, commit date: 2020-11-17 22:01, hash: blender/blender@e580c18853
Worked: 2.79

Short description of error
This is an issue that was closed prior due to unresponsive user that affected 2.82 to the beta version of 2.91.
I tested it on the stable release 2.90.1 as well.

An FBX I attempt to import into Blender fails to load in with the following.

Traceback (most recent call last):

File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\io_scene_fbx__init__.py", line 216, in execute

if import_fbx.load(self, context, filepath=path, **keywords) == {'FINISHED'}:

File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\io_scene_fbx\importfbx.py", line 2592, in load

(); del _

File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\io_scene_fbx\importfbx.py", line 2591, in 

fbx_item[1] = blen_read_geom(fbx_tmpl, fbx_obj, settings)

File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\io_scene_fbx\import_fbx.py", line 1289, in blen_read_geom

blen_read_geom_layer_color(fbx_obj, mesh)

File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\io_scene_fbx\import_fbx.py", line 1082, in blen_read_geom_layer_color

blen_data = color_lay.data

AttributeError: 'NoneType' object has no attribute 'data'

location: <unknown location>:-1

{F9320007}
{F9320013}
Here I've uploaded two files. The smallest one is a 2015 FBX.
The other one is 2018 FBX.

They both give the same error.

I open Blender, I select everything in viewport, delete, then I import FBX, and import one of the two appended files.
These are my import settings.
https://i.imgur.com/UqJ6Btq.png

**System Information** Operating system: Windows-10-10.0.14393-SP0 64 Bits Graphics card: GeForce GTX 1060 3GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.15 **Blender Version** Broken: version: 2.91.0 Beta, branch: master, commit date: 2020-11-17 22:01, hash: `blender/blender@e580c18853` Worked: 2.79 **Short description of error** This is an issue that was closed prior due to unresponsive user that affected 2.82 to the beta version of 2.91. I tested it on the stable release 2.90.1 as well. An FBX I attempt to import into Blender fails to load in with the following. ```lines Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\io_scene_fbx__init__.py", line 216, in execute ``` if import_fbx.load(self, context, filepath=path, **keywords) == {'FINISHED'}: ``` File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\io_scene_fbx\importfbx.py", line 2592, in load ``` (); del _ ``` File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\io_scene_fbx\importfbx.py", line 2591, in ``` fbx_item[1] = blen_read_geom(fbx_tmpl, fbx_obj, settings) ``` File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\io_scene_fbx\import_fbx.py", line 1289, in blen_read_geom ``` blen_read_geom_layer_color(fbx_obj, mesh) ``` File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\io_scene_fbx\import_fbx.py", line 1082, in blen_read_geom_layer_color ``` blen_data = color_lay.data ``` AttributeError: 'NoneType' object has no attribute 'data' location: <unknown location>:-1 ``` {F9320007} {F9320013} Here I've uploaded two files. The smallest one is a 2015 FBX. The other one is 2018 FBX. They both give the same error. I open Blender, I select everything in viewport, delete, then I import FBX, and import one of the two appended files. These are my import settings. https://i.imgur.com/UqJ6Btq.png
Author

Added subscriber: @GeekyGami

Added subscriber: @GeekyGami
Author

Adding details for context, might be useful.

So, I'm using SB3UGS to export FBX from a Unity game.
I'm specifically exporting a skinnedmeshrenderer with its morphs (Blendshapes)

I have an option I can check, for it to export "morph masks"

When that option is checked, and I import the resulting FBX (I.E. one of those two) is when the error occurs.
When it is unchecked, it imports fine.

So, I think this might have something to do with morph masks.

Adding details for context, might be useful. So, I'm using SB3UGS to export FBX from a Unity game. I'm specifically exporting a skinnedmeshrenderer with its morphs (Blendshapes) I have an option I can check, for it to export "morph masks" When that option is checked, and I import the resulting FBX (I.E. one of those two) is when the error occurs. When it is unchecked, it imports fine. So, I think this might have something to do with morph masks.

Added subscriber: @rjg

Added subscriber: @rjg

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

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

The source of the problem is Blender's limit of eight vertex color layers. The file contains more and the *.fbx importer doesn't keep track how many have been created before. If the limit is reached mesh.vertex_colors.new(name=fbx_layer_name, do_init=False) returns None. The importer should handle this case properly, hence I'm marking this as confirmed.

The source of the problem is Blender's limit of eight vertex color layers. The file contains more and the `*.fbx` importer doesn't keep track how many have been created before. If the limit is reached `mesh.vertex_colors.new(name=fbx_layer_name, do_init=False)` returns `None`. The importer should handle this case properly, hence I'm marking this as confirmed.

In a cursory check I've noticed that other importers, e.g. PLY, coat3D or X3D don't seem to handle this case properly either. A similar check would also be necessary for UV layers as these have a hard limit as well.

In a cursory check I've noticed that other importers, e.g. PLY, coat3D or X3D don't seem to handle this case properly either. A similar check would also be necessary for UV layers as these have a hard limit as well.

Added subscriber: @Limarest

Added subscriber: @Limarest

Tested files with BetterFBX addon - imported correctly and even had the shape keys

Tested files with BetterFBX addon - imported correctly and even had the shape keys

@Limarest When including a check for the return value, it imports the file fine as well. Neither the official FBX importer nor a third-party add-on can change the limits though, so only eight vertex color layers will be loaded.

@Limarest When including a check for the return value, it imports the file fine as well. Neither the official FBX importer nor a third-party add-on can change the limits though, so only eight vertex color layers will be loaded.
Robert Guetzkow self-assigned this 2020-11-19 19:06:27 +01:00

This issue was referenced by a0e8b8b787

This issue was referenced by a0e8b8b7875ba1eb883a714344d6fbace6259b4f

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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#82830
No description provided.