I am currently working on a script to make a simple crane-like rig.
I have a variable to define the amount of joints I want. I also have a variable for the amount of groups/controllers I want. These amounts may vary so the script would be semi-"dynamic".
So what I end up with is a couple of joints (joint1, joint2, joint3, ... etc) and a couple of groups (group1, group2, group3, ... etc).
My problem is that I do not know how I would go about parenting my "group1" to "joint1" and "group2" with "joint2" etc. all in one go. Since I want to be able to change the amounts of joints and groups I can't hardcode it.
Any help would be appreciated :)