If you've rigged something from the Dota2 files, you've undoubtedly come across this spawn of Satan. If you don't know what I mean, here's the skinny (
from here):
The problem:
When painting skinweights in maya you sometimes get a big red X and you cant select influences nor paint them. Additionally you get an error that looks something like this
// Error: file: C:/Program Files/Autodesk/Maya2012/scripts/others/skinClusterInflMenu.mel line 568: No object matches name: Hips.liw //
Why is this happening?
Maya has an internal attribute called "liw" that indicates if influences are locked or not. When exporting the mesh it is exporting this attribute as a custom attribute but on import it doesnt recognize it as its own and trys to create it again. But because the name is already taken it will just give you an error.
From my experience most of the meshes in the Maya files that we get from Valve have this. Some people suggest updating your .fbx plugin to stop this behavior but even after updating to 2013.3 and importing all the .fbx files from the zip into a clean scene, I'm still given meshes with 'lockedInfluenceWeights'. "This isn't that bad", I hear you say, "you don't have to edit the weights on those meshes". Ah, but the problem comes in when we try to copy weights from a default item to a custom one, which works perfectly fine but unfortunately the 'lockInfluenceWeights' attribute hitches a ride and makes editing those weights impossible.
RIOT, FIX PLEASE:
{
// selects hierarchy //
select -hi;
// select only the joints in the hierarchy //
$sel = `ls -sl -typ "joint"`;
select -r $sel;
// run once for each joint //
for($obj in $sel)
{
// check if attribute exists, coded this way for readability
$exists = `attributeExists "lockInfluenceWeights" $obj`;
if($exists == 1)
{
// delete attribute
deleteAttr -at "lockInfluenceWeights" $obj;
}
}
}
This goes through all the objects in the hierarchy of your selected objects, finds and deletes that pesky attributes, but alas, this only works very unreliably... at least for me.
So, how do you guys and gals deal with this ? not copy weights at all? Or is there some ritual or set of things I must do to get the script to work 100% of the time?! Ain't nothing more frustrating that being stuck on the last step of the process
Replies
Tried a whole bunch of methods but lately I've been doing this and it hasn't failed me yet:
First, instead import the .ma file instead of the .fbx's. Then go to File < Optimize Scene Size Options and there should be a Remove: Unknown Nodes option. Press optimize now next to it, save the scene.
Since I've started doing this I've had no rigging problems whatsoever. But I also do this before I start a project, not at the end. You might want to try doing this in a new scene and then import your model after.
Yep, 100% so far, did it with several heroes but not all.
But I just wanted to post that doing this: Can be done a little more simply by typing this: ...into the command line or dropping it on the shelf as a button.
Hope that helps!
The only way I've gotten it to work so far is to have Maya create a clean .../My Documents/maya/... then do what you suggested, mrpresident, and save it. Then I can switch back to my .../My Documents/maya/... with all my plugins etc and it works, even with the root joint still having the lockInfluenceWeight attribute... WTF?!
The exact same steps don't work if I have the .../My Documents/maya/... with my plugins... ayayay
P.S.: mrpresident, can you go into a scene that works for you and select all the meshes and the skeleton, go to Modify->Delete Attribute.. and tell me if you also have the lockInfluenceWeight still there?
If it works with a new maya settings folder, but not with your old one, there's probably a script or plugin that's screwing it up. I'd try removing them one by one temporarily until you figure out what's causing the issue.
Yep, that's the plan. Or keep a 'clean' version handy that I can switch to when I start up on a new hero. ^^
To be clear that code I posted should resolve the error you get when you first load one of Valve's Maya files that looks something like this:
This is caused by Valve using certain proprietary formats we are not privy to and not taking the time to remove them from their scenes before they publish them.
If you load up any of their scenes and type: You will probably see something like the highlighted text:
'ls -type unknown` lists out all of these unknown nodes, so by entering "delete `ls -type unknown`" you're simply skipping a step and saying, first list them out, then delete whatever you find.
If it's telling you nothing is selected, then you don't have any unknown nodes in your scene and they are not your problem. In fact, the unknown nodes shouldn't cause any problems other than the annoying warning from Maya whenever you load the scene, which is probably why Valve doesn't bother to remove them. I'm not sure if that clears anything up or makes it worse
As for your specific problem again Spudnik, I have never run into it personally. And I went through some of my scenes trying to find if anything had a '.liw' attribute and couldn't find anything.
But after googling that to try to find out some more about it, I found this on Autodesk's site.
http://area.autodesk.com/forum/autodesk-fbx/fbx-plug-ins-import-export-discussions/shortname-of-liw-being-lost-in-fbx-export/
It sounds like your issue? Have you downloaded the latest plugin?
File < New Scene
File < Import < Slark_model.ma
File < Optimize Scene Size Options < Unknown Nodes : Optimize Now Button < Close Window
File < Save Scene < slarktest.mb
From here I can paint weights/copy weights of anything default, or anything I add and smooth bind.
Here's the file with a random sphere that had its weights copied from the default bracer: https://dl.dropboxusercontent.com/u/2111872/slarktest.mb
If that file isn't working for you then something funky is going on.