Maniphest T93929

Error while exporting gltf in Blender 3.0
Closed, Resolved

Assigned To
Julien DUROURE (julien)
Authored By
Christoph Werner (Taros)
Dec 10 2021, 8:58 AM
Tags
  • BF Blender
  • Add-ons (BF-Blender)
  • Import/Export
Subscribers
Christoph Werner (Taros)
Johnny Varila (zoni527)
Julien DUROURE (julien)
Pratik Borhade (PratikPB2123)
Richard Antalik (ISS)
Scurest (scurest)
Shawn (labguy)
Tokens
"Burninate" token, awarded by Taros.

Description

System Information
Version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: f1cca3055776, type: release
Build date: 2021-12-03, 00:44:02 Platform: 'Windows-10-10.0.19043-SP0'

Short description of error
I get this error when trying to export to gltf in Blender 3.
This happen as soon as I change something in the scene and try to export it, this error appears.
A second try exports the file correctly and the error disappears. But it appears again as soons as something will be changed.

Error: Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.0\3.0\scripts\addons\io_scene_gltf2\__init__.py", line 464, in invoke
    for (k, v) in settings.items():
RuntimeError: IDPropertyGroup changed size during iteration

How to reproduce:

  1. Open default scene
  2. File โ†’ Export โ†’ glTF 2.0
  3. On sidebar, create new operator preset (lets say "test")
  4. Select "test"
  5. Enable Export Settings
  6. Export
  7. Repeat step 2

Another try and the error disappears. Objekt will be exported.

Is there a fix for this or can I do something myself?

Revisions and Commits

rBA Blender Add-ons

Event Timeline

Christoph Werner (Taros) created this task.Dec 10 2021, 8:58 AM
Christoph Werner (Taros) awarded a token.
Christoph Werner (Taros) updated the task description.Dec 10 2021, 9:00 AM
Christoph Werner (Taros) updated the task description.
Christoph Werner (Taros) updated the task description.Dec 10 2021, 9:03 AM
Christoph Werner (Taros) updated the task description.
Pratik Borhade (PratikPB2123) added a subscriber: Pratik Borhade (PratikPB2123).Dec 10 2021, 9:50 AM
Pratik Borhade (PratikPB2123) added a comment.EditedDec 10 2021, 10:15 AM

Hi, thanks for the report. Can not reproduce here on master and 3.0.0

Could you please share your export settings? (you can find them in sidebar of the the file view)

Christoph Werner (Taros) added a comment.Dec 10 2021, 12:48 PM

Here're my settings. Maybe when preferences are loaded?

And here's a video to see what happen.

Pratik Borhade (PratikPB2123) merged a task: T93937: glTF exporter fails after saving with an operator preset.
Pratik Borhade (PratikPB2123) added a subscriber: Johnny Varila (zoni527).
Pratik Borhade (PratikPB2123) changed the task status from Needs Triage to Confirmed.Dec 10 2021, 1:12 PM
Pratik Borhade (PratikPB2123) updated the task description.
Pratik Borhade (PratikPB2123) updated the task description.
Pratik Borhade (PratikPB2123) added projects: Add-ons (BF-Blender), Import/Export.

Thanks for clarifying. Can confirm.

Scurest (scurest) added a subscriber: Scurest (scurest).Dec 10 2021, 8:33 PM

While it's easy to fix (invoke should not modify settings while iterating over it; just handle export_selected before the loop), save_settings should also not save export_selected in the first place since it only exists for backwards compatibility.

Julien DUROURE (julien) added a subscriber: Julien DUROURE (julien).Dec 11 2021, 10:17 PM
Julien DUROURE (julien) claimed this task.Dec 11 2021, 10:28 PM
Julien DUROURE (julien) added a comment.Dec 11 2021, 10:42 PM
Christoph Werner (Taros) added a comment.Dec 13 2021, 11:02 AM

@Julien DUROURE (julien) Thank you very much! I've have tested your fix. Seem to work fine so far!

Julien DUROURE (julien) closed this task as Resolved by committing rBA503570ad7032: glTF exporter: Fix T93929 - back compatibility for use_selection.Dec 17 2021, 8:53 AM
Julien DUROURE (julien) added a commit: rBA503570ad7032: glTF exporter: Fix T93929 - back compatibility for use_selection.
Christoph Werner (Taros) added a comment.Dec 17 2021, 8:55 AM

Just out of curiosity: will the fix also be included in the next official update?

Julien DUROURE (julien) added a comment.Dec 17 2021, 9:12 AM

Hello,
This will be included in 3.1 alpha with next build (tomorrow)

There is no plan to add it in next 3.0.1 corrective release (This is not a regression, not a critical bug).

Workaround you can use if you want, is writing this in python console:

del bpy.context.scene['glTF2ExportSettings']['export_selected']

Christoph Werner (Taros) added a comment.Dec 17 2021, 9:15 AM
In T93929#1274319, @Julien DUROURE (julien) wrote:

Hello,
This will be included in 3.1 alpha with next build (tomorrow)

There is no plan to add it in next 3.0.1 corrective release (This is not a regression, not a critical bug).

Workaround you can use if you want, is writing this in python console:

del bpy.context.scene['glTF2ExportSettings']['export_selected']

Thank you. I've updated the py code file already with your changes.

Pratik Borhade (PratikPB2123) added subscribers: Shawn (labguy), Richard Antalik (ISS).