STRETCHY JOINTS SCRIPT

Nice to have some success this week after an underwhelming result last week! This was a homework assignment to try and replicate a rig in a provided maya file with a script. This rig was a stretchy arm rig (or any 3 joint limb that can be IK). The way this was done was using a condition node to determine if the distance dimension node, which measures the distance from the wrist control to the shoulder, was greater than the length of the extended arm (I believe I misspoke about this part in the recording.

This project was a huge learning experience. I got unfathomably frustrated trying to use chatGPT as a tool to create and connect the condition and multiply/divide nodes for me. However, I eventually came to terms with the fact that there was too many idiosyncrasies to include in a chatGPT prompt.

So, I adopted a new strategy of just looking at the connections in the manual maya file and just translating them over one by one. Essentially, this just ended up being a bunch of cmds.connectAttr and cmds.setAttr. It was a bit tedious but way easier to understand and in the end way more successful than trying to take a short cut and get chatGPT to spit out something even close to correct.

From now on, I think I’ve learned that I can script something pretty quickly as long as I set it up manually first and just look at what the connections are very objectively. I think I didn’t deepen my understanding of how the original rig worked enough before I jumped into scripting for this project. However, I am still super happy that it worked out in the end!