From 226682de8b0353487e041a3aa2e6960281fc443a Mon Sep 17 00:00:00 2001 From: William Herald Snyder Date: Mon, 3 Oct 2022 10:28:53 -0400 Subject: [PATCH] Data field 0 overrunning bounds of UI_MATERIAL_ANIMATION_LENGTHS bugfix --- addons/io_scene_swbf_msh/msh_material_to_blend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/io_scene_swbf_msh/msh_material_to_blend.py b/addons/io_scene_swbf_msh/msh_material_to_blend.py index d47fe90..4f26c0e 100644 --- a/addons/io_scene_swbf_msh/msh_material_to_blend.py +++ b/addons/io_scene_swbf_msh/msh_material_to_blend.py @@ -106,7 +106,7 @@ def _fill_material_props_data(material, material_properties): anim_length_index = int(sqrt(material.data[0])) if anim_length_index < 0: anim_length_index = 0 - elif anim_length_index > len(UI_MATERIAL_ANIMATION_LENGTHS): + elif anim_length_index >= len(UI_MATERIAL_ANIMATION_LENGTHS): anim_length_index = len(UI_MATERIAL_ANIMATION_LENGTHS) - 1 material_properties.animation_length = UI_MATERIAL_ANIMATION_LENGTHS[anim_length_index][0]