Very american-socratic today, giving my self some of my own answers…
-
bpy.ops.object.armature_add(view_align=False, enter_editmode=False, location=(0, 0, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.editmode_toggle()
bpy.ops.object.armature_human_metarig_add()
-
bpy.ops.transform.resize(value=(91, 91, 91), constraint_axis=(False, False, False), constraint_orientation=‘GLOBAL’, mirror=False, proportional=‘DISABLED’, proportional_edit_falloff=‘SMOOTH’, proportional_size=54.7637)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
I wish I had though of looking that up before - however I also wish the window was more extensive - it would allow to better understand how to work 3, 4 if I could see the commands being issues on the snap_selected for instance without having to go and look up the function…
In case someone wants the same result but is getting errors and what not, this works on .79
import bpy
import mathutils
from mathutils import Vector,Quaternion
import math
bpy.ops.object.armature_add(view_align=False, enter_editmode=False, location=(0, 0, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.armature_human_metarig_add()
bpy.ops.transform.resize(value=(91, 91, 91), constraint_axis=(False, False, False), constraint_orientation="GLOBAL", mirror=False, proportional="DISABLED", proportional_edit_falloff="SMOOTH", proportional_size=54.7637)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
Going a little further I figured out that translation is additive - and that’s probably why it doesn’t work for me. It takes the current position into account when moving things.
I had to resort to head/tail math with ± length on the axis I’m interested.
Can’t believe there isn’t an easier way to just offset a bone by its center point though…