Hey everyone,
I’m having an issue with what seems like a fairly basic issue but is screwing up my project progress immensely and I’m at wits end. The issue is part of a MEL script I’m creating in connection to a project where I am both trying to advance my rigging knowledge and learn more about MEL. As such I’m still beginner at MEL so bear with me.
Basically I’ve created a script that I’m storing as a shelf button to generate a procedural ribbon deformer from a tutorial I’ve been watching. Each time I press the shelf button I get a window which lets me name and specify the size (number of joints) in the deformer. I’ve gotten the the script to work the first time it is run and it creates the ribbon deformer … but every new one that gets created (that isn’t duplicated) gets stopped at the nonlinear deformer creation step because it’s looking for “twist1Handle” and regardless of whether I rename the original deformer maya always creates a “twist2Handle” or what ever other type of deformer. I want to get around this issue by naming each nonlinear deformer as it is created by using the name flag (-n) as emplified here…
nonLinear -type twist -n ($name + "_twistHandle") -lowBound -1 -highBound 1 -startAngle 0 -endAngle 0 ;
… but for some reason it doesn’t change the name of the deformer. I use the variable $name to specify user input and give a unique name to everything in the script but even if I try to name it something like “ribbon_twistHandle” without parenthesis I have the same problem. I’ve done all sorts of google searches on the issue but haven’t been able to find anything to help me in my plight. Can anyone help give me insight to what I’m doing wrong?