FBX export errors when object keeps in Edit mode #87038

Open
opened 2021-03-30 11:55:57 +02:00 by Michael Soluyanov · 4 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.38

Blender Version
Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: blender/blender@02948a2cab

Addon Information
Name: FBX format (4, 22, 0)
Author: Campbell Barton, Bastien Montagne, Jens Restemeier

Short description of error
Basically, I believe that it is the same error https://developer.blender.org/T79343 but to be honest, I'm not 100% sure.
What you need to do is somehow keep the object in edit mode, remove active state from it then export. If you export object from Edit mode error will not happen, I guess export script have some checking if object in edit mode and if it so, make some workarounds. But if you hide the object when it in Edit mode, it stays in Edit mode until you select it again.

So in the test file you can get this weird state:

Exact steps for others to reproduce the error

  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\__init__.py", line 644, in execute
    return export_fbx_bin.save(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3198, in save
    ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod)
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3094, in save_single
    fbx_objects_elements(root, scene_data)
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2894, in fbx_objects_elements
    fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1133, in fbx_data_mesh_elements
    collayer.data.foreach_get("color", t_lc)
TypeError: couldn't access the py sequence

or

Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\__init__.py", line 644, in execute
    return export_fbx_bin.save(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3198, in save
    ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod)
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3094, in save_single
    fbx_objects_elements(root, scene_data)
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2894, in fbx_objects_elements
    fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1163, in fbx_data_mesh_elements
    uvlayer.data.foreach_get("uv", t_luv)
RuntimeError: internal error setting the array

Exact steps for others to reproduce test file

  • Add Cube A in collection B and Cube C in collection D.
  • Enter edit mode in cube A
  • Disable collection B (Exclude)
  • Select Cube C
  • Enable collection B (Exclude)
**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.38 **Blender Version** Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: `blender/blender@02948a2cab` **Addon Information** Name: FBX format (4, 22, 0) Author: Campbell Barton, Bastien Montagne, Jens Restemeier **Short description of error** Basically, I believe that it is the same error https://developer.blender.org/T79343 but to be honest, I'm not 100% sure. What you need to do is somehow keep the object in edit mode, remove active state from it then export. If you export object from Edit mode error will not happen, I guess export script have some checking if object in edit mode and if it so, make some workarounds. But if you hide the object when it in Edit mode, it stays in Edit mode until you select it again. So in the test file you can get this weird state: **Exact steps for others to reproduce the error** - Open file [Fbx export error.blend](https://archive.blender.org/developer/F9914380/Fbx_export_error.blend) - Export to FBX - Error will appear ``` File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\__init__.py", line 644, in execute return export_fbx_bin.save(self, context, **keywords) File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3198, in save ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod) File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3094, in save_single fbx_objects_elements(root, scene_data) File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2894, in fbx_objects_elements fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes) File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1133, in fbx_data_mesh_elements collayer.data.foreach_get("color", t_lc) TypeError: couldn't access the py sequence ``` or ``` Python: Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\__init__.py", line 644, in execute return export_fbx_bin.save(self, context, **keywords) File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3198, in save ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod) File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3094, in save_single fbx_objects_elements(root, scene_data) File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2894, in fbx_objects_elements fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes) File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1163, in fbx_data_mesh_elements uvlayer.data.foreach_get("uv", t_luv) RuntimeError: internal error setting the array ``` ``` ``` **Exact steps for others to reproduce test file** - Add Cube A in collection B and Cube C in collection D. - Enter edit mode in cube A - Disable collection B (Exclude) - Select Cube C - Enable collection B (Exclude)
Author
Member

Added subscriber: @crantisz

Added subscriber: @crantisz

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

Thanks for the report, I can confirm.

Thanks for the report, I can confirm.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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#87038
No description provided.