[Bf-extensions-cvs] [118a0f47] master: Fix T64994: 2.80 - Py API: Exporters: applied modifiers geometry looses most of orig custom data layers.

Bastien Montagne noreply at git.blender.org
Mon May 27 17:03:05 CEST 2019


Commit: 118a0f47293834c9e3f345c92e06ca2825d2fe3f
Author: Bastien Montagne
Date:   Mon May 27 17:02:21 2019 +0200
Branches: master
https://developer.blender.org/rBA118a0f47293834c9e3f345c92e06ca2825d2fe3f

Fix T64994: 2.80 - Py API: Exporters: applied modifiers geometry looses most of orig custom data layers.

Now we can get full-featured mesh with new system too.

===================================================================

M	io_scene_fbx/__init__.py
M	io_scene_fbx/export_fbx_bin.py

===================================================================

diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 7f22d141..818eae23 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, 14, 10),
+    "version": (4, 14, 11),
     "blender": (2, 80, 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 6f01ddf8..c8790ada 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -2230,7 +2230,8 @@ def fbx_data_from_scene(scene, depsgraph, settings):
                 # NOTE: The dependency graph might be re-evaluating multiple times, which could
                 # potentially free the mesh created early on. So we put those meshes to bmain and
                 # free them afterwards. Not ideal but ensures correct ownerwhip.
-                tmp_me = bpy.data.meshes.new_from_object(ob_to_convert)
+                tmp_me = bpy.data.meshes.new_from_object(
+                            ob_to_convert, preserve_all_data_layers=True, depsgraph=depsgraph)
                 data_meshes[ob_obj] = (get_blenderID_key(tmp_me), tmp_me, True)
             # Change armatures back.
             for armature, pose_position in backup_pose_positions:



More information about the Bf-extensions-cvs mailing list