1
$\begingroup$

I’m trying to change this 'Bend Rotation Axis' parameter using Python: Bone Tab > Rigify Type > Bend Rotation Axis. Unfortunately, the output of the Info window isn’t shedding much light on this:

enter image description here

I have tried this:

 bpy.data.objects['metarig'].pose.bones['thumb.01.L'].primary_rotation_axis = 'X'

... but I’m getting the following error:

AttributeError: 'PoseBone' object has no attribute 'primary_rotation_axis'

When I hover over the Bend rotation axis dropdown, I get the following tooltip:

enter image description here

Q: How do I access the Rigify parameters class and assign my values?

$\endgroup$
1
$\begingroup$

Figured it out:

 bpy.data.objects['metarig'].pose.bones['thumb.01.L'].rigify_parameters.roll_alignment = 'manual'
 bpy.data.objects['metarig'].pose.bones['thumb.01.L'].rigify_parameters.copy_rotation_axes = [True, False, False]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.