Home Website Youtube GitHub

Unable to export skin pack, python error

I’d file this as a bug but I’m really new to mGear (and Maya) so there’s a good chance this is a user error.

I’ve been setting up my rig and following the Data Centric Rigging workshop videos. I’m trying to replicate the steps in https://www.youtube.com/watch?v=gz2zCcqgJdo (“Enviroment and first custom step”)and extract my skin pack.

When I select my geometries and select mGear → Skin and weights → Export skin pack (ASCII/Binary won’t make a difference), I get:

Error: RuntimeError: file C:\blaablaa\scripts\mgear\core\skin.py line 73: (kFailure): Unexpected Internal Failure #

Line 73 in the script is fnSet = OpenMaya.MFnSet(skinCls.__apimfn__().deformerSet()). I could probably debug this a bit further myself but I feel like I’d have to maybe dive into some Maya internals which is a Pandora’s box I don’t quite want to open yet. :slight_smile:

I also tried extracting a single geometry but the result is the same. I removed the ngSkinTools node from the geo, it only has the skin cluster listed in the inputs (envelope 1, skinning method classic linear, use components off, normalize weights interactive and deform user normals on).

I’m running Maya 2022 in “python 2” mode.

Happy to provide any other information needed. Loving mGear so far. :slight_smile:

Hello @pasi
Try this:
Check if you are using “new fashion” sets in skin cluster. In Preferences → Animation → Rigging section. Disable components tag and enable tweak nodes. Then recreate your skin.

1 Like

Hey.

I did have those settings on but turning off “Use component tags for deformation component subsets” and turning on “Add tweak nodes on deformer creation” didn’t seem to help, still getting the same error.

Did you recreate your skin cluster with new preferences?

I’m pretty sure skin.py is currently broken in Maya 2022 + mGear 3.7. I don’t have Windows, so I haven’t been able to test why yet.

If you are new to mGear and Maya, perhaps you could consider sticking with Maya 2020 if possible for your production. Using the cutting edge of Maya can be pretty risky in terms of bugs. (I’m still using mGear 3.6 and Maya 2018 in production, most of the time. When I upgrade, it will be to Maya 2020 first.)

@iRex did you actually use the mGear skin commands in Maya 2022 successfully yet?

@chrislesage
Yes it exports skin if skinCluster use grupPart/Sets /groupID nodes. The problem is when those nodes does not exist and skin starts querying sets data.

1 Like

This is Maya 2022 Python 2. Component tags disabled.

1 Like

In Maya 2020 (where the character actually looks kinda funky… but I might be able to salvage this if I get the re-build working), I actually get a slightly more helpful error message (but still no skin pack exported):

Warning: leotard_geo: Skipped because don't have Skin Cluster
Warning: leotard_geo: Skipped because don't have Skin Cluster
Warning: Any of the selected objects have Skin Cluster. Skin Pack export aborted.

The skin cluster shows under the inputs though. Of course it’s hard to say if it’s just not playing ball right now because I opened a 2022 file in 2020.

I actually suspect the error above is more about opening a Maya 2022 file in 2020 than anything mGear related. getSkinCluster returns None for the geometries in that file (specifically, skC.getGeometry()[0] == shape never matches anything). In 2022 getSkinCluster seems to find the skin cluster.

The line where the internal error comes from is actually __apimfn__().deformerSet() so I suspect @iRex is right about this being related to Maya 2022 tags.

Re-creating the skin cluster seems to do the trick, the skin pack was successfully exported in Maya 2022. I’ll just have to do the “export weights” / “import weights” dance for the clusters.

Recreating the clusters worked. I do have to redo a liiittle bit of skinning but nothing too crazy. Once I recreated the clusters, I got the export working and the rebuild with the imports done. Thanks for all the help. :slight_smile:

2 Likes

Here I wrote script that handles component tags and saves expression in json beside the weights. It’s little different than mGear’s skin.py. It does not use sets at all.

Hello!
I am back from the holiday. I will check this ASAP
I have log it here

1 Like

Hello,
I have been working today to find a solution without rewriting the complete module. But looks like is more difficult than I expected :sweat:

@iRex I have been checking your module. Indeed very useful as a reference. I may have to do the same and jump to API 2.0

Any ideas/help on this is welcome :slight_smile:

EDIT: related thread SkinPack mesh not found

1 Like

Hi @Miquel! I’m glad that you find it useful. I wish I could help but right now I’m quite busy working.
The script needs some improvements and todos. If you find it useful you can use it as you wish.

1 Like

I think the issue is fixed. :smiley:
I will need more testing to ensure is working 100%. If someone has the chance to test it please let me know if you find any bug. Thanks

2 Likes

A post was split to a new topic: Skin export error