# Cannot export mesh to .glb with both morph targets and skinning in Maya 2022

**URL:** <https://forum.babylonjs.com/t/cannot-export-mesh-to-glb-with-both-morph-targets-and-skinning-in-maya-2022/28309>\
**Category:** Bugs\
**Created:** [March 10, 2022, 3:38pm UTC](https://forum.babylonjs.com/t/cannot-export-mesh-to-glb-with-both-morph-targets-and-skinning-in-maya-2022/28309 "2022-03-10T15:38:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wazwer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wazwer/32/22753_2.png) [@wazwer](https://forum.babylonjs.com/u/wazwer)\
**Post date:** [March 10, 2022, 3:38pm UTC](https://forum.babylonjs.com/t/cannot-export-mesh-to-glb-with-both-morph-targets-and-skinning-in-maya-2022/28309/1 "2022-03-10T15:38:17Z")

</div>

Hello newbie here, apologies if I am missing something obvious!  
I recently upgraded to Maya 2022 and I am using version v20220210.4 of the Maya 2022 exporter plugin.  
I am trying to export a default cube as a .glb with both morph targets and skinning, which worked in 2020.  
In 2022 I can export a cube which has only morph targets, however when I then bind the cube to a skeleton the morph targets are ignored by the plugin (log lists there as being “no morph targets” on export, even though they do exist).  
Any help would be much appreciated.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [March 10, 2022, 5:18pm UTC](https://forum.babylonjs.com/t/cannot-export-mesh-to-glb-with-both-morph-targets-and-skinning-in-maya-2022/28309/2 "2022-03-10T17:18:01Z")

</div>

cc @Guillaume_Pelletier

---

<div class="post-metadata">

**Author:** ![Guillaume\_Pelletier](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/guillaume_pelletier/32/3695_2.png) [@Guillaume\_Pelletier](https://forum.babylonjs.com/u/Guillaume_Pelletier)\
**Post date:** [March 11, 2022, 8:59am UTC](https://forum.babylonjs.com/t/cannot-export-mesh-to-glb-with-both-morph-targets-and-skinning-in-maya-2022/28309/3 "2022-03-11T08:59:06Z")

</div>

Hello, seems we have a regression into 2022 with rebuilding the target at export time (when beeing deleted). I guess you deleted your blend target here. So keeping your target and exporting with “onlySelected” options may be a quick work arround.  
See also this [discussion](https://forum.babylonjs.com/t/blend-shape-and-ncloth/28248/4).  
If this not the case, please share your scene with us, it help to find the issue and improve 2022 support.

---

<div class="post-metadata">

**Author:** ![wazwer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wazwer/32/22753_2.png) [@wazwer](https://forum.babylonjs.com/u/wazwer)\
**Post date:** [March 11, 2022, 11:27am UTC](https://forum.babylonjs.com/t/cannot-export-mesh-to-glb-with-both-morph-targets-and-skinning-in-maya-2022/28309/4 "2022-03-11T11:27:39Z")

</div>

Thankyou for the quick response!  
I did not delete the blendshape target as it never existed as a separate mesh in the scene to begin with.  
This is because I created it through the Shape Editor window which allows you to create and sculpt new blendshapes on a mesh without creating duplicates.  
I did try generating the blendshapes through the Shapes \> Rebuild Target option, which generated the seperate blendshape meshes but did not fix the export problem.

I’m not sure this is the source of the issue though, as I was able to export the blendshapes created through the Shape Editor when the mesh was not skinned with no issues.  
I only started having problems exporting blendshapes when I bound the mesh to a skeleton.

Here are two pictures to illustrate:

- Working blendshapes (no skinning)

 ![WorkingTargets](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/1/6/16acadb50c64b2958ac97a6958f910b7eef9f40c.png)

- Broken blendshapes (mesh skinned to joints)

 ![BrokenTargets](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/d/fd82ec10e663efb37d1b63dfbe71d7356d68eb68.png)

And here are the two corresponding Maya 2022 scenes:

[CubeMorphTarget.zip](https://forum.babylonjs.com/uploads/short-url/x4rkUwrSIn3oQpGTkK1jhfGhMXq.zip) (18.7 KB)

---

<div class="post-metadata">

**Author:** ![Guillaume\_Pelletier](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/guillaume_pelletier/32/3695_2.png) [@Guillaume\_Pelletier](https://forum.babylonjs.com/u/Guillaume_Pelletier)\
**Post date:** [March 17, 2022, 3:41pm UTC](https://forum.babylonjs.com/t/cannot-export-mesh-to-glb-with-both-morph-targets-and-skinning-in-maya-2022/28309/5 "2022-03-17T15:41:29Z")

</div>

Found the issue, made a PR. Expect some days to be merged.  
Enjoy the ride.  
-G.

---

<div class="post-metadata">

**Author:** ![wazwer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wazwer/32/22753_2.png) [@wazwer](https://forum.babylonjs.com/u/wazwer)\
**Post date:** [March 21, 2022, 4:25pm UTC](https://forum.babylonjs.com/t/cannot-export-mesh-to-glb-with-both-morph-targets-and-skinning-in-maya-2022/28309/6 "2022-03-21T16:25:17Z")

</div>

Awesome! I just tested out release 20220319.2 and it seems to be working.  
Thank you so much for your help!
