From ed42feaed565f5d21f10b05eee1f985a14f3cf11 Mon Sep 17 00:00:00 2001
From: Richard Brenick <rBrenick>
Date: Mon, 10 Jan 2022 16:29:44 +0100
Subject: [PATCH] FBX Export: add .blend file path to the FBX header.

It's handy being able to track where fbx files originate from.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D13788
---
 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 9ae3cee8b..3837be6a9 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -21,7 +21,7 @@
 bl_info = {
     "name": "FBX format",
     "author": "Campbell Barton, Bastien Montagne, Jens Restemeier",
-    "version": (4, 28, 0),
+    "version": (4, 29, 0),
     "blender": (2, 90, 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 af8e77afc..6e7e960b3 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -2769,6 +2769,7 @@ def fbx_header_elements(root, scene_data, time=None):
     lastsaved("p_string", b"ApplicationName", app_name)
     lastsaved("p_string", b"ApplicationVersion", app_ver)
     lastsaved("p_datetime", b"DateTime_GMT", "01/01/1970 00:00:00.000")
+    original("p_string", b"ApplicationNativeFile", bpy.data.filepath)
 
     # ##### End of FBXHeaderExtension element.
 
-- 
GitLab