Great work Vern, hope you can work out the problems you are having. I played with your example arm and it works very well, thanks for putting in the effort.
The script is pretty cool Vern!
It looks like a rubber arm!!
It could be even more cool if there were some way to maintain the maximum length of the aim bone inside a top limit...
It would include a limit into the target bone translation... Mmmm I have to understand fist your script and then we will discuss.
The problem I ran into is that if I limit the scale the whole thing "breaks". I think I have a solution for it though.
EDIT:
Actually I fixed that part. The other problem now is translating the forearm "aimer" bone. If it stops scaling when it reaches "1" it still moves the bone which pulls the bone away and that's no good either.
And the aimer bone still should move so the bone can rotate even when it isn't scaling. It needs some kind of translation limit... which might be tricky.
I think using constraints with the aimer bones is out of the question.
For instance:
I want to use a single "fan bone" at the elbow. It is a child of the bicep and has a 50% angle constraint to the forearm aimer bone.
If I adjust the bones of that arm rig so the whole arm is still straight but is rotated at an angle, the forearm aimer bone has a different rotation value from its original position. Dragging either the forearm parent of target alters the angle which is used in the constraint.
Technically it doesn't "appear" rotated because it is "straight" in alignment with the bicep, but in reality the angle is different so any constraint is effected. I get "extra" rotation of any constrained bones.
Normally a fan bone works because the target is a bone that is a child of the fan parent. This child bone target doesn't change rotation because it rotates with the parent. If the parent is at 45 degrees the child is 0 degrees.
In this rig the target of the constraint is not constrained to the same bone so it does rotate.
I don't see any possible way to alter this behavior. Constraints are built in to AS and it is working correctly. The best I could do would be to create my own "custom" fan bones for aimer bones in the code itself. Kind of a pain but not out of the question.
The problem I ran into is that if I limit the scale the whole thing "breaks". I think I have a solution for it though.
EDIT:
Actually I fixed that part. The other problem now is translating the forearm "aimer" bone. If it stops scaling when it reaches "1" it still moves the bone which pulls the bone away and that's no good either.
And the aimer bone still should move so the bone can rotate even when it isn't scaling. It needs some kind of translation limit... which might be tricky.
-vern
What about this?
Create a 3D skeleton using .pt bones and masterX. masterY and .mX .mY bones (using 3Dgrid and my auto3Drig script. THEN attach a .trg bone to every .pt bone and link them using .aim bones. Then the aim. bone would connect the joints of the limbs of the 3D skeleton and always would maintain theright combination of size and angle...