[Bf-extensions-cvs] [ed2c6445] blender2.8: Fix FBX export with deforming armature.
Bastien Montagne
noreply at git.blender.org
Tue Dec 11 11:58:22 CET 2018
Commit: ed2c64455a78bcc43a0fefbb6cd3a3e0220c5168
Author: Bastien Montagne
Date: Tue Dec 11 11:55:55 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBAed2c64455a78bcc43a0fefbb6cd3a3e0220c5168
Fix FBX export with deforming armature.
Indirectly reported in T59162. We do not have access to render depsgraph
currently, so we need to work on `show_viewport` option of modifiers we
want to hide when generating temp export mesh, instead of `show_render`
one...
===================================================================
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 1f3112b5..d415305d 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, 13, 0),
+ "version": (4, 13, 1),
"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 4defc7c7..1f95eace 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -2184,10 +2184,12 @@ def fbx_data_from_scene(scene, depsgraph, settings):
# No need to create a new mesh in this case, if no modifier is active!
for mod in ob.modifiers:
# For meshes, when armature export is enabled, disable Armature modifiers here!
+ # XXX Temp hacks here since currently we only have access to a viewport depsgraph...
if mod.type == 'ARMATURE' and 'ARMATURE' in settings.object_types:
- tmp_mods.append((mod, mod.show_render))
+ tmp_mods.append((mod, mod.show_render, mod.show_viewport))
mod.show_render = False
- if mod.show_render:
+ mod.show_viewport = False
+ if mod.show_render or mod.show_viewport:
use_org_data = False
if not use_org_data:
tmp_me = ob.to_mesh(
@@ -2195,8 +2197,9 @@ def fbx_data_from_scene(scene, depsgraph, settings):
apply_modifiers=settings.use_mesh_modifiers)
data_meshes[ob_obj] = (get_blenderID_key(tmp_me), tmp_me, True)
# Re-enable temporary disabled modifiers.
- for mod, show_render in tmp_mods:
+ for mod, show_render, show_viewport in tmp_mods:
mod.show_render = show_render
+ mod.show_viewport = show_viewport
if use_org_data:
data_meshes[ob_obj] = (get_blenderID_key(ob.data), ob.data, False)
More information about the Bf-extensions-cvs
mailing list