FBX Binary export fails with grouped batching when one of the groups contains no objects #42975

Closed
opened 2014-12-20 19:49:25 +01:00 by Harrison Nordby · 5 comments

It's possible to have a group in bpy.data.groups that has no objects. This causes the code that finds the best source scene to fail in export_fbx_bin.py However, export_fbx.py avoids this problem because it doesn't attempt to find the best source scene.

Unless there's an obscure reason to export empty groups, I would suggest changing the following lines in both export_fbx_bin.py and export_fbx.py from:

      if batch_mode == 'GROUP':
          data_seq = bpy.data.groups
      else:
          data_seq = bpy.data.scenes

to:

      if batch_mode == 'GROUP':
          data_seq = [group for group in bpy.data.groups if len(group.objects) > 0]
      else:
          data_seq = bpy.data.scenes
It's possible to have a group in bpy.data.groups that has no objects. This causes the code that finds the best source scene to fail in export_fbx_bin.py However, export_fbx.py avoids this problem because it doesn't attempt to find the best source scene. Unless there's an obscure reason to export empty groups, I would suggest changing the following lines in both export_fbx_bin.py and export_fbx.py from: ``` if batch_mode == 'GROUP': data_seq = bpy.data.groups else: data_seq = bpy.data.scenes ``` to: ``` if batch_mode == 'GROUP': data_seq = [group for group in bpy.data.groups if len(group.objects) > 0] else: data_seq = bpy.data.scenes

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @Squashwell

Added subscriber: @Squashwell
Bastien Montagne self-assigned this 2014-12-20 23:01:46 +01:00

This issue was referenced by e22da49ade

This issue was referenced by e22da49ade4789cc6c39a78cc8fb0504ededa791

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit e22da49ade.

Closed by commit e22da49ade.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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#42975
No description provided.