Missing shape keys in FBX export when using Triangulate Faces #104714
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#104714
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.41
Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-06-19 17:26, hash:
cedec09d0594
Worked:
Addon Information
Name: FBX format (5, 3, 4)
Author: Campbell Barton, Bastien Montagne, Jens Restemeier, @Mysteryem
Short description of error
Enabling the Triangulate Faces option of the FBX exporter causes the shape keys of meshes to be missing in the export.
This is because the FBX exporter uses
bpy.data.meshes.new_from_object()
to create temporary copies of meshes when exporting to avoid modifying existing meshes when triangulating, butbpy.data.meshes.new_from_object()
removes shape keys even when the mesh Object is not evaluated (issue tracked at blender/blender#109313).This issue also affects exporting mesh Objects with Materials linked to the Object and can affect exporting meshes when Export Subdivision Surface is enabled in the exporter (anything that can set
use_org_data
toFalse
infbx_data_from_scene
inexport_fbx_bin.py
when the Apply Modifiers option of the exporter is disabled or when the mesh Object has no applicable modifiers)Exact steps for others to reproduce the error
For non-evaluated meshes,
Object.to_mesh()
would probably work as a replacement. This creates temporary meshes that do not get added tobpy.data.meshes
and are owned by the Object they were created from. These temporary meshes can be forcefully freed at the end of the FBX export withObject.to_mesh_clear()
. ThoughMesh.copy()
might work just as well.Thanks for the report. I can confirm.
Looks like there is no quick solution after reading blender/blender#109313
Mesh.copy() might be a workaround then?
Thanks for making this update, I was just testing in 4.0 and it works as advertised however it breaks any custom normals, say you use weightednormals, if you use the triangulate modifier last in the stack you would typically also select Keep Normals to prevent this happening however this prevents the shape keys from being preserved with the current solution.
Perhaps a better approach is remove the triangulate option from the fbx exporter and replace that with a preserve shape keys option and that is what triggers making a copy of the mesh etc. instead of just exporting it. At the moment I use a script to create a copy applying all the modifiers then copy shape keys etc. then export that with no modifiers.
If this occurs even when exporting meshes without shape keys or in versions of Blender older than 4.0, please report a bug.