Website Youtube GitHub

Chain Spring matrix nodes failling


Hi guys,

I’m having an strange error trying to build some chain_spring01 for the hair. I have a biped guide and I’m just adding a chain_spring01 to the fringe of my character, so I draw that component under the “neck_C0_head”. I build it and everything seems that is right. Then if save and I open the scene again, my rig is destroyed and the guide too. So I go to the script editor and I found this error:

// Error: setAttr “.omat” -type “matrix” 1 0 0 0 0 1 0 0 0 0 1 0 -nan(ind) -nan(ind) -nan(ind) 1; //
// Error: “/mypath/” line 51046.65: Invalid use of Maya object “ind”. //

*/mypath/ is the path of my file

And there is this two line for each joint of my spring_chain.
The reason because when I open my file the rig is destroyed is described here:

So, opening my file with a text editor and replacing the -nan(ind) with 0, it solves the problem, but as soon as I rebuilt the guide again, the problem appears.

So the problem seems to be how the mGear is building the composeMatrix nodes for each joint of the chain_spring01. At some point it have a calculation that ends in a -nan(not a number) - like you’ve performed an invalid operation on a float, for example the square root of a negative number, etc. And when you open the file again, Maya don’t know what to do and break the rig.

Did you have this problem before?



Hi Damian,
What OS? What version of Maya? What version of mGear? Do you have any other plugins loaded?

(I’ve seen the NaN problem a few times, but never in this particular case.)

I’m completely guessing that there might be something in your scene or model that needs to be cleaned up.

Where did the model come from? (ZBrush? FBX? OBJ?) What would happen if you were to export selected on just your geometry and the mGear guide and try in a cleaner scene and build again?


Hi Chris,

I just figured out the problem (it’s like when I post the problem here the solution comes to me hahaha).

I’ve already tested all the ways you are proposing without any success.
The solution is scroll the time slider.
I saw that no matters at which frame you are (at least in my scene), the composeMatrix nodes always have the nAn value in their attributes. As soon as so scroll the time slider that disappear. In my case I was testing some script after the guide, so I was playing with the rig and open and saving the scene without scrolling the time slider. After I did that, everything was saved properly.


lolwat! :smiley:

Good find. Strange strange Maya…


hi damian, just curious, in what animation mode did this happen (DG or patallel)? i have sometimes also sometimes problems, that my rigs evaluates different depending on the mode…


Hi @soulcage,

parallel :slight_smile: