Im building a procedural rig in Maya and Ive got a small problem with pivots. I managed to solve it, but it just seems like a really difficult way, so Im just checking if there is an easier way.
So here goes:
I have a node that I want to be snapped to my wrist and then I want its pivot to be snapped to the elbow. The problem is that the translate co-ordinates for the elbow joint are based on their creation, so they are like 0 0 15, but in world space they are actually like 30 12 6. This has to be done via a script, so I cant just go into pivot mode and snap to the elbow. I need to actually assign the position of the elbow to the rotatePivot values of the node. When I point constraint my node to the wrist, the rotatePivot values are still 0 0 0, so now if I want to get it to the elbow, I dont have anyway of doing this. Thats basically my problem.
Here is how I solved it:
I create a locator and snap that to the wrist where my node is. I then freeze transformation on the locator so its position is 0 0 0 at the wrist. This is the same as the nodes rotatePivot. I then point constraint the locator to the elbow and get its co-ordinates. I then assign those to the rotatePivot of my node. Thats it, now my object stays in the same place and its pivot is by the elbow. I then delete the locator and any null constraints.
My solution works, but my question is whether or not its the easiest method. So please if anyone does have an easier method please share it with me. Keep in mind that this is a procedural script and I will need to adjust the position of the elbow depending on the model, so it will never have a constant position before I apply the rig.