Fix: glTF exporter: remove empty action in filter list when refresh

This commit is contained in:
Julien Duroure
2025-02-22 09:02:06 +01:00
parent 1fcbab0503
commit dafff07ad9
2 changed files with 6 additions and 1 deletions

View File

@@ -5,7 +5,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (4, 4, 47),
"version": (4, 4, 48),
'blender': (4, 4, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@@ -613,6 +613,11 @@ class SCENE_OT_gltf2_action_filter_refresh(bpy.types.Operator):
return True
def execute(self, context):
# Remove no more existing actions
for idx, i in enumerate(bpy.data.scenes[0].gltf_action_filter):
if i.action is None:
bpy.data.scenes[0].gltf_action_filter.remove(idx)
for action in bpy.data.actions:
if id(action) in [id(i.action) for i in bpy.data.scenes[0].gltf_action_filter]:
continue