Skip to content

XP2B 4.4.0 breakage in Blender >5.0.0 #758

Description

@JT8D-17

XP2B does not work in Blender 5.0.0 and newer because of a change in actions handling. Imports and exports fail with:

Python: Traceback (most recent call last):
File "/home/.../.config/blender/5.0/scripts/addons/io_xplane2blender/xplane_ops.py", line 586, in execute
bpy.ops.export.xplane_obj(filepath=self.initial_dir, export_is_relative=True)
File "/media/X-Plane/X-Plane_Utilities/blender-5.0.0-linux-x64/5.0/scripts/modules/bpy/ops.py", line 109, in call
ret = _op_call(self.idname_py(), kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
File "/home/.../.config/blender/5.0/scripts/addons/io_xplane2blender/xplane_types/xplane_file.py", line 75, in >createFilesFromBlenderRootObjects
xplane_file = createFileFromBlenderRootObject(potential_root, view_layer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/.../.config/blender/5.0/scripts/addons/io_xplane2blender/xplane_types/xplane_file.py", line 131, in >createFileFromBlenderRootObject
xplane_file = XPlaneFile(filename, layer_props)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/.../.config/blender/5.0/scripts/addons/io_xplane2blender/xplane_types/xplane_file.py", line 252, in init
_pre_scan_all_keyframes()
File "/home/.../.config/blender/5.0/scripts/addons/io_xplane2blender/xplane_types/xplane_file.py", line 181, in _pre_scan_all_keyframes
{
File "/home/.../.config/blender/5.0/scripts/addons/io_xplane2blender/xplane_types/xplane_file.py", line 184, in
for fcurve in action.fcurves
^^^^^^^^^^^^^^
AttributeError: 'Action' object has no attribute 'fcurves'
Location: ..../blender-5.0.0-linux-x64/5.0/scripts/modules/bpy/ops.py:109

This is due to removal of non-slotted actions support in Blender 5.0.0.

See: https://developer.blender.org/docs/release_notes/5.0/python_api/ and https://developer.blender.org/docs/release_notes/4.4/upgrading/slotted_actions/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions