diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 44b964174..5aaf9f92e 100644 --- a/io_scene_fbx/__init__.py +++ b/io_scene_fbx/__init__.py @@ -5,7 +5,7 @@ bl_info = { "name": "FBX format", "author": "Campbell Barton, Bastien Montagne, Jens Restemeier, @Mysteryem", - "version": (5, 8, 3), + "version": (5, 8, 4), "blender": (3, 6, 0), "location": "File > Import-Export", "description": "FBX IO meshes, UVs, vertex colors, materials, textures, cameras, lamps and actions", diff --git a/io_scene_fbx/encode_bin.py b/io_scene_fbx/encode_bin.py index 2970fd73f..a7e8071e2 100644 --- a/io_scene_fbx/encode_bin.py +++ b/io_scene_fbx/encode_bin.py @@ -250,9 +250,8 @@ class FBXElem: for elem in self.elems: offset = elem._calc_offsets(offset, (elem is elem_last)) offset += _BLOCK_SENTINEL_LENGTH - elif not self.props or self.id in _ELEMS_ID_ALWAYS_BLOCK_SENTINEL: - if not is_last: - offset += _BLOCK_SENTINEL_LENGTH + elif (not self.props and not is_last) or self.id in _ELEMS_ID_ALWAYS_BLOCK_SENTINEL: + offset += _BLOCK_SENTINEL_LENGTH return offset @@ -282,9 +281,8 @@ class FBXElem: assert(elem.id != b'') elem._write(write, tell, (elem is elem_last)) write(_BLOCK_SENTINEL_DATA) - elif not self.props or self.id in _ELEMS_ID_ALWAYS_BLOCK_SENTINEL: - if not is_last: - write(_BLOCK_SENTINEL_DATA) + elif (not self.props and not is_last) or self.id in _ELEMS_ID_ALWAYS_BLOCK_SENTINEL: + write(_BLOCK_SENTINEL_DATA) def _write_timedate_hack(elem_root):