blender_niftools_addon
blender_niftools_addon copied to clipboard
"AttributeError: 'x' object has no attribute 'y'" for original Oblivion files
Issue Overview
Some .nif files that come with Oblivion have an "AttributeError: 'NoneType' object has no attribute 'data'" error on import.
Version Information
Blender Niftools Addon Version Info
Built the addon using the following: Python 3.11 New Pyffi: https://github.com/Candoran2/new-pyffi/commit/6d113fdcfcf950eae138f7e75efcc6b057c1d605 New nif xml: https://github.com/Candoran2/nifxml/commit/d0ab9271e2c2bf75eacb46082b93e1d304b551e6 Latest blender addon code at: https://github.com/Candoran2/blender_nif_plugin/commit/cc4012830897ed32c378c3a2e5335e68d7ef3d48
Blender Version Info
3.4
Platform information
Windows 11 22H2
Steps to Reproduce
[Ordered list of the steps required for recreating the issue, including settings]
- Build the latest blender_niftools_addon using the code versions listed above.
- Import the problem mesh from Oblivion (below) into Blender.
- The file is imported but has an error.
Expected Result
Should import without errors.
Actual Result
Imports with an error.
Console Output
niftools:INFO:Inserting key 'CLaw_L01'
Traceback (most recent call last):
File "****\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_niftools\operators\nif_import_op.py", line 134, in execute
return NifImport(self, context).execute()
File "****\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_niftools\nif_import.py", line 131, in execute
self.import_root(root)
File "****\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_niftools\nif_import.py", line 159, in import_root
b_obj = self.import_branch(root_block)
File "****\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_niftools\nif_import.py", line 234, in import_branch
b_child = self.import_branch(n_child, b_armature=b_armature)
File "****\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_niftools\nif_import.py", line 200, in import_branch
return self.objecthelper.import_geometry_object(b_armature, n_block)
File "****\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_niftools\modules\nif_import\object\__init__.py", line 135, in import_geometry_object
self.mesh.import_mesh(n_block, b_obj)
File "****\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_niftools\modules\nif_import\geometry\mesh\__init__.py", line 167, in import_mesh
self.morph_anim.import_morph_controller(n_block, b_obj)
File "****\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_niftools\modules\nif_import\animation\morph.py", line 98, in import_morph_controller
morph = n_morph_ctrl.interpolators[morph_i].data.data
AttributeError: 'NoneType' object has no attribute 'data'