Home Website Youtube GitHub

[Solved] mgear.core.skin.importSkin isn't working as expected

See last post for solution!

OP:
I recently got a computer upgrade and by doing so switched from mGear 4.0.9 to 4.2.1.

And now when I run my builds, all the skinning comes in badly. In my PostScript I run

skin.importSkin(SKIN_PATH)

My saved jSkin file has all the skinClusters set to be “normalizeWeights”: 1
Meaning NormalizeWeights should be set to Interactive.
But post build I see the skinClusters NormalizeWeights set to Post.

Edit: This happens in both Maya 2023 and 2024.
Both via postBuild script and Import Skin menu function.

Please advise!

Did you also upgrade Maya between this working and not working?

A super quick glance at the skin.py code and it looks like it simply sets the normalizeWeights to the value that it finds in your skin file. I guess there is a chance that the numerical value has changed in a recent version of Maya?

In Maya 2024, is the number for Interactive still 1?

Could you attach an example .jSkin file here so I could peek at your data?

I have 2 machines. Both have Maya 2023. Both run Windows 10 Enterprise.
The first Maya 2023 runs mGear 4.0.9. skin.py works as expected.
The second Maya 2023 running mGear 4.2.1 has the issue I listed above.

I looked at the skin.py and agree, it looks like it just sets what’s in the jskin file. And yes Interactive is in enum index 1 on both Maya 2023/24. I don’t think it’s the skin file. Something in my Maya settings or perhaps mGear 4.2 is getting in the way of the NormalizeWeights attribute setting.

Happy to share the jskin file. But I don’t see an attach button.

Btw Thanks for your time and service to this community, Chris!

I think you’d have to upload it somewhere and link it. (Github, or some file-sharing site.)

I’ll just DM my email.

Solved!
Matching my Rigging maya preferences between my 2 workstations fixed the issue.

Please lmk if you think these settings are incorrect!

Oh, that’s a similar screenshot than what you posted here: [SOLVED] Export skin error with mGear4.0.3 in Maya 2022 - #10 by alonza1

I wonder if skin.py should somehow account for these settings. I haven’t tested or understood what that older issue was yet.

Yeah, I remembered there was something with settings. The older thread was an actual error that would break the build. This time it built but just had a skinning issue.

Would be great to have mGear work out of the box.