Home Website Youtube GitHub

Referenced skeleton doesn't load weights correctly

Hello everyone, first post here,

I’ve set up my mgear rig and skinned a mesh to it. I’ve exported the weights as jSkin and have no issues importing.

However, for pipeline reasons that aren’t important, I need to reference in the rig (just the rig, no mesh), and then later import the mesh (not reference) and then load in the weights to attach it to the rig. To test this process, I modified my jSkin file to include the reference name in front of the joints. I referenced in my rig, imported my mesh, then tried to import this modified jSkin file. No errors, but the weights don’t quite get applied correctly. I’ve compared the original jskin file to the modified one using python and they’re identical other than the key names of the joints.

I’ve attached an image to show the comparison.

Anyone know what might be causing this? Is this a bug?

Thanks

The skinCluster is being created, but weights aren’t being set. You’re seeing default weights. Are you getting errors in the script editor output?

I appreciate the reply!

Default weights look much worse that the result I’m getting here (unless there’s some extra default skinning steps that mgear applies). I’ve spotted the issue in the mgear.core.skin module though. The namespace is automatically removed from the influence in the data

nnspace = pm.PyNode(influenceName).stripNamespace() is one of the lines in the setInfluenceWeights function

I’ve removed the stripNamespace() method in my local skin.py and now it works exactly as I would expect. I just hope this doesn’t create any unforeseen consequences.

2 Likes