0
$\begingroup$

I'm attempting to write a script that helps automate rig creation for a specific type of armature, and the current minor issue I'm having is that I would like to create a pole target with as minimal angle variance as possible (something neat like 0deg or 90deg).

I've figured out the way I have to do it is to duplicate the upper part of my IK chain and move it along either the local X or local Z axis to keep the pole in line and prevent bizarre PoleAngle numbers. How would I go about doing this in Python?

$\endgroup$

1 Answer 1

0
$\begingroup$

Nevermind, For those looking for something similar, the simplest way I found to do it was using bpy.ops.transform.translate()

bpy.ops.armature.select_all(action='DESELECT')
boneVariable.select = True
boneVariable.select_head = True
boneVariable.select_tail = True
bpy.ops.transform.translate(value=(0.0,0.0,20.0),orient_type='NORMAL')

I think this solution only works if I move each bone one at a time, but it is sufficient enough for what I was trying to do

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .