Fails to export shape key in GlTF with apply modifiers #69622

Closed
opened 2019-09-07 19:47:03 +02:00 by Ethan Chandler · 5 comments

System Information
Operating system: Windows 10 Home
Graphics card: "Intel HD Graphics 630 and "NVIDIA GeForce GTX 1060"

Blender Version
Broken: v2.81 Alpha Date 2019-09-07 16:22 Hash-abeab4fcad66
Worked: N/A

Short description of error

When exporting with the glTF 2 exporter and select "Apply Modifiers" as well as "Shape Keys", the shape keys are applied and not exported.

Why this is a bug

Shape keys should not be applied if the user has selected "Shape keys" to export, they should be exported even if "Apply Modifiers" was selected. This is because if the user has selected "Shape Keys" under export then they specifically want their shape keys exported.

Exact steps for others to reproduce the error

1. Open the SuzanneShapeKey.blend file attached.  (It was created by following the first 2 minutes and 6 seconds of this tutorial  https://www.youtube.com/watch?v=e675Ulc7QL4)
2. Select "File/Export/GLTF 2.0"
3. Select "Apply Modifiers" under the general tab
4. Select format "GLTF Binary" under the general tab  (It should be the same for other formats)
5. Select "Shape Keys" under the animation tab
6. Click "Export GLTF 2.0"

The shape keys were not exported. You can verify this in an external tool such as the Godot engine but also by following these steps in Blender:

1. File/New/General
2. File/Import/GLTF and then select the GLTF file you had previously exported
3. Select Suzan under collections
4. Select the Context. Object Data Tab
5. You can see there are no shape keys

SuzanneShapeKey.blend

(ps. I did not mention any other bug reports in above text, I'm not sure why it's saying that I did)

**System Information** Operating system: Windows 10 Home Graphics card: "Intel HD Graphics 630 and "NVIDIA GeForce GTX 1060" **Blender Version** Broken: v2.81 Alpha Date 2019-09-07 16:22 Hash-abeab4fcad66 Worked: N/A **Short description of error** When exporting with the glTF 2 exporter and select "*Apply Modifiers*" as well as "*Shape Keys*", the shape keys are applied and not exported. **Why this is a bug** Shape keys should not be applied if the user has selected "*Shape keys*" to export, they should be exported even if "*Apply Modifiers*" was selected. This is because if the user has selected "*Shape Keys*" under export then they specifically want their *shape keys* exported. **Exact steps for others to reproduce the error** 1. Open the SuzanneShapeKey.blend file attached. (It was created by following the first 2 minutes and 6 seconds of this tutorial https://www.youtube.com/watch?v=e675Ulc7QL4) 2. Select "File/Export/GLTF 2.0" 3. Select "Apply Modifiers" under the general tab 4. Select format "GLTF Binary" under the general tab (It should be the same for other formats) 5. Select "Shape Keys" under the animation tab 6. Click "Export GLTF 2.0" # The shape keys were not exported. You can verify this in an external tool such as the Godot engine but also by following these steps in Blender: 1. File/New/General 2. File/Import/GLTF and then select the GLTF file you had previously exported 3. Select Suzan under collections 4. Select the Context. Object Data Tab 5. You can see there are no shape keys [SuzanneShapeKey.blend](https://archive.blender.org/developer/F7721966/SuzanneShapeKey.blend) (ps. I did not mention any other bug reports in above text, I'm not sure why it's saying that I did)
Author

Added subscriber: @Ortus

Added subscriber: @Ortus
Julien Duroure self-assigned this 2019-09-07 23:15:02 +02:00
Member

Hello,

Seems to be a limitation of Blender. Same way you can't apply a modifier when there are some shapekeys, you can't export it this way.
(Note: this is also the behaviour of fbx export).

Hello, Seems to be a limitation of Blender. Same way you can't apply a modifier when there are some shapekeys, you can't export it this way. (Note: this is also the behaviour of fbx export).
Author

Oh ok... I did some more research and found out that some people use scripts like these (below) to get around this limitation.

https://github.com/naelstrof/ApplyModifierForObjectWithShapeKeys
https://github.com/Menithal/ApplyModifierForObjectWithShapeKeys
https://github.com/iszotic/ApplyModifierForObjectWithShapeKeys

Maybe useful. I believe it creates separate objects for each shape key, applies the modifiers to each of them, then combines the them all as shape keys into one object. I don't know if something like that could be be added into the export code to fix this problem? or if it counts as a feature request and not a bug?

Sorry I'm still kind-of new to Blender and this is my first bug report.

Oh ok... I did some more research and found out that some people use scripts like these (below) to get around this limitation. https://github.com/naelstrof/ApplyModifierForObjectWithShapeKeys https://github.com/Menithal/ApplyModifierForObjectWithShapeKeys https://github.com/iszotic/ApplyModifierForObjectWithShapeKeys Maybe useful. I believe it creates separate objects for each shape key, applies the modifiers to each of them, then combines the them all as shape keys into one object. I don't know if something like that could be be added into the export code to fix this problem? or if it counts as a feature request and not a bug? Sorry I'm still kind-of new to Blender and this is my first bug report.
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Member

Hello,
Probably more a feature request than a bug, because this is the global behaviour of blender to work like that. Closing this, not really linked to glTF specifically.
This needs to be discussed with other developers if some workaround are possible or not.

Thanks !

Hello, Probably more a feature request than a bug, because this is the global behaviour of blender to work like that. Closing this, not really linked to glTF specifically. This needs to be discussed with other developers if some workaround are possible or not. Thanks !
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
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
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#69622
No description provided.