[Error] Maya Rigging tools

I get up to the skin weight stage finish weighting and then when i press build control rig it takes the snapshot then errors with:

Error: RuntimeError: file C:/Program Files/Rocket/Engine/Extras/Maya_AnimationRiggingTools/MayaTools/General/Scripts\GEAR_skeletonBuilder_UI.py line 13181: File contains unknown nodes or data. To preserve this information, the current file type cannot be changed.

Error: WindowsError: file C:/Program Files/Rocket/Engine/Extras/Maya_AnimationRiggingTools/MayaTools/General/Scripts\customMayaMenu.py line 169: 3

Error: UnboundLocalError: file C:/Program Files/Rocket/Engine/Extras/Maya_AnimationRiggingTools/MayaTools/General/Scripts\GEAR_skeletonBuilder_UI.py line 13655: local variable ‘proj’ referenced before assignment

and doesn’t create the character files

I thought that I may have forgotten to clear history or something so I’ve repeated it twice and it still bugs out… any pointer?

Hey there!

First off, thanks for checking out the tools! Sorry to hear you’ve hit a snag.
It looks like there are 2 separate issues. The first being the unknown nodes. This can be due to importing a mesh (fbx, obj, or some other type of file) that has nodes associated with it that Maya doesn’t like. If you use the tools in a new scene, without importing a mesh to work with, do you still get that error? If not, then something about that mesh has some nodes that need to be cleaned. To do so, you could open the mesh in a new file, and run an optimize scene size on the file, removing any unknown nodes.

The second issue is an issue with the code. From the looks of it, you went to publish and hit add new project, but then hit cancel, correct? This would cause that variable referenced before assignment issue. I’ve updated the code and you can grab the latest file here: [1]: https://dl.dropboxusercontent.com/u/10939513/GEAR_skeletonBuilder_UI.py

Just overwrite the one located here and you should be good!
Rocket/Engine/Extras/Maya_AnimationRiggingTools/MayaTools/General/Scripts

I hope that helps! Let me know how it goes :slight_smile:

Hey first up thanks for giving us something to simplify and standardize such a complex process.

I’ve tried your new code from scratch and I’ve deleted anything I might have in the scene other then the rigging stuff, though im getting two new errors now:

1 when I go to build control rig it gets to the same point but instead of maya errors a popup appears and says:

Could not save file. File may exist already and be marked as read only. Aborting operation.

Ive tried this with multiple diffrent names and projects and just always throws that error.

2 is a maya error dont know if its just because of the other one but:

Error: TypeError: file C:/Program Files/Rocket/Engine/Extras/Maya_AnimationRiggingTools/MayaTools/General/Scripts\GEAR_skeletonBuilder_UI.py line 7110: cannot concatenate ‘str’ and ‘NoneType’ objects

also after copying over the code file the buttons for build skeleton etc. other than build control rig have become grey boxes.

I’ve taken a look at the code and found the area that gives you the popup message. It tries to save the file, and if it fails, it gives that message. I’m wondering if the reason it is failing still has something to do with the unknown nodes issue. You could try (save a backup!) to run an optimize scene size on the file before building the rig and see if that helps.

The 2nd error looks to be when you hit “Build Control Rig”, it brings up a UI for you to select a project (or create a new one) and the choice to overwrite an existing character in a project. My guess is there is no project, so it returns None. I’ve updated the code to catch that :slight_smile:

Do you see that message before the first one, or after? I would think it should come first.
Which version of Maya are you using?

Latest Code Here

I’ve updated the code again with some of those fixes. I’ve also put in the filename it is trying to save in that popup message to hopefully bring some clarity to what is going on. I think it fails when it tries to save due to an invalid path. Let me know that path it spits out in that message(if you see it again!)

Thanks!

Im using Maya 2014 x64

The latest code gives me a error when hitting “Create Character(rigging)” from the menu:

