Python error loading fbx file in new project #105045
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#105045
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 531.29
Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash:
9be62e85b727
Worked: (newest version of Blender that worked as expected)
Addon Information
Name: FBX format (5, 8, 13)
Author: Campbell Barton, Bastien Montagne, Jens Restemeier, @Mysteryem
Short description of error
A certain FBX file that could be imported in Blender a while ago will generate a Python error after import.
I did not change the content of any FBX file, so the sudden inability to import the file left me very confused.
I tried versions 3.6 and alpha but still couldn't import the fbx file correctly.
Exact steps for others to reproduce the error
Create a new project and import the fbx file from the attachment.
Error feedback in the console:
Python: Traceback (most recent call last):
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx_init_.py", line 209, in execute
if import_fbx.load(self, context, filepath=path, **keywords) == {'FINISHED'}:
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 3464, in load
_(); del _
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 3458, in _
root_helper.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 2889, in build_hierarchy
child.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 2880, in build_hierarchy
child.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 2880, in build_hierarchy
child.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 2880, in build_hierarchy
child.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
[Previous line repeated 5 more times]
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 2866, in build_hierarchy
child.set_pose_matrix_and_custom_props(self, settings)
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 2752, in set_pose_matrix_and_custom_props
child.set_pose_matrix_and_custom_props(arm, settings)
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 2752, in set_pose_matrix_and_custom_props
child.set_pose_matrix_and_custom_props(arm, settings)
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 2752, in set_pose_matrix_and_custom_props
child.set_pose_matrix_and_custom_props(arm, settings)
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 2746, in set_pose_matrix_and_custom_props
blen_read_custom_properties(self.fbx_elem, pose_bone, settings)
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 319, in blen_read_custom_properties
fbx_obj_props = elem_find_first(fbx_obj, b'Properties70')
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\io_scene_fbx\import_fbx.py", line 84, in elem_find_first
for fbx_item in elem.elems:
AttributeError: 'NoneType' object has no attribute 'elems'
I can confirm. It's caused by
716702b97e
, but that change might have identified an issue elsewhere with the attached file because the importer appears to have created bones forNurbsCurve
models (a geometry type not supported by FBX IO). If that is correct behaviour in this case, thefbx_elem
of the bones has not been set to theNurbsCurve
model, so it tries to read the PoseBone custom properties fromNone
.A simple fix would be to check that
fbx_elem
is notNone
before trying to read custom properties from it, but I'm not currently sure if it should beNone
in the first place.A workaround for now to import this .fbx is to disable the import of Custom Properties when importing:
Thank you very much. This has solved all my problems