From f3975a3bad00da1d6df6026c9e74667d92c8288d Mon Sep 17 00:00:00 2001
From: Bastien Montagne <bastien@blender.org>
Date: Fri, 7 Oct 2022 11:27:06 +0200
Subject: [PATCH] Fix T99876: FBX exporting animation with 1 fps

As suggested by Omar Emara (@OmarSquircleArt), break after first
matching framerate found, instead of searching the whole list everytime,
ending up selecting the last matching value.

NTSC 'drop frame' type are rather unusual, they should never be
auto-selected anyway.
---
 io_scene_fbx/__init__.py       | 2 +-
 io_scene_fbx/export_fbx_bin.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 185e8336d..28c85030d 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -3,7 +3,7 @@
 bl_info = {
     "name": "FBX format",
     "author": "Campbell Barton, Bastien Montagne, Jens Restemeier",
-    "version": (4, 37, 0),
+    "version": (4, 37, 1),
     "blender": (3, 4, 0),
     "location": "File > Import-Export",
     "description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions",
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index a4a96bf54..b4b596be4 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -2842,6 +2842,7 @@ def fbx_header_elements(root, scene_data, time=None):
         if similar_values(fps, ref_fps):
             fbx_fps = ref_fps
             fbx_fps_mode = fps_mode
+            break
     elem_props_set(props, "p_enum", b"TimeMode", fbx_fps_mode)
     elem_props_set(props, "p_timestamp", b"TimeSpanStart", 0)
     elem_props_set(props, "p_timestamp", b"TimeSpanStop", FBX_KTIME)
-- 
GitLab