Error: SyntaxError: file C:/Program Files/Rocket/Engine/Extras/Maya_AnimationRiggingTools/MayaTools/General/Scripts\customMayaMenu.py line 245: invalid syntax

thats the line it imports GEAR_skeletonBuilder_UI.py from the look of it

Im not usure the order of the errors I can check that with the older code

actually i might have just copied something wrong im gonna repair my install and see if that fixes that bug as copying the older code back over didnt

yup tried wiping the tools from the rocket folder repairing them back in an re-installing them in maya but but still just throws that error

Sorry about that. Last time, I swear :slight_smile: I was in the middle of working on something else and wasn’t able to test the Rocket branch code. I went ahead and updated everything and did a test run, all seems well!

Updated Code

Thank you for your patience! I appreciate it!

The updated code fixed the problem with not being able to open it at all but its still wont save to file. There are no Maya errors thrown it just put up a pop up that says:

Publish

Could not save file: C:/Program Files/Rocket/Engine/Extras/Maya_AnimationRiggingTools/MayaTools/General/GEAR/Projects/TestProject/ExportFiles/Test2_Export.mb not a valid file.
File may exist already and be marked as read only. Aborting operation.

Ive tried multiple different file and project names all throw the same error. I checked the folders and it creates them but it doesn’t make anything else

Sorry for all the trouble hope I’m not keeping you from anything important.

Hmm. Can you try saving the file through Maya’s file menu manually, and report any errors that come from it? That way the tool isn’t involved at all and we can see if there is just something Maya doesn’t like about the file.

Thanks!

Saved fine maya did crash after saving when i tied to minimize it but im guessing thats just maya. Is it suppose to be saving .ma or .mb?

Ok im not 100% sure that this is it but my scenes were saved as .ma I re-saved them as .mb and now it seems to work ill do a proper rig and let you know if you want but its worked on just a quick one.

Thanks for all your help :slight_smile:

yay! I was just about to start looking through the code to see what could possibly be happening. That section it keeps failing on literally just tries to save the file:

#try to save the file
	try:
	    cmds.file(save = True, type = "mayaBinary", force = True, prompt = False)
	    
	except:
	    if sourceControl == False:
		cmds.confirmDialog(title = "Publish", icon = "critical", message = "Could not save file: " + str(exportPath + characterName) + "_Export.mb not a valid file.\n File may exist already and be marked as read only. Aborting operation.")
		return

Let me know how it goes!

Hey so I’ve been playing around rigging up a character and the tools work great there are a few little things and bugs that I should mention:

  1. The last portrait I save will overwrite itself on all the other portraits (not sure if this is because the first characters in the name are the same even though the strings aren’t the same size)
  2. The buttons to switch between rigging pose and model pose are awfully close to the build skeleton button and if accidentally pressed there is no way to abort going back and you will lose all your weighting

Other then that have a happy holidays!!!

Thanks,
Aidan

I’ve just attempted to export my first animation using the rig and other then a complex animation compaint from the fbx exporter it worked fine but when i went to import it into the engine it fails with:

Failed to import ‘D:/Current Work/TheTower/RawAssets/assets/CHAR_Player_Default/Finals/Animations/Idle.fbx’. Failed to create asset ‘/Game/TheTower/Characters/Hugo/Animations/Idle’

I’m going to make a nother post just incase this is engine side not the tools itself

Ok I went back into Maya, loaded up the character and animation, selected the root joint then manually exported the animation as an fbx and it seemed to import and works fine. I have a sneaking suspicion this is a problem I’ve had before when an fbx file exported from a Maya doc has groups in it, the engine just doesn’t seem to like those… but got the animation working anyhow.

Did you use the export motion tool in the animation UI ? It will create a clean skeleton for you with your animation baked and only export those clean joints (no meshes, rig components, constraints, etc).

I’ve fixed the first issue in the most recent build. Look for that in the next Rocket update!
Good point on the 2nd item. I’ll just have a confirm in there.

Thanks!