Fix: glTF exporter: remove empty action in filter list when refresh
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user