import bpy

from mathutils import Color
1

def create(obj, srcBones):
    # generated by rigify.utils.write_metarig
    
    #arm = bpy.data.armatures.new("metaRig")
    #ob = bpy.data.objects.new("MetatRigObject", arm)  
    #scn = bpy.context.scene
    #scn.objects.link(ob)
    #scn.objects.active = ob
    #ob.select = True
    #bpy.ops.object.mode_set(mode='EDIT')
    
    #arm = bpy.data.armatures.new("testArm")
    #bpy.ops.object.mode_set(mode='EDIT')
    #arm = obj.data

    bpy.ops.object.mode_set(mode='EDIT')
    arm = obj.data

    for i in range(12):
        arm.rigify_colors.add()

    arm.rigify_colors[0].name = "Root"
    arm.rigify_colors[0].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[0].normal = Color((0.4352940022945404, 0.18431399762630463, 0.4156860113143921))
    arm.rigify_colors[0].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[0].standard_colors_lock = True
    arm.rigify_colors[1].name = "IK"
    arm.rigify_colors[1].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[1].normal = Color((0.6039220094680786, 0.0, 0.0))
    arm.rigify_colors[1].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[1].standard_colors_lock = True
    arm.rigify_colors[2].name = "Special"
    arm.rigify_colors[2].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[2].normal = Color((0.9568629860877991, 0.7882350087165833, 0.04705899953842163))
    arm.rigify_colors[2].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[2].standard_colors_lock = True
    arm.rigify_colors[3].name = "Tweak"
    arm.rigify_colors[3].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[3].normal = Color((0.03921600058674812, 0.21176500618457794, 0.5803920030593872))
    arm.rigify_colors[3].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[3].standard_colors_lock = True
    arm.rigify_colors[4].name = "FK"
    arm.rigify_colors[4].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[4].normal = Color((0.11764699965715408, 0.5686269998550415, 0.035294000059366226))
    arm.rigify_colors[4].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[4].standard_colors_lock = True
    arm.rigify_colors[5].name = "Extra"
    arm.rigify_colors[5].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[5].normal = Color((0.9686279892921448, 0.2509799897670746, 0.09411799907684326))
    arm.rigify_colors[5].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[5].standard_colors_lock = True
    arm.rigify_colors[6].name = " "
    arm.rigify_colors[6].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].standard_colors_lock = True
    arm.rigify_colors[7].name = " "
    arm.rigify_colors[7].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].standard_colors_lock = True
    arm.rigify_colors[8].name = " "
    arm.rigify_colors[8].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].standard_colors_lock = True
    arm.rigify_colors[9].name = " "
    arm.rigify_colors[9].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].standard_colors_lock = True
    arm.rigify_colors[10].name = " "
    arm.rigify_colors[10].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].standard_colors_lock = True
    arm.rigify_colors[11].name = " "
    arm.rigify_colors[11].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].standard_colors_lock = True

    for i in range(58):
        arm.rigify_layers.add()

    arm.rigify_layers[0].name = "Face"
    arm.rigify_layers[0].row = 1
    arm.rigify_layers[0].set = False
    arm.rigify_layers[0].group = 5
    arm.rigify_layers[1].name = "Face (Primary)"
    arm.rigify_layers[1].row = 2
    arm.rigify_layers[1].set = False
    arm.rigify_layers[1].group = 2
    arm.rigify_layers[2].name = "Face (Secondary)"
    arm.rigify_layers[2].row = 2
    arm.rigify_layers[2].set = False
    arm.rigify_layers[2].group = 3
    arm.rigify_layers[3].name = "Torso"
    arm.rigify_layers[3].row = 3
    arm.rigify_layers[3].set = False
    arm.rigify_layers[3].group = 3
    arm.rigify_layers[4].name = "Torso (Tweak)"
    arm.rigify_layers[4].row = 4
    arm.rigify_layers[4].set = False
    arm.rigify_layers[4].group = 4
    arm.rigify_layers[5].name = "Fingers"
    arm.rigify_layers[5].row = 5
    arm.rigify_layers[5].set = False
    arm.rigify_layers[5].group = 6
    arm.rigify_layers[6].name = "Fingers (Tweak)"
    arm.rigify_layers[6].row = 6
    arm.rigify_layers[6].set = False
    arm.rigify_layers[6].group = 4
    arm.rigify_layers[7].name = "Arm.L (IK)"
    arm.rigify_layers[7].row = 7
    arm.rigify_layers[7].set = False
    arm.rigify_layers[7].group = 2
    arm.rigify_layers[8].name = "Arm.L (FK)"
    arm.rigify_layers[8].row = 8
    arm.rigify_layers[8].set = False
    arm.rigify_layers[8].group = 5
    arm.rigify_layers[9].name = "Arm.L (Tweak)"
    arm.rigify_layers[9].row = 9
    arm.rigify_layers[9].set = False
    arm.rigify_layers[9].group = 4
    arm.rigify_layers[10].name = "Arm.R (IK)"
    arm.rigify_layers[10].row = 7
    arm.rigify_layers[10].set = False
    arm.rigify_layers[10].group = 2
    arm.rigify_layers[11].name = "Arm.R (FK)"
    arm.rigify_layers[11].row = 8
    arm.rigify_layers[11].set = False
    arm.rigify_layers[11].group = 5
    arm.rigify_layers[12].name = "Arm.R (Tweak)"
    arm.rigify_layers[12].row = 9
    arm.rigify_layers[12].set = False
    arm.rigify_layers[12].group = 4
    arm.rigify_layers[13].name = "Leg.L (IK)"
    arm.rigify_layers[13].row = 10
    arm.rigify_layers[13].set = False
    arm.rigify_layers[13].group = 2
    arm.rigify_layers[14].name = "Leg.L (FK)"
    arm.rigify_layers[14].row = 11
    arm.rigify_layers[14].set = False
    arm.rigify_layers[14].group = 5
    arm.rigify_layers[15].name = "Leg.L (Tweak)"
    arm.rigify_layers[15].row = 12
    arm.rigify_layers[15].set = False
    arm.rigify_layers[15].group = 4
    arm.rigify_layers[16].name = "Leg.R (IK)"
    arm.rigify_layers[16].row = 10
    arm.rigify_layers[16].set = False
    arm.rigify_layers[16].group = 2
    arm.rigify_layers[17].name = "Leg.R (FK)"
    arm.rigify_layers[17].row = 11
    arm.rigify_layers[17].set = False
    arm.rigify_layers[17].group = 5
    arm.rigify_layers[18].name = "Leg.R (Tweak)"
    arm.rigify_layers[18].row = 12
    arm.rigify_layers[18].set = False
    arm.rigify_layers[18].group = 4
    arm.rigify_layers[19].name = ""
    arm.rigify_layers[19].row = 1
    arm.rigify_layers[19].set = False
    arm.rigify_layers[19].group = 0
    arm.rigify_layers[20].name = ""
    arm.rigify_layers[20].row = 1
    arm.rigify_layers[20].set = False
    arm.rigify_layers[20].group = 0
    arm.rigify_layers[21].name = ""
    arm.rigify_layers[21].row = 1
    arm.rigify_layers[21].set = False
    arm.rigify_layers[21].group = 0
    arm.rigify_layers[22].name = ""
    arm.rigify_layers[22].row = 1
    arm.rigify_layers[22].set = False
    arm.rigify_layers[22].group = 0
    arm.rigify_layers[23].name = ""
    arm.rigify_layers[23].row = 1
    arm.rigify_layers[23].set = False
    arm.rigify_layers[23].group = 0
    arm.rigify_layers[24].name = ""
    arm.rigify_layers[24].row = 1
    arm.rigify_layers[24].set = False
    arm.rigify_layers[24].group = 0
    arm.rigify_layers[25].name = ""
    arm.rigify_layers[25].row = 1
    arm.rigify_layers[25].set = False
    arm.rigify_layers[25].group = 0
    arm.rigify_layers[26].name = ""
    arm.rigify_layers[26].row = 1
    arm.rigify_layers[26].set = False
    arm.rigify_layers[26].group = 0
    arm.rigify_layers[27].name = ""
    arm.rigify_layers[27].row = 1
    arm.rigify_layers[27].set = False
    arm.rigify_layers[27].group = 0
    arm.rigify_layers[28].name = "Root"
    arm.rigify_layers[28].row = 14
    arm.rigify_layers[28].set = False
    arm.rigify_layers[28].group = 1
    arm.rigify_layers[29].name = " "
    arm.rigify_layers[29].row = 1
    arm.rigify_layers[29].set = False
    arm.rigify_layers[29].group = 0
    arm.rigify_layers[30].name = " "
    arm.rigify_layers[30].row = 1
    arm.rigify_layers[30].set = False
    arm.rigify_layers[30].group = 0
    arm.rigify_layers[31].name = " "
    arm.rigify_layers[31].row = 1
    arm.rigify_layers[31].set = False
    arm.rigify_layers[31].group = 0
    arm.rigify_layers[32].name = " "
    arm.rigify_layers[32].row = 1
    arm.rigify_layers[32].set = False
    arm.rigify_layers[32].group = 0
    arm.rigify_layers[33].name = " "
    arm.rigify_layers[33].row = 1
    arm.rigify_layers[33].set = False
    arm.rigify_layers[33].group = 0
    arm.rigify_layers[34].name = " "
    arm.rigify_layers[34].row = 1
    arm.rigify_layers[34].set = False
    arm.rigify_layers[34].group = 0
    arm.rigify_layers[35].name = " "
    arm.rigify_layers[35].row = 1
    arm.rigify_layers[35].set = False
    arm.rigify_layers[35].group = 0
    arm.rigify_layers[36].name = " "
    arm.rigify_layers[36].row = 1
    arm.rigify_layers[36].set = False
    arm.rigify_layers[36].group = 0
    arm.rigify_layers[37].name = " "
    arm.rigify_layers[37].row = 1
    arm.rigify_layers[37].set = False
    arm.rigify_layers[37].group = 0
    arm.rigify_layers[38].name = " "
    arm.rigify_layers[38].row = 1
    arm.rigify_layers[38].set = False
    arm.rigify_layers[38].group = 0
    arm.rigify_layers[39].name = " "
    arm.rigify_layers[39].row = 1
    arm.rigify_layers[39].set = False
    arm.rigify_layers[39].group = 0
    arm.rigify_layers[40].name = " "
    arm.rigify_layers[40].row = 1
    arm.rigify_layers[40].set = False
    arm.rigify_layers[40].group = 0
    arm.rigify_layers[41].name = " "
    arm.rigify_layers[41].row = 1
    arm.rigify_layers[41].set = False
    arm.rigify_layers[41].group = 0
    arm.rigify_layers[42].name = " "
    arm.rigify_layers[42].row = 1
    arm.rigify_layers[42].set = False
    arm.rigify_layers[42].group = 0
    arm.rigify_layers[43].name = " "
    arm.rigify_layers[43].row = 1
    arm.rigify_layers[43].set = False
    arm.rigify_layers[43].group = 0
    arm.rigify_layers[44].name = " "
    arm.rigify_layers[44].row = 1
    arm.rigify_layers[44].set = False
    arm.rigify_layers[44].group = 0
    arm.rigify_layers[45].name = " "
    arm.rigify_layers[45].row = 1
    arm.rigify_layers[45].set = False
    arm.rigify_layers[45].group = 0
    arm.rigify_layers[46].name = " "
    arm.rigify_layers[46].row = 1
    arm.rigify_layers[46].set = False
    arm.rigify_layers[46].group = 0
    arm.rigify_layers[47].name = " "
    arm.rigify_layers[47].row = 1
    arm.rigify_layers[47].set = False
    arm.rigify_layers[47].group = 0
    arm.rigify_layers[48].name = " "
    arm.rigify_layers[48].row = 1
    arm.rigify_layers[48].set = False
    arm.rigify_layers[48].group = 0
    arm.rigify_layers[49].name = " "
    arm.rigify_layers[49].row = 1
    arm.rigify_layers[49].set = False
    arm.rigify_layers[49].group = 0
    arm.rigify_layers[50].name = " "
    arm.rigify_layers[50].row = 1
    arm.rigify_layers[50].set = False
    arm.rigify_layers[50].group = 0
    arm.rigify_layers[51].name = " "
    arm.rigify_layers[51].row = 1
    arm.rigify_layers[51].set = False
    arm.rigify_layers[51].group = 0
    arm.rigify_layers[52].name = " "
    arm.rigify_layers[52].row = 1
    arm.rigify_layers[52].set = False
    arm.rigify_layers[52].group = 0
    arm.rigify_layers[53].name = " "
    arm.rigify_layers[53].row = 1
    arm.rigify_layers[53].set = False
    arm.rigify_layers[53].group = 0
    arm.rigify_layers[54].name = " "
    arm.rigify_layers[54].row = 1
    arm.rigify_layers[54].set = False
    arm.rigify_layers[54].group = 0
    arm.rigify_layers[55].name = " "
    arm.rigify_layers[55].row = 1
    arm.rigify_layers[55].set = False
    arm.rigify_layers[55].group = 0
    arm.rigify_layers[56].name = " "
    arm.rigify_layers[56].row = 1
    arm.rigify_layers[56].set = False
    arm.rigify_layers[56].group = 0
    arm.rigify_layers[57].name = " "
    arm.rigify_layers[57].row = 1
    arm.rigify_layers[57].set = False
    arm.rigify_layers[57].group = 0

    bones = {}

    bone = arm.edit_bones.new('spine')
    #bone.head[:] = 0.0000, 0.0552, 1.0099
    #print(srcBones['pelvis'].head)
    ##print(bone.head)
    #bone.tail[:] = 0.0000, 0.0172, 1.1573
    #print(bone.tail)
    bone.head[:] = srcBones['pelvis']['head']
    bone.tail[:] = srcBones['pelvis']['tail']
    bone.roll = srcBones['pelvis']['roll']
    ##bone.roll = 0.0000
    bone.use_connect = False
    bones['spine'] = bone.name

    bone = arm.edit_bones.new('spine.001')
    #bone.head[:] = 0.0000, 0.0172, 1.1573
    #bone.tail[:] = 0.0000, 0.0004, 1.2929
    #bone.roll = 0.0000
    tmp = srcBones['spine01']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine']]
    bones['spine.001'] = bone.name
    bone = arm.edit_bones.new('thigh.L')
    bone.head[:] = 0.0980, 0.0124, 1.0720
    bone.tail[:] = 0.0980, -0.0286, 0.5372
    bone.roll = 0.0000

    tmp = srcBones['thigh_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.L'] = bone.name
    bone = arm.edit_bones.new('thigh.R')
    bone.head[:] = -0.0980, 0.0124, 1.0720
    bone.tail[:] = -0.0980, -0.0286, 0.5372
    bone.roll = 0.000
    tmp = srcBones['thigh_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.R'] = bone.name
    bone = arm.edit_bones.new('spine.002')
    bone.head[:] = 0.0000, 0.0004, 1.2929
    bone.tail[:] = 0.0000, 0.0059, 1.4657
    bone.roll = 0.0000
    tmp = srcBones['spine02']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.001']]
    bones['spine.002'] = bone.name
    bone = arm.edit_bones.new('shin.L')
    bone.head[:] = 0.0980, -0.0286, 0.5372
    bone.tail[:] = 0.0980, 0.0162, 0.0852
    bone.roll = 0.0000
    tmp = srcBones['calf_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.L']]
    bones['shin.L'] = bone.name
    bone = arm.edit_bones.new('shin.R')
    bone.head[:] = -0.0980, -0.0286, 0.5372
    bone.tail[:] = -0.0980, 0.0162, 0.0852
    bone.roll = 0.0000
    tmp = srcBones['calf_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.R']]
    bones['shin.R'] = bone.name
    bone = arm.edit_bones.new('spine.003')
    bone.head[:] = 0.0000, 0.0059, 1.4657
    bone.tail[:] = 0.0000, 0.0114, 1.6582
    bone.roll = 0.0000
    tmp = srcBones['spine03']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.002']]
    bones['spine.003'] = bone.name
    bone = arm.edit_bones.new('foot.L')
    bone.head[:] = 0.0980, 0.0162, 0.0852
    bone.tail[:] = 0.0980, -0.0934, 0.0167
    bone.roll = 0.0000
    tmp = srcBones['foot_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.L']]
    bones['foot.L'] = bone.name
    bone = arm.edit_bones.new('foot.R')
    bone.head[:] = -0.0980, 0.0162, 0.0852
    bone.tail[:] = -0.0980, -0.0934, 0.0167
    bone.roll = -0.0000
    tmp = srcBones['foot_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.R']]
    bones['foot.R'] = bone.name
    bone = arm.edit_bones.new('spine.004')
    bone.head[:] = 0.0000, 0.0114, 1.6582
    bone.tail[:] = 0.0000, -0.0130, 1.7197
    bone.roll = 0.0000
    tmp = srcBones['neck']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['spine.004'] = bone.name
    bone = arm.edit_bones.new('shoulder.L')
    bone.head[:] = 0.0183, -0.0684, 1.6051
    bone.tail[:] = 0.1694, 0.0205, 1.6050
    bone.roll = 0.0004
    tmp = srcBones['clavicle_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.L'] = bone.name
    bone = arm.edit_bones.new('shoulder.R')
    bone.head[:] = -0.0183, -0.0684, 1.6051
    bone.tail[:] = -0.1694, 0.0205, 1.6050
    bone.roll = -0.0004
    tmp = srcBones['clavicle_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.R'] = bone.name
    bone = arm.edit_bones.new('breast.L')
    bone.head[:] = 0.1184, 0.0485, 1.4596
    bone.tail[:] = 0.1184, -0.0907, 1.4596
    bone.roll = 0.0000
    tmp = srcBones['breast_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.L'] = bone.name
    bone = arm.edit_bones.new('breast.R')
    bone.head[:] = -0.1184, 0.0485, 1.4596
    bone.tail[:] = -0.1184, -0.0907, 1.4596
    bone.roll = -0.0000
    tmp = srcBones['breast_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.R'] = bone.name
    bone = arm.edit_bones.new('toe.L')
    bone.head[:] = 0.0980, -0.0934, 0.0167
    bone.tail[:] = 0.0980, -0.1606, 0.0167
    bone.roll = -0.0000
    tmp = srcBones['toes_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['toe.L'] = bone.name
    bone = arm.edit_bones.new('heel.02.L')
    bone.head[:] = 0.0600, 0.0459, 0.0000
    bone.tail[:] = 0.1400, 0.0459, 0.0000
    bone.roll = 0.0000
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['heel.02.L'] = bone.name
    bone = arm.edit_bones.new('toe.R')
    bone.head[:] = -0.0980, -0.0934, 0.0167
    bone.tail[:] = -0.0980, -0.1606, 0.0167
    bone.roll = 0.0000
    tmp = srcBones['toes_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['toe.R'] = bone.name
    bone = arm.edit_bones.new('heel.02.R')
    bone.head[:] = -0.0600, 0.0459, 0.0000
    bone.tail[:] = -0.1400, 0.0459, 0.0000
    bone.roll = -0.0000
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['heel.02.R'] = bone.name
    bone = arm.edit_bones.new('spine.005')
    bone.head[:] = 0.0000, -0.0130, 1.7197
    bone.tail[:] = 0.0000, -0.0247, 1.7813
    bone.roll = 0.0000
    tmp = srcBones['head']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.004']]
    bones['spine.005'] = bone.name
    bone = arm.edit_bones.new('upper_arm.L')
    bone.head[:] = 0.1953, 0.0267, 1.5846
    bone.tail[:] = 0.4424, 0.0885, 1.4491
    bone.roll = 2.0724
    tmp = srcBones['upperarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.L']]
    bones['upper_arm.L'] = bone.name
    bone = arm.edit_bones.new('upper_arm.R')
    bone.head[:] = -0.1953, 0.0267, 1.5846
    bone.tail[:] = -0.4424, 0.0885, 1.4491
    bone.roll = -2.0724
    tmp = srcBones['upperarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.R']]
    bones['upper_arm.R'] = bone.name
    bone = arm.edit_bones.new('forearm.L')
    bone.head[:] = 0.4424, 0.0885, 1.4491
    bone.tail[:] = 0.6594, 0.0492, 1.3061
    bone.roll = 2.1535
    tmp = srcBones['lowerarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.L']]
    bones['forearm.L'] = bone.name
    bone = arm.edit_bones.new('forearm.R')
    bone.head[:] = -0.4424, 0.0885, 1.4491
    bone.tail[:] = -0.6594, 0.0492, 1.3061
    bone.roll = -2.1535
    tmp = srcBones['lowerarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.R']]
    bones['forearm.R'] = bone.name
    bone = arm.edit_bones.new('hand.L')
    bone.head[:] = 0.6594, 0.0492, 1.3061
    bone.tail[:] = 0.7234, 0.0412, 1.2585
    bone.roll = 2.2103
    tmp = srcBones['hand_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.L']]
    bones['hand.L'] = bone.name
    bone = arm.edit_bones.new('hand.R')
    bone.head[:] = -0.6594, 0.0492, 1.3061
    bone.tail[:] = -0.7234, 0.0412, 1.2585
    bone.roll = -2.2103
    tmp = srcBones['hand_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.R']]
    bones['hand.R'] = bone.name
    bone = arm.edit_bones.new('palm.01.L')
    bone.head[:] = 0.6921, 0.0224, 1.2882
    bone.tail[:] = 0.7464, 0.0051, 1.2482
    bone.roll = -2.4928
    tmp = srcBones['index00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.01.L'] = bone.name
    bone = arm.edit_bones.new('palm.02.L')
    bone.head[:] = 0.6970, 0.0389, 1.2877
    bone.tail[:] = 0.7518, 0.0277, 1.2487
    bone.roll = -2.5274
    tmp = srcBones['middle00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.02.L'] = bone.name
    bone = arm.edit_bones.new('palm.03.L')
    bone.head[:] = 0.6963, 0.0545, 1.2874
    bone.tail[:] = 0.7540, 0.0521, 1.2482
    bone.roll = -2.5843
    tmp = srcBones['ring00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.03.L'] = bone.name
    bone = arm.edit_bones.new('palm.04.L')
    bone.head[:] = 0.6929, 0.0696, 1.2871
    bone.tail[:] = 0.7528, 0.0763, 1.2428
    bone.roll = -2.5155
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.04.L'] = bone.name
    bone = arm.edit_bones.new('palm.01.R')
    bone.head[:] = -0.6921, 0.0224, 1.2882
    bone.tail[:] = -0.7464, 0.0051, 1.2482
    bone.roll = 2.4928
    tmp = srcBones['index00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.01.R'] = bone.name
    bone = arm.edit_bones.new('palm.02.R')
    bone.head[:] = -0.6970, 0.0389, 1.2877
    bone.tail[:] = -0.7518, 0.0277, 1.2487
    bone.roll = 2.5274
    tmp = srcBones['middle00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.02.R'] = bone.name
    bone = arm.edit_bones.new('palm.03.R')
    bone.head[:] = -0.6963, 0.0544, 1.2874
    bone.tail[:] = -0.7540, 0.0521, 1.2482
    bone.roll = 2.5843
    tmp = srcBones['ring00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.03.R'] = bone.name
    bone = arm.edit_bones.new('palm.04.R')
    bone.head[:] = -0.6929, 0.0696, 1.2871
    bone.tail[:] = -0.7528, 0.0763, 1.2428
    bone.roll = 2.5155
        
    tmp = srcBones['pinky00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.04.R'] = bone.name
    bone = arm.edit_bones.new('f_index.01.L')
    bone.head[:] = 0.7464, 0.0051, 1.2482
    bone.tail[:] = 0.7718, 0.0013, 1.2112
    bone.roll = -2.0315
    
    tmp = srcBones['index01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['f_index.01.L'] = bone.name
    bone = arm.edit_bones.new('thumb.01.L')
    bone.head[:] = 0.6705, 0.0214, 1.2738
    bone.tail[:] = 0.6857, 0.0015, 1.2404
    bone.roll = -0.1587
    tmp = srcBones['thumb01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['thumb.01.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.L')
    bone.head[:] = 0.7518, 0.0277, 1.2487
    bone.tail[:] = 0.7762, 0.0234, 1.2058
    bone.roll = -2.0067
    tmp = srcBones['middle01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.L']]
    bones['f_middle.01.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.L')
    bone.head[:] = 0.7540, 0.0521, 1.2482
    bone.tail[:] = 0.7715, 0.0499, 1.2070
    bone.roll = -2.0082
    tmp = srcBones['ring01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.L']]
    bones['f_ring.01.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.L')
    bone.head[:] = 0.7528, 0.0763, 1.2428
    bone.tail[:] = 0.7589, 0.0765, 1.2156
    bone.roll = -1.9749
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.L']]
    bones['f_pinky.01.L'] = bone.name
    bone = arm.edit_bones.new('f_index.01.R')
    bone.head[:] = -0.7464, 0.0051, 1.2482
    bone.tail[:] = -0.7718, 0.0012, 1.2112
    bone.roll = 2.0315
    tmp = srcBones['index01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['f_index.01.R'] = bone.name
    bone = arm.edit_bones.new('thumb.01.R')
    bone.head[:] = -0.6705, 0.0214, 1.2738
    bone.tail[:] = -0.6857, 0.0015, 1.2404
    bone.roll = 0.1587
    tmp = srcBones['thumb01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['thumb.01.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.R')
    bone.head[:] = -0.7518, 0.0277, 1.2487
    bone.tail[:] = -0.7762, 0.0233, 1.2058
    bone.roll = 2.0067
    tmp = srcBones['middle01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.R']]
    bones['f_middle.01.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.R')
    bone.head[:] = -0.7540, 0.0521, 1.2482
    bone.tail[:] = -0.7715, 0.0499, 1.2070
    bone.roll = 2.0082
    tmp = srcBones['ring01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.R']]
    bones['f_ring.01.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.R')
    bone.head[:] = -0.7528, 0.0763, 1.2428
    bone.tail[:] = -0.7589, 0.0765, 1.2156
    bone.roll = 1.9749
    tmp = srcBones['pinky01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.R']]
    bones['f_pinky.01.R'] = bone.name
    bone = arm.edit_bones.new('f_index.02.L')
    bone.head[:] = 0.7718, 0.0013, 1.2112
    bone.tail[:] = 0.7840, -0.0003, 1.1858
    bone.roll = -1.8799
    tmp = srcBones['index02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.L']]
    bones['f_index.02.L'] = bone.name
    bone = arm.edit_bones.new('thumb.02.L')
    bone.head[:] = 0.6857, 0.0015, 1.2404
    bone.tail[:] = 0.7056, -0.0057, 1.2145
    bone.roll = -0.4798
    tmp = srcBones['thumb02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.L']]
    bones['thumb.02.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.L')
    bone.head[:] = 0.7762, 0.0234, 1.2058
    bone.tail[:] = 0.7851, 0.0218, 1.1749
    bone.roll = -1.8283
    tmp = srcBones['middle02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.L']]
    bones['f_middle.02.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.L')
    bone.head[:] = 0.7715, 0.0499, 1.2070
    bone.tail[:] = 0.7794, 0.0494, 1.1762
    bone.roll = -1.8946
    tmp = srcBones['ring02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.L']]
    bones['f_ring.02.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.L')
    bone.head[:] = 0.7589, 0.0765, 1.2156
    bone.tail[:] = 0.7618, 0.0770, 1.1932
    bone.roll = -1.9059
    tmp = srcBones['pinky02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.L']]
    bones['f_pinky.02.L'] = bone.name
    bone = arm.edit_bones.new('f_index.02.R')
    bone.head[:] = -0.7718, 0.0012, 1.2112
    bone.tail[:] = -0.7840, -0.0003, 1.1858
    bone.roll = 1.8799
    tmp = srcBones['index02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.R']]
    bones['f_index.02.R'] = bone.name
    bone = arm.edit_bones.new('thumb.02.R')
    bone.head[:] = -0.6857, 0.0015, 1.2404
    bone.tail[:] = -0.7056, -0.0057, 1.2145
    bone.roll = 0.4798
    tmp = srcBones['thumb02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.R']]
    bones['thumb.02.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.R')
    bone.head[:] = -0.7762, 0.0233, 1.2058
    bone.tail[:] = -0.7851, 0.0218, 1.1749
    bone.roll = 1.8283
    tmp = srcBones['middle02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.R']]
    bones['f_middle.02.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.R')
    bone.head[:] = -0.7715, 0.0499, 1.2070
    bone.tail[:] = -0.7794, 0.0494, 1.1762
    bone.roll = 1.8946
    tmp = srcBones['ring02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.R']]
    bones['f_ring.02.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.R')
    bone.head[:] = -0.7589, 0.0765, 1.2156
    bone.tail[:] = -0.7618, 0.0770, 1.1932
    bone.roll = 1.9059
    tmp = srcBones['pinky02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.R']]
    bones['f_pinky.02.R'] = bone.name
    bone = arm.edit_bones.new('f_index.03.L')
    bone.head[:] = 0.7840, -0.0003, 1.1858
    bone.tail[:] = 0.7892, 0.0006, 1.1636
    bone.roll = -1.6760
    tmp = srcBones['index03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.L']]
    bones['f_index.03.L'] = bone.name
    bone = arm.edit_bones.new('thumb.03.L')
    bone.head[:] = 0.7056, -0.0057, 1.2145
    bone.tail[:] = 0.7194, -0.0098, 1.1995
    bone.roll = -0.5826
    tmp = srcBones['thumb03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.L']]
    bones['thumb.03.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.L')
    bone.head[:] = 0.7851, 0.0218, 1.1749
    bone.tail[:] = 0.7888, 0.0216, 1.1525
    bone.roll = -1.7483
    tmp = srcBones['middle03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.L']]
    bones['f_middle.03.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.L')
    bone.head[:] = 0.7794, 0.0494, 1.1762
    bone.tail[:] = 0.7781, 0.0498, 1.1577
    bone.roll = -1.6582
    tmp = srcBones['ring03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.L']]
    bones['f_ring.03.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.L')
    bone.head[:] = 0.7618, 0.0770, 1.1932
    bone.tail[:] = 0.7611, 0.0772, 1.1782
    bone.roll = -1.7639
    tmp = srcBones['pinky03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.L']]
    bones['f_pinky.03.L'] = bone.name
    bone = arm.edit_bones.new('f_index.03.R')
    bone.head[:] = -0.7840, -0.0003, 1.1858
    bone.tail[:] = -0.7892, 0.0006, 1.1636
    bone.roll = 1.6760
    tmp = srcBones['index03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.R']]
    bones['f_index.03.R'] = bone.name
    bone = arm.edit_bones.new('thumb.03.R')
    bone.head[:] = -0.7056, -0.0057, 1.2145
    bone.tail[:] = -0.7194, -0.0098, 1.1995
    bone.roll = 0.5826
    tmp = srcBones['thumb03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.R']]
    bones['thumb.03.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.R')
    bone.head[:] = -0.7851, 0.0218, 1.1749
    bone.tail[:] = -0.7888, 0.0216, 1.1525
    bone.roll = 1.7483
    tmp = srcBones['middle03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.R']]
    bones['f_middle.03.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.R')
    bone.head[:] = -0.7794, 0.0494, 1.1762
    bone.tail[:] = -0.7781, 0.0498, 1.1577
    bone.roll = 1.6582
    tmp = srcBones['ring03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.R']]
    bones['f_ring.03.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.R')
    bone.head[:] = -0.7618, 0.0770, 1.1932
    bone.tail[:] = -0.7611, 0.0772, 1.1782
    bone.roll = 1.7639
    tmp = srcBones['pinky03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.R']]
    bones['f_pinky.03.R'] = bone.name

    bpy.ops.object.mode_set(mode='OBJECT')
    pbone = obj.pose.bones[bones['spine']]
    pbone.rigify_type = 'spines.super_spine'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.neck_pos = 4
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.001']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thigh.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.limb_type = "leg"
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thigh.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.limb_type = "leg"
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.002']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.003']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.004']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shoulder.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['shoulder.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['breast.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['breast.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.005']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['upper_arm.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['upper_arm.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['forearm.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['forearm.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.L']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.R']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]

    bpy.ops.object.mode_set(mode='EDIT')
    for bone in arm.edit_bones:
        bone.select = False
        bone.select_head = False
        bone.select_tail = False
    for b in bones:
        bone = arm.edit_bones[bones[b]]
        bone.select = True
        bone.select_head = True
        bone.select_tail = True
        arm.edit_bones.active = bone

    arm.layers = [(x in [3, 5, 7, 10, 13, 16]) for x in range(32)]
    #ob = bpy.data.objects.new("testObj", arm)


print("Sadfsdfasdf")
o = bpy.context.object

mblName = o.name
print(mblName)
armature = bpy.context.object.find_armature()
print(armature)

#bones = armature.data.bones
#bpy.ops.object.mode_set(mode='EDIT')

boneData = {}
bpy.data.objects[armature.name].select = True
bpy.context.scene.objects.active = bpy.data.objects[armature.name]
bpy.ops.object.mode_set(mode='EDIT')
for b in bpy.context.object.data.edit_bones:
    boneData[b.name] = {'roll': b.roll, 'head': b.head,'tail': b.tail}
bpy.ops.object.mode_set(mode='OBJECT')

#print(boneData)
#   print(b.name, b.roll, b.head, b.tail)

#bpy.ops.object.armature_human_metarig_add()
#target = bpy.context.object
#targetBones = target.data.bones;
#print(targetBones)

#for b in targetBones:
#    print(b.name)

#targetBones = target.bones

#print(armature.name)


#for b in targetBones:
#    print(type(b))    

bpy.ops.object.select_all(action='DESELECT')
if __name__ == "__main__":
    amt = bpy.data.armatures.new("ArmatureTest")
    ob = bpy.data.objects.new("ObjectTest2", amt)
    
    scn = bpy.context.scene
    scn.objects.link(ob)
    scn.objects.active = ob
    ob.select = True
    print(boneData['pelvis'])
    create(ob, boneData)

d0e7bd27d63a2ab0d99874000c254e9609414077
<mask token>


def create(obj, srcBones):
    bpy.ops.object.mode_set(mode='EDIT')
    arm = obj.data
    for i in range(12):
        arm.rigify_colors.add()
    arm.rigify_colors[0].name = 'Root'
    arm.rigify_colors[0].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[0].normal = Color((0.4352940022945404, 
        0.18431399762630463, 0.4156860113143921))
    arm.rigify_colors[0].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[0].standard_colors_lock = True
    arm.rigify_colors[1].name = 'IK'
    arm.rigify_colors[1].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[1].normal = Color((0.6039220094680786, 0.0, 0.0))
    arm.rigify_colors[1].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[1].standard_colors_lock = True
    arm.rigify_colors[2].name = 'Special'
    arm.rigify_colors[2].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[2].normal = Color((0.9568629860877991, 
        0.7882350087165833, 0.04705899953842163))
    arm.rigify_colors[2].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[2].standard_colors_lock = True
    arm.rigify_colors[3].name = 'Tweak'
    arm.rigify_colors[3].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[3].normal = Color((0.03921600058674812, 
        0.21176500618457794, 0.5803920030593872))
    arm.rigify_colors[3].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[3].standard_colors_lock = True
    arm.rigify_colors[4].name = 'FK'
    arm.rigify_colors[4].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[4].normal = Color((0.11764699965715408, 
        0.5686269998550415, 0.035294000059366226))
    arm.rigify_colors[4].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[4].standard_colors_lock = True
    arm.rigify_colors[5].name = 'Extra'
    arm.rigify_colors[5].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[5].normal = Color((0.9686279892921448, 
        0.2509799897670746, 0.09411799907684326))
    arm.rigify_colors[5].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[5].standard_colors_lock = True
    arm.rigify_colors[6].name = ' '
    arm.rigify_colors[6].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].standard_colors_lock = True
    arm.rigify_colors[7].name = ' '
    arm.rigify_colors[7].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].standard_colors_lock = True
    arm.rigify_colors[8].name = ' '
    arm.rigify_colors[8].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].standard_colors_lock = True
    arm.rigify_colors[9].name = ' '
    arm.rigify_colors[9].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].standard_colors_lock = True
    arm.rigify_colors[10].name = ' '
    arm.rigify_colors[10].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].standard_colors_lock = True
    arm.rigify_colors[11].name = ' '
    arm.rigify_colors[11].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].standard_colors_lock = True
    for i in range(58):
        arm.rigify_layers.add()
    arm.rigify_layers[0].name = 'Face'
    arm.rigify_layers[0].row = 1
    arm.rigify_layers[0].set = False
    arm.rigify_layers[0].group = 5
    arm.rigify_layers[1].name = 'Face (Primary)'
    arm.rigify_layers[1].row = 2
    arm.rigify_layers[1].set = False
    arm.rigify_layers[1].group = 2
    arm.rigify_layers[2].name = 'Face (Secondary)'
    arm.rigify_layers[2].row = 2
    arm.rigify_layers[2].set = False
    arm.rigify_layers[2].group = 3
    arm.rigify_layers[3].name = 'Torso'
    arm.rigify_layers[3].row = 3
    arm.rigify_layers[3].set = False
    arm.rigify_layers[3].group = 3
    arm.rigify_layers[4].name = 'Torso (Tweak)'
    arm.rigify_layers[4].row = 4
    arm.rigify_layers[4].set = False
    arm.rigify_layers[4].group = 4
    arm.rigify_layers[5].name = 'Fingers'
    arm.rigify_layers[5].row = 5
    arm.rigify_layers[5].set = False
    arm.rigify_layers[5].group = 6
    arm.rigify_layers[6].name = 'Fingers (Tweak)'
    arm.rigify_layers[6].row = 6
    arm.rigify_layers[6].set = False
    arm.rigify_layers[6].group = 4
    arm.rigify_layers[7].name = 'Arm.L (IK)'
    arm.rigify_layers[7].row = 7
    arm.rigify_layers[7].set = False
    arm.rigify_layers[7].group = 2
    arm.rigify_layers[8].name = 'Arm.L (FK)'
    arm.rigify_layers[8].row = 8
    arm.rigify_layers[8].set = False
    arm.rigify_layers[8].group = 5
    arm.rigify_layers[9].name = 'Arm.L (Tweak)'
    arm.rigify_layers[9].row = 9
    arm.rigify_layers[9].set = False
    arm.rigify_layers[9].group = 4
    arm.rigify_layers[10].name = 'Arm.R (IK)'
    arm.rigify_layers[10].row = 7
    arm.rigify_layers[10].set = False
    arm.rigify_layers[10].group = 2
    arm.rigify_layers[11].name = 'Arm.R (FK)'
    arm.rigify_layers[11].row = 8
    arm.rigify_layers[11].set = False
    arm.rigify_layers[11].group = 5
    arm.rigify_layers[12].name = 'Arm.R (Tweak)'
    arm.rigify_layers[12].row = 9
    arm.rigify_layers[12].set = False
    arm.rigify_layers[12].group = 4
    arm.rigify_layers[13].name = 'Leg.L (IK)'
    arm.rigify_layers[13].row = 10
    arm.rigify_layers[13].set = False
    arm.rigify_layers[13].group = 2
    arm.rigify_layers[14].name = 'Leg.L (FK)'
    arm.rigify_layers[14].row = 11
    arm.rigify_layers[14].set = False
    arm.rigify_layers[14].group = 5
    arm.rigify_layers[15].name = 'Leg.L (Tweak)'
    arm.rigify_layers[15].row = 12
    arm.rigify_layers[15].set = False
    arm.rigify_layers[15].group = 4
    arm.rigify_layers[16].name = 'Leg.R (IK)'
    arm.rigify_layers[16].row = 10
    arm.rigify_layers[16].set = False
    arm.rigify_layers[16].group = 2
    arm.rigify_layers[17].name = 'Leg.R (FK)'
    arm.rigify_layers[17].row = 11
    arm.rigify_layers[17].set = False
    arm.rigify_layers[17].group = 5
    arm.rigify_layers[18].name = 'Leg.R (Tweak)'
    arm.rigify_layers[18].row = 12
    arm.rigify_layers[18].set = False
    arm.rigify_layers[18].group = 4
    arm.rigify_layers[19].name = ''
    arm.rigify_layers[19].row = 1
    arm.rigify_layers[19].set = False
    arm.rigify_layers[19].group = 0
    arm.rigify_layers[20].name = ''
    arm.rigify_layers[20].row = 1
    arm.rigify_layers[20].set = False
    arm.rigify_layers[20].group = 0
    arm.rigify_layers[21].name = ''
    arm.rigify_layers[21].row = 1
    arm.rigify_layers[21].set = False
    arm.rigify_layers[21].group = 0
    arm.rigify_layers[22].name = ''
    arm.rigify_layers[22].row = 1
    arm.rigify_layers[22].set = False
    arm.rigify_layers[22].group = 0
    arm.rigify_layers[23].name = ''
    arm.rigify_layers[23].row = 1
    arm.rigify_layers[23].set = False
    arm.rigify_layers[23].group = 0
    arm.rigify_layers[24].name = ''
    arm.rigify_layers[24].row = 1
    arm.rigify_layers[24].set = False
    arm.rigify_layers[24].group = 0
    arm.rigify_layers[25].name = ''
    arm.rigify_layers[25].row = 1
    arm.rigify_layers[25].set = False
    arm.rigify_layers[25].group = 0
    arm.rigify_layers[26].name = ''
    arm.rigify_layers[26].row = 1
    arm.rigify_layers[26].set = False
    arm.rigify_layers[26].group = 0
    arm.rigify_layers[27].name = ''
    arm.rigify_layers[27].row = 1
    arm.rigify_layers[27].set = False
    arm.rigify_layers[27].group = 0
    arm.rigify_layers[28].name = 'Root'
    arm.rigify_layers[28].row = 14
    arm.rigify_layers[28].set = False
    arm.rigify_layers[28].group = 1
    arm.rigify_layers[29].name = ' '
    arm.rigify_layers[29].row = 1
    arm.rigify_layers[29].set = False
    arm.rigify_layers[29].group = 0
    arm.rigify_layers[30].name = ' '
    arm.rigify_layers[30].row = 1
    arm.rigify_layers[30].set = False
    arm.rigify_layers[30].group = 0
    arm.rigify_layers[31].name = ' '
    arm.rigify_layers[31].row = 1
    arm.rigify_layers[31].set = False
    arm.rigify_layers[31].group = 0
    arm.rigify_layers[32].name = ' '
    arm.rigify_layers[32].row = 1
    arm.rigify_layers[32].set = False
    arm.rigify_layers[32].group = 0
    arm.rigify_layers[33].name = ' '
    arm.rigify_layers[33].row = 1
    arm.rigify_layers[33].set = False
    arm.rigify_layers[33].group = 0
    arm.rigify_layers[34].name = ' '
    arm.rigify_layers[34].row = 1
    arm.rigify_layers[34].set = False
    arm.rigify_layers[34].group = 0
    arm.rigify_layers[35].name = ' '
    arm.rigify_layers[35].row = 1
    arm.rigify_layers[35].set = False
    arm.rigify_layers[35].group = 0
    arm.rigify_layers[36].name = ' '
    arm.rigify_layers[36].row = 1
    arm.rigify_layers[36].set = False
    arm.rigify_layers[36].group = 0
    arm.rigify_layers[37].name = ' '
    arm.rigify_layers[37].row = 1
    arm.rigify_layers[37].set = False
    arm.rigify_layers[37].group = 0
    arm.rigify_layers[38].name = ' '
    arm.rigify_layers[38].row = 1
    arm.rigify_layers[38].set = False
    arm.rigify_layers[38].group = 0
    arm.rigify_layers[39].name = ' '
    arm.rigify_layers[39].row = 1
    arm.rigify_layers[39].set = False
    arm.rigify_layers[39].group = 0
    arm.rigify_layers[40].name = ' '
    arm.rigify_layers[40].row = 1
    arm.rigify_layers[40].set = False
    arm.rigify_layers[40].group = 0
    arm.rigify_layers[41].name = ' '
    arm.rigify_layers[41].row = 1
    arm.rigify_layers[41].set = False
    arm.rigify_layers[41].group = 0
    arm.rigify_layers[42].name = ' '
    arm.rigify_layers[42].row = 1
    arm.rigify_layers[42].set = False
    arm.rigify_layers[42].group = 0
    arm.rigify_layers[43].name = ' '
    arm.rigify_layers[43].row = 1
    arm.rigify_layers[43].set = False
    arm.rigify_layers[43].group = 0
    arm.rigify_layers[44].name = ' '
    arm.rigify_layers[44].row = 1
    arm.rigify_layers[44].set = False
    arm.rigify_layers[44].group = 0
    arm.rigify_layers[45].name = ' '
    arm.rigify_layers[45].row = 1
    arm.rigify_layers[45].set = False
    arm.rigify_layers[45].group = 0
    arm.rigify_layers[46].name = ' '
    arm.rigify_layers[46].row = 1
    arm.rigify_layers[46].set = False
    arm.rigify_layers[46].group = 0
    arm.rigify_layers[47].name = ' '
    arm.rigify_layers[47].row = 1
    arm.rigify_layers[47].set = False
    arm.rigify_layers[47].group = 0
    arm.rigify_layers[48].name = ' '
    arm.rigify_layers[48].row = 1
    arm.rigify_layers[48].set = False
    arm.rigify_layers[48].group = 0
    arm.rigify_layers[49].name = ' '
    arm.rigify_layers[49].row = 1
    arm.rigify_layers[49].set = False
    arm.rigify_layers[49].group = 0
    arm.rigify_layers[50].name = ' '
    arm.rigify_layers[50].row = 1
    arm.rigify_layers[50].set = False
    arm.rigify_layers[50].group = 0
    arm.rigify_layers[51].name = ' '
    arm.rigify_layers[51].row = 1
    arm.rigify_layers[51].set = False
    arm.rigify_layers[51].group = 0
    arm.rigify_layers[52].name = ' '
    arm.rigify_layers[52].row = 1
    arm.rigify_layers[52].set = False
    arm.rigify_layers[52].group = 0
    arm.rigify_layers[53].name = ' '
    arm.rigify_layers[53].row = 1
    arm.rigify_layers[53].set = False
    arm.rigify_layers[53].group = 0
    arm.rigify_layers[54].name = ' '
    arm.rigify_layers[54].row = 1
    arm.rigify_layers[54].set = False
    arm.rigify_layers[54].group = 0
    arm.rigify_layers[55].name = ' '
    arm.rigify_layers[55].row = 1
    arm.rigify_layers[55].set = False
    arm.rigify_layers[55].group = 0
    arm.rigify_layers[56].name = ' '
    arm.rigify_layers[56].row = 1
    arm.rigify_layers[56].set = False
    arm.rigify_layers[56].group = 0
    arm.rigify_layers[57].name = ' '
    arm.rigify_layers[57].row = 1
    arm.rigify_layers[57].set = False
    arm.rigify_layers[57].group = 0
    bones = {}
    bone = arm.edit_bones.new('spine')
    bone.head[:] = srcBones['pelvis']['head']
    bone.tail[:] = srcBones['pelvis']['tail']
    bone.roll = srcBones['pelvis']['roll']
    bone.use_connect = False
    bones['spine'] = bone.name
    bone = arm.edit_bones.new('spine.001')
    tmp = srcBones['spine01']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine']]
    bones['spine.001'] = bone.name
    bone = arm.edit_bones.new('thigh.L')
    bone.head[:] = 0.098, 0.0124, 1.072
    bone.tail[:] = 0.098, -0.0286, 0.5372
    bone.roll = 0.0
    tmp = srcBones['thigh_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.L'] = bone.name
    bone = arm.edit_bones.new('thigh.R')
    bone.head[:] = -0.098, 0.0124, 1.072
    bone.tail[:] = -0.098, -0.0286, 0.5372
    bone.roll = 0.0
    tmp = srcBones['thigh_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.R'] = bone.name
    bone = arm.edit_bones.new('spine.002')
    bone.head[:] = 0.0, 0.0004, 1.2929
    bone.tail[:] = 0.0, 0.0059, 1.4657
    bone.roll = 0.0
    tmp = srcBones['spine02']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.001']]
    bones['spine.002'] = bone.name
    bone = arm.edit_bones.new('shin.L')
    bone.head[:] = 0.098, -0.0286, 0.5372
    bone.tail[:] = 0.098, 0.0162, 0.0852
    bone.roll = 0.0
    tmp = srcBones['calf_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.L']]
    bones['shin.L'] = bone.name
    bone = arm.edit_bones.new('shin.R')
    bone.head[:] = -0.098, -0.0286, 0.5372
    bone.tail[:] = -0.098, 0.0162, 0.0852
    bone.roll = 0.0
    tmp = srcBones['calf_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.R']]
    bones['shin.R'] = bone.name
    bone = arm.edit_bones.new('spine.003')
    bone.head[:] = 0.0, 0.0059, 1.4657
    bone.tail[:] = 0.0, 0.0114, 1.6582
    bone.roll = 0.0
    tmp = srcBones['spine03']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.002']]
    bones['spine.003'] = bone.name
    bone = arm.edit_bones.new('foot.L')
    bone.head[:] = 0.098, 0.0162, 0.0852
    bone.tail[:] = 0.098, -0.0934, 0.0167
    bone.roll = 0.0
    tmp = srcBones['foot_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.L']]
    bones['foot.L'] = bone.name
    bone = arm.edit_bones.new('foot.R')
    bone.head[:] = -0.098, 0.0162, 0.0852
    bone.tail[:] = -0.098, -0.0934, 0.0167
    bone.roll = -0.0
    tmp = srcBones['foot_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.R']]
    bones['foot.R'] = bone.name
    bone = arm.edit_bones.new('spine.004')
    bone.head[:] = 0.0, 0.0114, 1.6582
    bone.tail[:] = 0.0, -0.013, 1.7197
    bone.roll = 0.0
    tmp = srcBones['neck']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['spine.004'] = bone.name
    bone = arm.edit_bones.new('shoulder.L')
    bone.head[:] = 0.0183, -0.0684, 1.6051
    bone.tail[:] = 0.1694, 0.0205, 1.605
    bone.roll = 0.0004
    tmp = srcBones['clavicle_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.L'] = bone.name
    bone = arm.edit_bones.new('shoulder.R')
    bone.head[:] = -0.0183, -0.0684, 1.6051
    bone.tail[:] = -0.1694, 0.0205, 1.605
    bone.roll = -0.0004
    tmp = srcBones['clavicle_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.R'] = bone.name
    bone = arm.edit_bones.new('breast.L')
    bone.head[:] = 0.1184, 0.0485, 1.4596
    bone.tail[:] = 0.1184, -0.0907, 1.4596
    bone.roll = 0.0
    tmp = srcBones['breast_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.L'] = bone.name
    bone = arm.edit_bones.new('breast.R')
    bone.head[:] = -0.1184, 0.0485, 1.4596
    bone.tail[:] = -0.1184, -0.0907, 1.4596
    bone.roll = -0.0
    tmp = srcBones['breast_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.R'] = bone.name
    bone = arm.edit_bones.new('toe.L')
    bone.head[:] = 0.098, -0.0934, 0.0167
    bone.tail[:] = 0.098, -0.1606, 0.0167
    bone.roll = -0.0
    tmp = srcBones['toes_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['toe.L'] = bone.name
    bone = arm.edit_bones.new('heel.02.L')
    bone.head[:] = 0.06, 0.0459, 0.0
    bone.tail[:] = 0.14, 0.0459, 0.0
    bone.roll = 0.0
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['heel.02.L'] = bone.name
    bone = arm.edit_bones.new('toe.R')
    bone.head[:] = -0.098, -0.0934, 0.0167
    bone.tail[:] = -0.098, -0.1606, 0.0167
    bone.roll = 0.0
    tmp = srcBones['toes_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['toe.R'] = bone.name
    bone = arm.edit_bones.new('heel.02.R')
    bone.head[:] = -0.06, 0.0459, 0.0
    bone.tail[:] = -0.14, 0.0459, 0.0
    bone.roll = -0.0
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['heel.02.R'] = bone.name
    bone = arm.edit_bones.new('spine.005')
    bone.head[:] = 0.0, -0.013, 1.7197
    bone.tail[:] = 0.0, -0.0247, 1.7813
    bone.roll = 0.0
    tmp = srcBones['head']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.004']]
    bones['spine.005'] = bone.name
    bone = arm.edit_bones.new('upper_arm.L')
    bone.head[:] = 0.1953, 0.0267, 1.5846
    bone.tail[:] = 0.4424, 0.0885, 1.4491
    bone.roll = 2.0724
    tmp = srcBones['upperarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.L']]
    bones['upper_arm.L'] = bone.name
    bone = arm.edit_bones.new('upper_arm.R')
    bone.head[:] = -0.1953, 0.0267, 1.5846
    bone.tail[:] = -0.4424, 0.0885, 1.4491
    bone.roll = -2.0724
    tmp = srcBones['upperarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.R']]
    bones['upper_arm.R'] = bone.name
    bone = arm.edit_bones.new('forearm.L')
    bone.head[:] = 0.4424, 0.0885, 1.4491
    bone.tail[:] = 0.6594, 0.0492, 1.3061
    bone.roll = 2.1535
    tmp = srcBones['lowerarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.L']]
    bones['forearm.L'] = bone.name
    bone = arm.edit_bones.new('forearm.R')
    bone.head[:] = -0.4424, 0.0885, 1.4491
    bone.tail[:] = -0.6594, 0.0492, 1.3061
    bone.roll = -2.1535
    tmp = srcBones['lowerarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.R']]
    bones['forearm.R'] = bone.name
    bone = arm.edit_bones.new('hand.L')
    bone.head[:] = 0.6594, 0.0492, 1.3061
    bone.tail[:] = 0.7234, 0.0412, 1.2585
    bone.roll = 2.2103
    tmp = srcBones['hand_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.L']]
    bones['hand.L'] = bone.name
    bone = arm.edit_bones.new('hand.R')
    bone.head[:] = -0.6594, 0.0492, 1.3061
    bone.tail[:] = -0.7234, 0.0412, 1.2585
    bone.roll = -2.2103
    tmp = srcBones['hand_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.R']]
    bones['hand.R'] = bone.name
    bone = arm.edit_bones.new('palm.01.L')
    bone.head[:] = 0.6921, 0.0224, 1.2882
    bone.tail[:] = 0.7464, 0.0051, 1.2482
    bone.roll = -2.4928
    tmp = srcBones['index00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.01.L'] = bone.name
    bone = arm.edit_bones.new('palm.02.L')
    bone.head[:] = 0.697, 0.0389, 1.2877
    bone.tail[:] = 0.7518, 0.0277, 1.2487
    bone.roll = -2.5274
    tmp = srcBones['middle00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.02.L'] = bone.name
    bone = arm.edit_bones.new('palm.03.L')
    bone.head[:] = 0.6963, 0.0545, 1.2874
    bone.tail[:] = 0.754, 0.0521, 1.2482
    bone.roll = -2.5843
    tmp = srcBones['ring00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.03.L'] = bone.name
    bone = arm.edit_bones.new('palm.04.L')
    bone.head[:] = 0.6929, 0.0696, 1.2871
    bone.tail[:] = 0.7528, 0.0763, 1.2428
    bone.roll = -2.5155
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.04.L'] = bone.name
    bone = arm.edit_bones.new('palm.01.R')
    bone.head[:] = -0.6921, 0.0224, 1.2882
    bone.tail[:] = -0.7464, 0.0051, 1.2482
    bone.roll = 2.4928
    tmp = srcBones['index00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.01.R'] = bone.name
    bone = arm.edit_bones.new('palm.02.R')
    bone.head[:] = -0.697, 0.0389, 1.2877
    bone.tail[:] = -0.7518, 0.0277, 1.2487
    bone.roll = 2.5274
    tmp = srcBones['middle00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.02.R'] = bone.name
    bone = arm.edit_bones.new('palm.03.R')
    bone.head[:] = -0.6963, 0.0544, 1.2874
    bone.tail[:] = -0.754, 0.0521, 1.2482
    bone.roll = 2.5843
    tmp = srcBones['ring00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.03.R'] = bone.name
    bone = arm.edit_bones.new('palm.04.R')
    bone.head[:] = -0.6929, 0.0696, 1.2871
    bone.tail[:] = -0.7528, 0.0763, 1.2428
    bone.roll = 2.5155
    tmp = srcBones['pinky00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.04.R'] = bone.name
    bone = arm.edit_bones.new('f_index.01.L')
    bone.head[:] = 0.7464, 0.0051, 1.2482
    bone.tail[:] = 0.7718, 0.0013, 1.2112
    bone.roll = -2.0315
    tmp = srcBones['index01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['f_index.01.L'] = bone.name
    bone = arm.edit_bones.new('thumb.01.L')
    bone.head[:] = 0.6705, 0.0214, 1.2738
    bone.tail[:] = 0.6857, 0.0015, 1.2404
    bone.roll = -0.1587
    tmp = srcBones['thumb01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['thumb.01.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.L')
    bone.head[:] = 0.7518, 0.0277, 1.2487
    bone.tail[:] = 0.7762, 0.0234, 1.2058
    bone.roll = -2.0067
    tmp = srcBones['middle01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.L']]
    bones['f_middle.01.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.L')
    bone.head[:] = 0.754, 0.0521, 1.2482
    bone.tail[:] = 0.7715, 0.0499, 1.207
    bone.roll = -2.0082
    tmp = srcBones['ring01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.L']]
    bones['f_ring.01.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.L')
    bone.head[:] = 0.7528, 0.0763, 1.2428
    bone.tail[:] = 0.7589, 0.0765, 1.2156
    bone.roll = -1.9749
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.L']]
    bones['f_pinky.01.L'] = bone.name
    bone = arm.edit_bones.new('f_index.01.R')
    bone.head[:] = -0.7464, 0.0051, 1.2482
    bone.tail[:] = -0.7718, 0.0012, 1.2112
    bone.roll = 2.0315
    tmp = srcBones['index01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['f_index.01.R'] = bone.name
    bone = arm.edit_bones.new('thumb.01.R')
    bone.head[:] = -0.6705, 0.0214, 1.2738
    bone.tail[:] = -0.6857, 0.0015, 1.2404
    bone.roll = 0.1587
    tmp = srcBones['thumb01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['thumb.01.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.R')
    bone.head[:] = -0.7518, 0.0277, 1.2487
    bone.tail[:] = -0.7762, 0.0233, 1.2058
    bone.roll = 2.0067
    tmp = srcBones['middle01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.R']]
    bones['f_middle.01.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.R')
    bone.head[:] = -0.754, 0.0521, 1.2482
    bone.tail[:] = -0.7715, 0.0499, 1.207
    bone.roll = 2.0082
    tmp = srcBones['ring01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.R']]
    bones['f_ring.01.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.R')
    bone.head[:] = -0.7528, 0.0763, 1.2428
    bone.tail[:] = -0.7589, 0.0765, 1.2156
    bone.roll = 1.9749
    tmp = srcBones['pinky01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.R']]
    bones['f_pinky.01.R'] = bone.name
    bone = arm.edit_bones.new('f_index.02.L')
    bone.head[:] = 0.7718, 0.0013, 1.2112
    bone.tail[:] = 0.784, -0.0003, 1.1858
    bone.roll = -1.8799
    tmp = srcBones['index02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.L']]
    bones['f_index.02.L'] = bone.name
    bone = arm.edit_bones.new('thumb.02.L')
    bone.head[:] = 0.6857, 0.0015, 1.2404
    bone.tail[:] = 0.7056, -0.0057, 1.2145
    bone.roll = -0.4798
    tmp = srcBones['thumb02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.L']]
    bones['thumb.02.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.L')
    bone.head[:] = 0.7762, 0.0234, 1.2058
    bone.tail[:] = 0.7851, 0.0218, 1.1749
    bone.roll = -1.8283
    tmp = srcBones['middle02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.L']]
    bones['f_middle.02.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.L')
    bone.head[:] = 0.7715, 0.0499, 1.207
    bone.tail[:] = 0.7794, 0.0494, 1.1762
    bone.roll = -1.8946
    tmp = srcBones['ring02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.L']]
    bones['f_ring.02.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.L')
    bone.head[:] = 0.7589, 0.0765, 1.2156
    bone.tail[:] = 0.7618, 0.077, 1.1932
    bone.roll = -1.9059
    tmp = srcBones['pinky02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.L']]
    bones['f_pinky.02.L'] = bone.name
    bone = arm.edit_bones.new('f_index.02.R')
    bone.head[:] = -0.7718, 0.0012, 1.2112
    bone.tail[:] = -0.784, -0.0003, 1.1858
    bone.roll = 1.8799
    tmp = srcBones['index02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.R']]
    bones['f_index.02.R'] = bone.name
    bone = arm.edit_bones.new('thumb.02.R')
    bone.head[:] = -0.6857, 0.0015, 1.2404
    bone.tail[:] = -0.7056, -0.0057, 1.2145
    bone.roll = 0.4798
    tmp = srcBones['thumb02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.R']]
    bones['thumb.02.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.R')
    bone.head[:] = -0.7762, 0.0233, 1.2058
    bone.tail[:] = -0.7851, 0.0218, 1.1749
    bone.roll = 1.8283
    tmp = srcBones['middle02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.R']]
    bones['f_middle.02.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.R')
    bone.head[:] = -0.7715, 0.0499, 1.207
    bone.tail[:] = -0.7794, 0.0494, 1.1762
    bone.roll = 1.8946
    tmp = srcBones['ring02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.R']]
    bones['f_ring.02.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.R')
    bone.head[:] = -0.7589, 0.0765, 1.2156
    bone.tail[:] = -0.7618, 0.077, 1.1932
    bone.roll = 1.9059
    tmp = srcBones['pinky02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.R']]
    bones['f_pinky.02.R'] = bone.name
    bone = arm.edit_bones.new('f_index.03.L')
    bone.head[:] = 0.784, -0.0003, 1.1858
    bone.tail[:] = 0.7892, 0.0006, 1.1636
    bone.roll = -1.676
    tmp = srcBones['index03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.L']]
    bones['f_index.03.L'] = bone.name
    bone = arm.edit_bones.new('thumb.03.L')
    bone.head[:] = 0.7056, -0.0057, 1.2145
    bone.tail[:] = 0.7194, -0.0098, 1.1995
    bone.roll = -0.5826
    tmp = srcBones['thumb03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.L']]
    bones['thumb.03.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.L')
    bone.head[:] = 0.7851, 0.0218, 1.1749
    bone.tail[:] = 0.7888, 0.0216, 1.1525
    bone.roll = -1.7483
    tmp = srcBones['middle03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.L']]
    bones['f_middle.03.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.L')
    bone.head[:] = 0.7794, 0.0494, 1.1762
    bone.tail[:] = 0.7781, 0.0498, 1.1577
    bone.roll = -1.6582
    tmp = srcBones['ring03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.L']]
    bones['f_ring.03.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.L')
    bone.head[:] = 0.7618, 0.077, 1.1932
    bone.tail[:] = 0.7611, 0.0772, 1.1782
    bone.roll = -1.7639
    tmp = srcBones['pinky03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.L']]
    bones['f_pinky.03.L'] = bone.name
    bone = arm.edit_bones.new('f_index.03.R')
    bone.head[:] = -0.784, -0.0003, 1.1858
    bone.tail[:] = -0.7892, 0.0006, 1.1636
    bone.roll = 1.676
    tmp = srcBones['index03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.R']]
    bones['f_index.03.R'] = bone.name
    bone = arm.edit_bones.new('thumb.03.R')
    bone.head[:] = -0.7056, -0.0057, 1.2145
    bone.tail[:] = -0.7194, -0.0098, 1.1995
    bone.roll = 0.5826
    tmp = srcBones['thumb03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.R']]
    bones['thumb.03.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.R')
    bone.head[:] = -0.7851, 0.0218, 1.1749
    bone.tail[:] = -0.7888, 0.0216, 1.1525
    bone.roll = 1.7483
    tmp = srcBones['middle03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.R']]
    bones['f_middle.03.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.R')
    bone.head[:] = -0.7794, 0.0494, 1.1762
    bone.tail[:] = -0.7781, 0.0498, 1.1577
    bone.roll = 1.6582
    tmp = srcBones['ring03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.R']]
    bones['f_ring.03.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.R')
    bone.head[:] = -0.7618, 0.077, 1.1932
    bone.tail[:] = -0.7611, 0.0772, 1.1782
    bone.roll = 1.7639
    tmp = srcBones['pinky03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.R']]
    bones['f_pinky.03.R'] = bone.name
    bpy.ops.object.mode_set(mode='OBJECT')
    pbone = obj.pose.bones[bones['spine']]
    pbone.rigify_type = 'spines.super_spine'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.neck_pos = 4
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            True, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.001']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thigh.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.limb_type = 'leg'
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, True, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, False, 
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thigh.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, True, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, True, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.limb_type = 'leg'
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.002']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.003']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.004']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shoulder.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['shoulder.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['breast.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['breast.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.005']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['upper_arm.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, True, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, True, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['upper_arm.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, True, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, True, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['forearm.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['forearm.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.L']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.R']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    bpy.ops.object.mode_set(mode='EDIT')
    for bone in arm.edit_bones:
        bone.select = False
        bone.select_head = False
        bone.select_tail = False
    for b in bones:
        bone = arm.edit_bones[bones[b]]
        bone.select = True
        bone.select_head = True
        bone.select_tail = True
        arm.edit_bones.active = bone
    arm.layers = [(x in [3, 5, 7, 10, 13, 16]) for x in range(32)]


<mask token>

<mask token>
1


def create(obj, srcBones):
    bpy.ops.object.mode_set(mode='EDIT')
    arm = obj.data
    for i in range(12):
        arm.rigify_colors.add()
    arm.rigify_colors[0].name = 'Root'
    arm.rigify_colors[0].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[0].normal = Color((0.4352940022945404, 
        0.18431399762630463, 0.4156860113143921))
    arm.rigify_colors[0].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[0].standard_colors_lock = True
    arm.rigify_colors[1].name = 'IK'
    arm.rigify_colors[1].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[1].normal = Color((0.6039220094680786, 0.0, 0.0))
    arm.rigify_colors[1].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[1].standard_colors_lock = True
    arm.rigify_colors[2].name = 'Special'
    arm.rigify_colors[2].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[2].normal = Color((0.9568629860877991, 
        0.7882350087165833, 0.04705899953842163))
    arm.rigify_colors[2].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[2].standard_colors_lock = True
    arm.rigify_colors[3].name = 'Tweak'
    arm.rigify_colors[3].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[3].normal = Color((0.03921600058674812, 
        0.21176500618457794, 0.5803920030593872))
    arm.rigify_colors[3].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[3].standard_colors_lock = True
    arm.rigify_colors[4].name = 'FK'
    arm.rigify_colors[4].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[4].normal = Color((0.11764699965715408, 
        0.5686269998550415, 0.035294000059366226))
    arm.rigify_colors[4].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[4].standard_colors_lock = True
    arm.rigify_colors[5].name = 'Extra'
    arm.rigify_colors[5].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[5].normal = Color((0.9686279892921448, 
        0.2509799897670746, 0.09411799907684326))
    arm.rigify_colors[5].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[5].standard_colors_lock = True
    arm.rigify_colors[6].name = ' '
    arm.rigify_colors[6].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].standard_colors_lock = True
    arm.rigify_colors[7].name = ' '
    arm.rigify_colors[7].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].standard_colors_lock = True
    arm.rigify_colors[8].name = ' '
    arm.rigify_colors[8].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].standard_colors_lock = True
    arm.rigify_colors[9].name = ' '
    arm.rigify_colors[9].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].standard_colors_lock = True
    arm.rigify_colors[10].name = ' '
    arm.rigify_colors[10].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].standard_colors_lock = True
    arm.rigify_colors[11].name = ' '
    arm.rigify_colors[11].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].standard_colors_lock = True
    for i in range(58):
        arm.rigify_layers.add()
    arm.rigify_layers[0].name = 'Face'
    arm.rigify_layers[0].row = 1
    arm.rigify_layers[0].set = False
    arm.rigify_layers[0].group = 5
    arm.rigify_layers[1].name = 'Face (Primary)'
    arm.rigify_layers[1].row = 2
    arm.rigify_layers[1].set = False
    arm.rigify_layers[1].group = 2
    arm.rigify_layers[2].name = 'Face (Secondary)'
    arm.rigify_layers[2].row = 2
    arm.rigify_layers[2].set = False
    arm.rigify_layers[2].group = 3
    arm.rigify_layers[3].name = 'Torso'
    arm.rigify_layers[3].row = 3
    arm.rigify_layers[3].set = False
    arm.rigify_layers[3].group = 3
    arm.rigify_layers[4].name = 'Torso (Tweak)'
    arm.rigify_layers[4].row = 4
    arm.rigify_layers[4].set = False
    arm.rigify_layers[4].group = 4
    arm.rigify_layers[5].name = 'Fingers'
    arm.rigify_layers[5].row = 5
    arm.rigify_layers[5].set = False
    arm.rigify_layers[5].group = 6
    arm.rigify_layers[6].name = 'Fingers (Tweak)'
    arm.rigify_layers[6].row = 6
    arm.rigify_layers[6].set = False
    arm.rigify_layers[6].group = 4
    arm.rigify_layers[7].name = 'Arm.L (IK)'
    arm.rigify_layers[7].row = 7
    arm.rigify_layers[7].set = False
    arm.rigify_layers[7].group = 2
    arm.rigify_layers[8].name = 'Arm.L (FK)'
    arm.rigify_layers[8].row = 8
    arm.rigify_layers[8].set = False
    arm.rigify_layers[8].group = 5
    arm.rigify_layers[9].name = 'Arm.L (Tweak)'
    arm.rigify_layers[9].row = 9
    arm.rigify_layers[9].set = False
    arm.rigify_layers[9].group = 4
    arm.rigify_layers[10].name = 'Arm.R (IK)'
    arm.rigify_layers[10].row = 7
    arm.rigify_layers[10].set = False
    arm.rigify_layers[10].group = 2
    arm.rigify_layers[11].name = 'Arm.R (FK)'
    arm.rigify_layers[11].row = 8
    arm.rigify_layers[11].set = False
    arm.rigify_layers[11].group = 5
    arm.rigify_layers[12].name = 'Arm.R (Tweak)'
    arm.rigify_layers[12].row = 9
    arm.rigify_layers[12].set = False
    arm.rigify_layers[12].group = 4
    arm.rigify_layers[13].name = 'Leg.L (IK)'
    arm.rigify_layers[13].row = 10
    arm.rigify_layers[13].set = False
    arm.rigify_layers[13].group = 2
    arm.rigify_layers[14].name = 'Leg.L (FK)'
    arm.rigify_layers[14].row = 11
    arm.rigify_layers[14].set = False
    arm.rigify_layers[14].group = 5
    arm.rigify_layers[15].name = 'Leg.L (Tweak)'
    arm.rigify_layers[15].row = 12
    arm.rigify_layers[15].set = False
    arm.rigify_layers[15].group = 4
    arm.rigify_layers[16].name = 'Leg.R (IK)'
    arm.rigify_layers[16].row = 10
    arm.rigify_layers[16].set = False
    arm.rigify_layers[16].group = 2
    arm.rigify_layers[17].name = 'Leg.R (FK)'
    arm.rigify_layers[17].row = 11
    arm.rigify_layers[17].set = False
    arm.rigify_layers[17].group = 5
    arm.rigify_layers[18].name = 'Leg.R (Tweak)'
    arm.rigify_layers[18].row = 12
    arm.rigify_layers[18].set = False
    arm.rigify_layers[18].group = 4
    arm.rigify_layers[19].name = ''
    arm.rigify_layers[19].row = 1
    arm.rigify_layers[19].set = False
    arm.rigify_layers[19].group = 0
    arm.rigify_layers[20].name = ''
    arm.rigify_layers[20].row = 1
    arm.rigify_layers[20].set = False
    arm.rigify_layers[20].group = 0
    arm.rigify_layers[21].name = ''
    arm.rigify_layers[21].row = 1
    arm.rigify_layers[21].set = False
    arm.rigify_layers[21].group = 0
    arm.rigify_layers[22].name = ''
    arm.rigify_layers[22].row = 1
    arm.rigify_layers[22].set = False
    arm.rigify_layers[22].group = 0
    arm.rigify_layers[23].name = ''
    arm.rigify_layers[23].row = 1
    arm.rigify_layers[23].set = False
    arm.rigify_layers[23].group = 0
    arm.rigify_layers[24].name = ''
    arm.rigify_layers[24].row = 1
    arm.rigify_layers[24].set = False
    arm.rigify_layers[24].group = 0
    arm.rigify_layers[25].name = ''
    arm.rigify_layers[25].row = 1
    arm.rigify_layers[25].set = False
    arm.rigify_layers[25].group = 0
    arm.rigify_layers[26].name = ''
    arm.rigify_layers[26].row = 1
    arm.rigify_layers[26].set = False
    arm.rigify_layers[26].group = 0
    arm.rigify_layers[27].name = ''
    arm.rigify_layers[27].row = 1
    arm.rigify_layers[27].set = False
    arm.rigify_layers[27].group = 0
    arm.rigify_layers[28].name = 'Root'
    arm.rigify_layers[28].row = 14
    arm.rigify_layers[28].set = False
    arm.rigify_layers[28].group = 1
    arm.rigify_layers[29].name = ' '
    arm.rigify_layers[29].row = 1
    arm.rigify_layers[29].set = False
    arm.rigify_layers[29].group = 0
    arm.rigify_layers[30].name = ' '
    arm.rigify_layers[30].row = 1
    arm.rigify_layers[30].set = False
    arm.rigify_layers[30].group = 0
    arm.rigify_layers[31].name = ' '
    arm.rigify_layers[31].row = 1
    arm.rigify_layers[31].set = False
    arm.rigify_layers[31].group = 0
    arm.rigify_layers[32].name = ' '
    arm.rigify_layers[32].row = 1
    arm.rigify_layers[32].set = False
    arm.rigify_layers[32].group = 0
    arm.rigify_layers[33].name = ' '
    arm.rigify_layers[33].row = 1
    arm.rigify_layers[33].set = False
    arm.rigify_layers[33].group = 0
    arm.rigify_layers[34].name = ' '
    arm.rigify_layers[34].row = 1
    arm.rigify_layers[34].set = False
    arm.rigify_layers[34].group = 0
    arm.rigify_layers[35].name = ' '
    arm.rigify_layers[35].row = 1
    arm.rigify_layers[35].set = False
    arm.rigify_layers[35].group = 0
    arm.rigify_layers[36].name = ' '
    arm.rigify_layers[36].row = 1
    arm.rigify_layers[36].set = False
    arm.rigify_layers[36].group = 0
    arm.rigify_layers[37].name = ' '
    arm.rigify_layers[37].row = 1
    arm.rigify_layers[37].set = False
    arm.rigify_layers[37].group = 0
    arm.rigify_layers[38].name = ' '
    arm.rigify_layers[38].row = 1
    arm.rigify_layers[38].set = False
    arm.rigify_layers[38].group = 0
    arm.rigify_layers[39].name = ' '
    arm.rigify_layers[39].row = 1
    arm.rigify_layers[39].set = False
    arm.rigify_layers[39].group = 0
    arm.rigify_layers[40].name = ' '
    arm.rigify_layers[40].row = 1
    arm.rigify_layers[40].set = False
    arm.rigify_layers[40].group = 0
    arm.rigify_layers[41].name = ' '
    arm.rigify_layers[41].row = 1
    arm.rigify_layers[41].set = False
    arm.rigify_layers[41].group = 0
    arm.rigify_layers[42].name = ' '
    arm.rigify_layers[42].row = 1
    arm.rigify_layers[42].set = False
    arm.rigify_layers[42].group = 0
    arm.rigify_layers[43].name = ' '
    arm.rigify_layers[43].row = 1
    arm.rigify_layers[43].set = False
    arm.rigify_layers[43].group = 0
    arm.rigify_layers[44].name = ' '
    arm.rigify_layers[44].row = 1
    arm.rigify_layers[44].set = False
    arm.rigify_layers[44].group = 0
    arm.rigify_layers[45].name = ' '
    arm.rigify_layers[45].row = 1
    arm.rigify_layers[45].set = False
    arm.rigify_layers[45].group = 0
    arm.rigify_layers[46].name = ' '
    arm.rigify_layers[46].row = 1
    arm.rigify_layers[46].set = False
    arm.rigify_layers[46].group = 0
    arm.rigify_layers[47].name = ' '
    arm.rigify_layers[47].row = 1
    arm.rigify_layers[47].set = False
    arm.rigify_layers[47].group = 0
    arm.rigify_layers[48].name = ' '
    arm.rigify_layers[48].row = 1
    arm.rigify_layers[48].set = False
    arm.rigify_layers[48].group = 0
    arm.rigify_layers[49].name = ' '
    arm.rigify_layers[49].row = 1
    arm.rigify_layers[49].set = False
    arm.rigify_layers[49].group = 0
    arm.rigify_layers[50].name = ' '
    arm.rigify_layers[50].row = 1
    arm.rigify_layers[50].set = False
    arm.rigify_layers[50].group = 0
    arm.rigify_layers[51].name = ' '
    arm.rigify_layers[51].row = 1
    arm.rigify_layers[51].set = False
    arm.rigify_layers[51].group = 0
    arm.rigify_layers[52].name = ' '
    arm.rigify_layers[52].row = 1
    arm.rigify_layers[52].set = False
    arm.rigify_layers[52].group = 0
    arm.rigify_layers[53].name = ' '
    arm.rigify_layers[53].row = 1
    arm.rigify_layers[53].set = False
    arm.rigify_layers[53].group = 0
    arm.rigify_layers[54].name = ' '
    arm.rigify_layers[54].row = 1
    arm.rigify_layers[54].set = False
    arm.rigify_layers[54].group = 0
    arm.rigify_layers[55].name = ' '
    arm.rigify_layers[55].row = 1
    arm.rigify_layers[55].set = False
    arm.rigify_layers[55].group = 0
    arm.rigify_layers[56].name = ' '
    arm.rigify_layers[56].row = 1
    arm.rigify_layers[56].set = False
    arm.rigify_layers[56].group = 0
    arm.rigify_layers[57].name = ' '
    arm.rigify_layers[57].row = 1
    arm.rigify_layers[57].set = False
    arm.rigify_layers[57].group = 0
    bones = {}
    bone = arm.edit_bones.new('spine')
    bone.head[:] = srcBones['pelvis']['head']
    bone.tail[:] = srcBones['pelvis']['tail']
    bone.roll = srcBones['pelvis']['roll']
    bone.use_connect = False
    bones['spine'] = bone.name
    bone = arm.edit_bones.new('spine.001')
    tmp = srcBones['spine01']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine']]
    bones['spine.001'] = bone.name
    bone = arm.edit_bones.new('thigh.L')
    bone.head[:] = 0.098, 0.0124, 1.072
    bone.tail[:] = 0.098, -0.0286, 0.5372
    bone.roll = 0.0
    tmp = srcBones['thigh_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.L'] = bone.name
    bone = arm.edit_bones.new('thigh.R')
    bone.head[:] = -0.098, 0.0124, 1.072
    bone.tail[:] = -0.098, -0.0286, 0.5372
    bone.roll = 0.0
    tmp = srcBones['thigh_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.R'] = bone.name
    bone = arm.edit_bones.new('spine.002')
    bone.head[:] = 0.0, 0.0004, 1.2929
    bone.tail[:] = 0.0, 0.0059, 1.4657
    bone.roll = 0.0
    tmp = srcBones['spine02']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.001']]
    bones['spine.002'] = bone.name
    bone = arm.edit_bones.new('shin.L')
    bone.head[:] = 0.098, -0.0286, 0.5372
    bone.tail[:] = 0.098, 0.0162, 0.0852
    bone.roll = 0.0
    tmp = srcBones['calf_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.L']]
    bones['shin.L'] = bone.name
    bone = arm.edit_bones.new('shin.R')
    bone.head[:] = -0.098, -0.0286, 0.5372
    bone.tail[:] = -0.098, 0.0162, 0.0852
    bone.roll = 0.0
    tmp = srcBones['calf_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.R']]
    bones['shin.R'] = bone.name
    bone = arm.edit_bones.new('spine.003')
    bone.head[:] = 0.0, 0.0059, 1.4657
    bone.tail[:] = 0.0, 0.0114, 1.6582
    bone.roll = 0.0
    tmp = srcBones['spine03']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.002']]
    bones['spine.003'] = bone.name
    bone = arm.edit_bones.new('foot.L')
    bone.head[:] = 0.098, 0.0162, 0.0852
    bone.tail[:] = 0.098, -0.0934, 0.0167
    bone.roll = 0.0
    tmp = srcBones['foot_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.L']]
    bones['foot.L'] = bone.name
    bone = arm.edit_bones.new('foot.R')
    bone.head[:] = -0.098, 0.0162, 0.0852
    bone.tail[:] = -0.098, -0.0934, 0.0167
    bone.roll = -0.0
    tmp = srcBones['foot_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.R']]
    bones['foot.R'] = bone.name
    bone = arm.edit_bones.new('spine.004')
    bone.head[:] = 0.0, 0.0114, 1.6582
    bone.tail[:] = 0.0, -0.013, 1.7197
    bone.roll = 0.0
    tmp = srcBones['neck']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['spine.004'] = bone.name
    bone = arm.edit_bones.new('shoulder.L')
    bone.head[:] = 0.0183, -0.0684, 1.6051
    bone.tail[:] = 0.1694, 0.0205, 1.605
    bone.roll = 0.0004
    tmp = srcBones['clavicle_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.L'] = bone.name
    bone = arm.edit_bones.new('shoulder.R')
    bone.head[:] = -0.0183, -0.0684, 1.6051
    bone.tail[:] = -0.1694, 0.0205, 1.605
    bone.roll = -0.0004
    tmp = srcBones['clavicle_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.R'] = bone.name
    bone = arm.edit_bones.new('breast.L')
    bone.head[:] = 0.1184, 0.0485, 1.4596
    bone.tail[:] = 0.1184, -0.0907, 1.4596
    bone.roll = 0.0
    tmp = srcBones['breast_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.L'] = bone.name
    bone = arm.edit_bones.new('breast.R')
    bone.head[:] = -0.1184, 0.0485, 1.4596
    bone.tail[:] = -0.1184, -0.0907, 1.4596
    bone.roll = -0.0
    tmp = srcBones['breast_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.R'] = bone.name
    bone = arm.edit_bones.new('toe.L')
    bone.head[:] = 0.098, -0.0934, 0.0167
    bone.tail[:] = 0.098, -0.1606, 0.0167
    bone.roll = -0.0
    tmp = srcBones['toes_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['toe.L'] = bone.name
    bone = arm.edit_bones.new('heel.02.L')
    bone.head[:] = 0.06, 0.0459, 0.0
    bone.tail[:] = 0.14, 0.0459, 0.0
    bone.roll = 0.0
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['heel.02.L'] = bone.name
    bone = arm.edit_bones.new('toe.R')
    bone.head[:] = -0.098, -0.0934, 0.0167
    bone.tail[:] = -0.098, -0.1606, 0.0167
    bone.roll = 0.0
    tmp = srcBones['toes_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['toe.R'] = bone.name
    bone = arm.edit_bones.new('heel.02.R')
    bone.head[:] = -0.06, 0.0459, 0.0
    bone.tail[:] = -0.14, 0.0459, 0.0
    bone.roll = -0.0
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['heel.02.R'] = bone.name
    bone = arm.edit_bones.new('spine.005')
    bone.head[:] = 0.0, -0.013, 1.7197
    bone.tail[:] = 0.0, -0.0247, 1.7813
    bone.roll = 0.0
    tmp = srcBones['head']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.004']]
    bones['spine.005'] = bone.name
    bone = arm.edit_bones.new('upper_arm.L')
    bone.head[:] = 0.1953, 0.0267, 1.5846
    bone.tail[:] = 0.4424, 0.0885, 1.4491
    bone.roll = 2.0724
    tmp = srcBones['upperarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.L']]
    bones['upper_arm.L'] = bone.name
    bone = arm.edit_bones.new('upper_arm.R')
    bone.head[:] = -0.1953, 0.0267, 1.5846
    bone.tail[:] = -0.4424, 0.0885, 1.4491
    bone.roll = -2.0724
    tmp = srcBones['upperarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.R']]
    bones['upper_arm.R'] = bone.name
    bone = arm.edit_bones.new('forearm.L')
    bone.head[:] = 0.4424, 0.0885, 1.4491
    bone.tail[:] = 0.6594, 0.0492, 1.3061
    bone.roll = 2.1535
    tmp = srcBones['lowerarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.L']]
    bones['forearm.L'] = bone.name
    bone = arm.edit_bones.new('forearm.R')
    bone.head[:] = -0.4424, 0.0885, 1.4491
    bone.tail[:] = -0.6594, 0.0492, 1.3061
    bone.roll = -2.1535
    tmp = srcBones['lowerarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.R']]
    bones['forearm.R'] = bone.name
    bone = arm.edit_bones.new('hand.L')
    bone.head[:] = 0.6594, 0.0492, 1.3061
    bone.tail[:] = 0.7234, 0.0412, 1.2585
    bone.roll = 2.2103
    tmp = srcBones['hand_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.L']]
    bones['hand.L'] = bone.name
    bone = arm.edit_bones.new('hand.R')
    bone.head[:] = -0.6594, 0.0492, 1.3061
    bone.tail[:] = -0.7234, 0.0412, 1.2585
    bone.roll = -2.2103
    tmp = srcBones['hand_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.R']]
    bones['hand.R'] = bone.name
    bone = arm.edit_bones.new('palm.01.L')
    bone.head[:] = 0.6921, 0.0224, 1.2882
    bone.tail[:] = 0.7464, 0.0051, 1.2482
    bone.roll = -2.4928
    tmp = srcBones['index00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.01.L'] = bone.name
    bone = arm.edit_bones.new('palm.02.L')
    bone.head[:] = 0.697, 0.0389, 1.2877
    bone.tail[:] = 0.7518, 0.0277, 1.2487
    bone.roll = -2.5274
    tmp = srcBones['middle00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.02.L'] = bone.name
    bone = arm.edit_bones.new('palm.03.L')
    bone.head[:] = 0.6963, 0.0545, 1.2874
    bone.tail[:] = 0.754, 0.0521, 1.2482
    bone.roll = -2.5843
    tmp = srcBones['ring00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.03.L'] = bone.name
    bone = arm.edit_bones.new('palm.04.L')
    bone.head[:] = 0.6929, 0.0696, 1.2871
    bone.tail[:] = 0.7528, 0.0763, 1.2428
    bone.roll = -2.5155
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.04.L'] = bone.name
    bone = arm.edit_bones.new('palm.01.R')
    bone.head[:] = -0.6921, 0.0224, 1.2882
    bone.tail[:] = -0.7464, 0.0051, 1.2482
    bone.roll = 2.4928
    tmp = srcBones['index00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.01.R'] = bone.name
    bone = arm.edit_bones.new('palm.02.R')
    bone.head[:] = -0.697, 0.0389, 1.2877
    bone.tail[:] = -0.7518, 0.0277, 1.2487
    bone.roll = 2.5274
    tmp = srcBones['middle00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.02.R'] = bone.name
    bone = arm.edit_bones.new('palm.03.R')
    bone.head[:] = -0.6963, 0.0544, 1.2874
    bone.tail[:] = -0.754, 0.0521, 1.2482
    bone.roll = 2.5843
    tmp = srcBones['ring00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.03.R'] = bone.name
    bone = arm.edit_bones.new('palm.04.R')
    bone.head[:] = -0.6929, 0.0696, 1.2871
    bone.tail[:] = -0.7528, 0.0763, 1.2428
    bone.roll = 2.5155
    tmp = srcBones['pinky00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.04.R'] = bone.name
    bone = arm.edit_bones.new('f_index.01.L')
    bone.head[:] = 0.7464, 0.0051, 1.2482
    bone.tail[:] = 0.7718, 0.0013, 1.2112
    bone.roll = -2.0315
    tmp = srcBones['index01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['f_index.01.L'] = bone.name
    bone = arm.edit_bones.new('thumb.01.L')
    bone.head[:] = 0.6705, 0.0214, 1.2738
    bone.tail[:] = 0.6857, 0.0015, 1.2404
    bone.roll = -0.1587
    tmp = srcBones['thumb01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['thumb.01.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.L')
    bone.head[:] = 0.7518, 0.0277, 1.2487
    bone.tail[:] = 0.7762, 0.0234, 1.2058
    bone.roll = -2.0067
    tmp = srcBones['middle01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.L']]
    bones['f_middle.01.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.L')
    bone.head[:] = 0.754, 0.0521, 1.2482
    bone.tail[:] = 0.7715, 0.0499, 1.207
    bone.roll = -2.0082
    tmp = srcBones['ring01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.L']]
    bones['f_ring.01.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.L')
    bone.head[:] = 0.7528, 0.0763, 1.2428
    bone.tail[:] = 0.7589, 0.0765, 1.2156
    bone.roll = -1.9749
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.L']]
    bones['f_pinky.01.L'] = bone.name
    bone = arm.edit_bones.new('f_index.01.R')
    bone.head[:] = -0.7464, 0.0051, 1.2482
    bone.tail[:] = -0.7718, 0.0012, 1.2112
    bone.roll = 2.0315
    tmp = srcBones['index01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['f_index.01.R'] = bone.name
    bone = arm.edit_bones.new('thumb.01.R')
    bone.head[:] = -0.6705, 0.0214, 1.2738
    bone.tail[:] = -0.6857, 0.0015, 1.2404
    bone.roll = 0.1587
    tmp = srcBones['thumb01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['thumb.01.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.R')
    bone.head[:] = -0.7518, 0.0277, 1.2487
    bone.tail[:] = -0.7762, 0.0233, 1.2058
    bone.roll = 2.0067
    tmp = srcBones['middle01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.R']]
    bones['f_middle.01.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.R')
    bone.head[:] = -0.754, 0.0521, 1.2482
    bone.tail[:] = -0.7715, 0.0499, 1.207
    bone.roll = 2.0082
    tmp = srcBones['ring01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.R']]
    bones['f_ring.01.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.R')
    bone.head[:] = -0.7528, 0.0763, 1.2428
    bone.tail[:] = -0.7589, 0.0765, 1.2156
    bone.roll = 1.9749
    tmp = srcBones['pinky01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.R']]
    bones['f_pinky.01.R'] = bone.name
    bone = arm.edit_bones.new('f_index.02.L')
    bone.head[:] = 0.7718, 0.0013, 1.2112
    bone.tail[:] = 0.784, -0.0003, 1.1858
    bone.roll = -1.8799
    tmp = srcBones['index02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.L']]
    bones['f_index.02.L'] = bone.name
    bone = arm.edit_bones.new('thumb.02.L')
    bone.head[:] = 0.6857, 0.0015, 1.2404
    bone.tail[:] = 0.7056, -0.0057, 1.2145
    bone.roll = -0.4798
    tmp = srcBones['thumb02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.L']]
    bones['thumb.02.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.L')
    bone.head[:] = 0.7762, 0.0234, 1.2058
    bone.tail[:] = 0.7851, 0.0218, 1.1749
    bone.roll = -1.8283
    tmp = srcBones['middle02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.L']]
    bones['f_middle.02.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.L')
    bone.head[:] = 0.7715, 0.0499, 1.207
    bone.tail[:] = 0.7794, 0.0494, 1.1762
    bone.roll = -1.8946
    tmp = srcBones['ring02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.L']]
    bones['f_ring.02.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.L')
    bone.head[:] = 0.7589, 0.0765, 1.2156
    bone.tail[:] = 0.7618, 0.077, 1.1932
    bone.roll = -1.9059
    tmp = srcBones['pinky02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.L']]
    bones['f_pinky.02.L'] = bone.name
    bone = arm.edit_bones.new('f_index.02.R')
    bone.head[:] = -0.7718, 0.0012, 1.2112
    bone.tail[:] = -0.784, -0.0003, 1.1858
    bone.roll = 1.8799
    tmp = srcBones['index02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.R']]
    bones['f_index.02.R'] = bone.name
    bone = arm.edit_bones.new('thumb.02.R')
    bone.head[:] = -0.6857, 0.0015, 1.2404
    bone.tail[:] = -0.7056, -0.0057, 1.2145
    bone.roll = 0.4798
    tmp = srcBones['thumb02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.R']]
    bones['thumb.02.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.R')
    bone.head[:] = -0.7762, 0.0233, 1.2058
    bone.tail[:] = -0.7851, 0.0218, 1.1749
    bone.roll = 1.8283
    tmp = srcBones['middle02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.R']]
    bones['f_middle.02.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.R')
    bone.head[:] = -0.7715, 0.0499, 1.207
    bone.tail[:] = -0.7794, 0.0494, 1.1762
    bone.roll = 1.8946
    tmp = srcBones['ring02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.R']]
    bones['f_ring.02.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.R')
    bone.head[:] = -0.7589, 0.0765, 1.2156
    bone.tail[:] = -0.7618, 0.077, 1.1932
    bone.roll = 1.9059
    tmp = srcBones['pinky02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.R']]
    bones['f_pinky.02.R'] = bone.name
    bone = arm.edit_bones.new('f_index.03.L')
    bone.head[:] = 0.784, -0.0003, 1.1858
    bone.tail[:] = 0.7892, 0.0006, 1.1636
    bone.roll = -1.676
    tmp = srcBones['index03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.L']]
    bones['f_index.03.L'] = bone.name
    bone = arm.edit_bones.new('thumb.03.L')
    bone.head[:] = 0.7056, -0.0057, 1.2145
    bone.tail[:] = 0.7194, -0.0098, 1.1995
    bone.roll = -0.5826
    tmp = srcBones['thumb03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.L']]
    bones['thumb.03.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.L')
    bone.head[:] = 0.7851, 0.0218, 1.1749
    bone.tail[:] = 0.7888, 0.0216, 1.1525
    bone.roll = -1.7483
    tmp = srcBones['middle03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.L']]
    bones['f_middle.03.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.L')
    bone.head[:] = 0.7794, 0.0494, 1.1762
    bone.tail[:] = 0.7781, 0.0498, 1.1577
    bone.roll = -1.6582
    tmp = srcBones['ring03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.L']]
    bones['f_ring.03.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.L')
    bone.head[:] = 0.7618, 0.077, 1.1932
    bone.tail[:] = 0.7611, 0.0772, 1.1782
    bone.roll = -1.7639
    tmp = srcBones['pinky03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.L']]
    bones['f_pinky.03.L'] = bone.name
    bone = arm.edit_bones.new('f_index.03.R')
    bone.head[:] = -0.784, -0.0003, 1.1858
    bone.tail[:] = -0.7892, 0.0006, 1.1636
    bone.roll = 1.676
    tmp = srcBones['index03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.R']]
    bones['f_index.03.R'] = bone.name
    bone = arm.edit_bones.new('thumb.03.R')
    bone.head[:] = -0.7056, -0.0057, 1.2145
    bone.tail[:] = -0.7194, -0.0098, 1.1995
    bone.roll = 0.5826
    tmp = srcBones['thumb03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.R']]
    bones['thumb.03.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.R')
    bone.head[:] = -0.7851, 0.0218, 1.1749
    bone.tail[:] = -0.7888, 0.0216, 1.1525
    bone.roll = 1.7483
    tmp = srcBones['middle03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.R']]
    bones['f_middle.03.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.R')
    bone.head[:] = -0.7794, 0.0494, 1.1762
    bone.tail[:] = -0.7781, 0.0498, 1.1577
    bone.roll = 1.6582
    tmp = srcBones['ring03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.R']]
    bones['f_ring.03.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.R')
    bone.head[:] = -0.7618, 0.077, 1.1932
    bone.tail[:] = -0.7611, 0.0772, 1.1782
    bone.roll = 1.7639
    tmp = srcBones['pinky03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.R']]
    bones['f_pinky.03.R'] = bone.name
    bpy.ops.object.mode_set(mode='OBJECT')
    pbone = obj.pose.bones[bones['spine']]
    pbone.rigify_type = 'spines.super_spine'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.neck_pos = 4
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            True, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.001']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thigh.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.limb_type = 'leg'
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, True, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, False, 
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thigh.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, True, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, True, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.limb_type = 'leg'
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.002']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.003']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.004']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shoulder.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['shoulder.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['breast.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['breast.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.005']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['upper_arm.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, True, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, True, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['upper_arm.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, True, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, True, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['forearm.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['forearm.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.L']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.R']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    bpy.ops.object.mode_set(mode='EDIT')
    for bone in arm.edit_bones:
        bone.select = False
        bone.select_head = False
        bone.select_tail = False
    for b in bones:
        bone = arm.edit_bones[bones[b]]
        bone.select = True
        bone.select_head = True
        bone.select_tail = True
        arm.edit_bones.active = bone
    arm.layers = [(x in [3, 5, 7, 10, 13, 16]) for x in range(32)]


print('Sadfsdfasdf')
<mask token>
print(mblName)
<mask token>
print(armature)
<mask token>
bpy.ops.object.mode_set(mode='EDIT')
for b in bpy.context.object.data.edit_bones:
    boneData[b.name] = {'roll': b.roll, 'head': b.head, 'tail': b.tail}
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action='DESELECT')
if __name__ == '__main__':
    amt = bpy.data.armatures.new('ArmatureTest')
    ob = bpy.data.objects.new('ObjectTest2', amt)
    scn = bpy.context.scene
    scn.objects.link(ob)
    scn.objects.active = ob
    ob.select = True
    print(boneData['pelvis'])
    create(ob, boneData)

<mask token>
1


def create(obj, srcBones):
    bpy.ops.object.mode_set(mode='EDIT')
    arm = obj.data
    for i in range(12):
        arm.rigify_colors.add()
    arm.rigify_colors[0].name = 'Root'
    arm.rigify_colors[0].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[0].normal = Color((0.4352940022945404, 
        0.18431399762630463, 0.4156860113143921))
    arm.rigify_colors[0].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[0].standard_colors_lock = True
    arm.rigify_colors[1].name = 'IK'
    arm.rigify_colors[1].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[1].normal = Color((0.6039220094680786, 0.0, 0.0))
    arm.rigify_colors[1].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[1].standard_colors_lock = True
    arm.rigify_colors[2].name = 'Special'
    arm.rigify_colors[2].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[2].normal = Color((0.9568629860877991, 
        0.7882350087165833, 0.04705899953842163))
    arm.rigify_colors[2].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[2].standard_colors_lock = True
    arm.rigify_colors[3].name = 'Tweak'
    arm.rigify_colors[3].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[3].normal = Color((0.03921600058674812, 
        0.21176500618457794, 0.5803920030593872))
    arm.rigify_colors[3].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[3].standard_colors_lock = True
    arm.rigify_colors[4].name = 'FK'
    arm.rigify_colors[4].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[4].normal = Color((0.11764699965715408, 
        0.5686269998550415, 0.035294000059366226))
    arm.rigify_colors[4].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[4].standard_colors_lock = True
    arm.rigify_colors[5].name = 'Extra'
    arm.rigify_colors[5].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[5].normal = Color((0.9686279892921448, 
        0.2509799897670746, 0.09411799907684326))
    arm.rigify_colors[5].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[5].standard_colors_lock = True
    arm.rigify_colors[6].name = ' '
    arm.rigify_colors[6].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].standard_colors_lock = True
    arm.rigify_colors[7].name = ' '
    arm.rigify_colors[7].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].standard_colors_lock = True
    arm.rigify_colors[8].name = ' '
    arm.rigify_colors[8].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].standard_colors_lock = True
    arm.rigify_colors[9].name = ' '
    arm.rigify_colors[9].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].standard_colors_lock = True
    arm.rigify_colors[10].name = ' '
    arm.rigify_colors[10].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].standard_colors_lock = True
    arm.rigify_colors[11].name = ' '
    arm.rigify_colors[11].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].standard_colors_lock = True
    for i in range(58):
        arm.rigify_layers.add()
    arm.rigify_layers[0].name = 'Face'
    arm.rigify_layers[0].row = 1
    arm.rigify_layers[0].set = False
    arm.rigify_layers[0].group = 5
    arm.rigify_layers[1].name = 'Face (Primary)'
    arm.rigify_layers[1].row = 2
    arm.rigify_layers[1].set = False
    arm.rigify_layers[1].group = 2
    arm.rigify_layers[2].name = 'Face (Secondary)'
    arm.rigify_layers[2].row = 2
    arm.rigify_layers[2].set = False
    arm.rigify_layers[2].group = 3
    arm.rigify_layers[3].name = 'Torso'
    arm.rigify_layers[3].row = 3
    arm.rigify_layers[3].set = False
    arm.rigify_layers[3].group = 3
    arm.rigify_layers[4].name = 'Torso (Tweak)'
    arm.rigify_layers[4].row = 4
    arm.rigify_layers[4].set = False
    arm.rigify_layers[4].group = 4
    arm.rigify_layers[5].name = 'Fingers'
    arm.rigify_layers[5].row = 5
    arm.rigify_layers[5].set = False
    arm.rigify_layers[5].group = 6
    arm.rigify_layers[6].name = 'Fingers (Tweak)'
    arm.rigify_layers[6].row = 6
    arm.rigify_layers[6].set = False
    arm.rigify_layers[6].group = 4
    arm.rigify_layers[7].name = 'Arm.L (IK)'
    arm.rigify_layers[7].row = 7
    arm.rigify_layers[7].set = False
    arm.rigify_layers[7].group = 2
    arm.rigify_layers[8].name = 'Arm.L (FK)'
    arm.rigify_layers[8].row = 8
    arm.rigify_layers[8].set = False
    arm.rigify_layers[8].group = 5
    arm.rigify_layers[9].name = 'Arm.L (Tweak)'
    arm.rigify_layers[9].row = 9
    arm.rigify_layers[9].set = False
    arm.rigify_layers[9].group = 4
    arm.rigify_layers[10].name = 'Arm.R (IK)'
    arm.rigify_layers[10].row = 7
    arm.rigify_layers[10].set = False
    arm.rigify_layers[10].group = 2
    arm.rigify_layers[11].name = 'Arm.R (FK)'
    arm.rigify_layers[11].row = 8
    arm.rigify_layers[11].set = False
    arm.rigify_layers[11].group = 5
    arm.rigify_layers[12].name = 'Arm.R (Tweak)'
    arm.rigify_layers[12].row = 9
    arm.rigify_layers[12].set = False
    arm.rigify_layers[12].group = 4
    arm.rigify_layers[13].name = 'Leg.L (IK)'
    arm.rigify_layers[13].row = 10
    arm.rigify_layers[13].set = False
    arm.rigify_layers[13].group = 2
    arm.rigify_layers[14].name = 'Leg.L (FK)'
    arm.rigify_layers[14].row = 11
    arm.rigify_layers[14].set = False
    arm.rigify_layers[14].group = 5
    arm.rigify_layers[15].name = 'Leg.L (Tweak)'
    arm.rigify_layers[15].row = 12
    arm.rigify_layers[15].set = False
    arm.rigify_layers[15].group = 4
    arm.rigify_layers[16].name = 'Leg.R (IK)'
    arm.rigify_layers[16].row = 10
    arm.rigify_layers[16].set = False
    arm.rigify_layers[16].group = 2
    arm.rigify_layers[17].name = 'Leg.R (FK)'
    arm.rigify_layers[17].row = 11
    arm.rigify_layers[17].set = False
    arm.rigify_layers[17].group = 5
    arm.rigify_layers[18].name = 'Leg.R (Tweak)'
    arm.rigify_layers[18].row = 12
    arm.rigify_layers[18].set = False
    arm.rigify_layers[18].group = 4
    arm.rigify_layers[19].name = ''
    arm.rigify_layers[19].row = 1
    arm.rigify_layers[19].set = False
    arm.rigify_layers[19].group = 0
    arm.rigify_layers[20].name = ''
    arm.rigify_layers[20].row = 1
    arm.rigify_layers[20].set = False
    arm.rigify_layers[20].group = 0
    arm.rigify_layers[21].name = ''
    arm.rigify_layers[21].row = 1
    arm.rigify_layers[21].set = False
    arm.rigify_layers[21].group = 0
    arm.rigify_layers[22].name = ''
    arm.rigify_layers[22].row = 1
    arm.rigify_layers[22].set = False
    arm.rigify_layers[22].group = 0
    arm.rigify_layers[23].name = ''
    arm.rigify_layers[23].row = 1
    arm.rigify_layers[23].set = False
    arm.rigify_layers[23].group = 0
    arm.rigify_layers[24].name = ''
    arm.rigify_layers[24].row = 1
    arm.rigify_layers[24].set = False
    arm.rigify_layers[24].group = 0
    arm.rigify_layers[25].name = ''
    arm.rigify_layers[25].row = 1
    arm.rigify_layers[25].set = False
    arm.rigify_layers[25].group = 0
    arm.rigify_layers[26].name = ''
    arm.rigify_layers[26].row = 1
    arm.rigify_layers[26].set = False
    arm.rigify_layers[26].group = 0
    arm.rigify_layers[27].name = ''
    arm.rigify_layers[27].row = 1
    arm.rigify_layers[27].set = False
    arm.rigify_layers[27].group = 0
    arm.rigify_layers[28].name = 'Root'
    arm.rigify_layers[28].row = 14
    arm.rigify_layers[28].set = False
    arm.rigify_layers[28].group = 1
    arm.rigify_layers[29].name = ' '
    arm.rigify_layers[29].row = 1
    arm.rigify_layers[29].set = False
    arm.rigify_layers[29].group = 0
    arm.rigify_layers[30].name = ' '
    arm.rigify_layers[30].row = 1
    arm.rigify_layers[30].set = False
    arm.rigify_layers[30].group = 0
    arm.rigify_layers[31].name = ' '
    arm.rigify_layers[31].row = 1
    arm.rigify_layers[31].set = False
    arm.rigify_layers[31].group = 0
    arm.rigify_layers[32].name = ' '
    arm.rigify_layers[32].row = 1
    arm.rigify_layers[32].set = False
    arm.rigify_layers[32].group = 0
    arm.rigify_layers[33].name = ' '
    arm.rigify_layers[33].row = 1
    arm.rigify_layers[33].set = False
    arm.rigify_layers[33].group = 0
    arm.rigify_layers[34].name = ' '
    arm.rigify_layers[34].row = 1
    arm.rigify_layers[34].set = False
    arm.rigify_layers[34].group = 0
    arm.rigify_layers[35].name = ' '
    arm.rigify_layers[35].row = 1
    arm.rigify_layers[35].set = False
    arm.rigify_layers[35].group = 0
    arm.rigify_layers[36].name = ' '
    arm.rigify_layers[36].row = 1
    arm.rigify_layers[36].set = False
    arm.rigify_layers[36].group = 0
    arm.rigify_layers[37].name = ' '
    arm.rigify_layers[37].row = 1
    arm.rigify_layers[37].set = False
    arm.rigify_layers[37].group = 0
    arm.rigify_layers[38].name = ' '
    arm.rigify_layers[38].row = 1
    arm.rigify_layers[38].set = False
    arm.rigify_layers[38].group = 0
    arm.rigify_layers[39].name = ' '
    arm.rigify_layers[39].row = 1
    arm.rigify_layers[39].set = False
    arm.rigify_layers[39].group = 0
    arm.rigify_layers[40].name = ' '
    arm.rigify_layers[40].row = 1
    arm.rigify_layers[40].set = False
    arm.rigify_layers[40].group = 0
    arm.rigify_layers[41].name = ' '
    arm.rigify_layers[41].row = 1
    arm.rigify_layers[41].set = False
    arm.rigify_layers[41].group = 0
    arm.rigify_layers[42].name = ' '
    arm.rigify_layers[42].row = 1
    arm.rigify_layers[42].set = False
    arm.rigify_layers[42].group = 0
    arm.rigify_layers[43].name = ' '
    arm.rigify_layers[43].row = 1
    arm.rigify_layers[43].set = False
    arm.rigify_layers[43].group = 0
    arm.rigify_layers[44].name = ' '
    arm.rigify_layers[44].row = 1
    arm.rigify_layers[44].set = False
    arm.rigify_layers[44].group = 0
    arm.rigify_layers[45].name = ' '
    arm.rigify_layers[45].row = 1
    arm.rigify_layers[45].set = False
    arm.rigify_layers[45].group = 0
    arm.rigify_layers[46].name = ' '
    arm.rigify_layers[46].row = 1
    arm.rigify_layers[46].set = False
    arm.rigify_layers[46].group = 0
    arm.rigify_layers[47].name = ' '
    arm.rigify_layers[47].row = 1
    arm.rigify_layers[47].set = False
    arm.rigify_layers[47].group = 0
    arm.rigify_layers[48].name = ' '
    arm.rigify_layers[48].row = 1
    arm.rigify_layers[48].set = False
    arm.rigify_layers[48].group = 0
    arm.rigify_layers[49].name = ' '
    arm.rigify_layers[49].row = 1
    arm.rigify_layers[49].set = False
    arm.rigify_layers[49].group = 0
    arm.rigify_layers[50].name = ' '
    arm.rigify_layers[50].row = 1
    arm.rigify_layers[50].set = False
    arm.rigify_layers[50].group = 0
    arm.rigify_layers[51].name = ' '
    arm.rigify_layers[51].row = 1
    arm.rigify_layers[51].set = False
    arm.rigify_layers[51].group = 0
    arm.rigify_layers[52].name = ' '
    arm.rigify_layers[52].row = 1
    arm.rigify_layers[52].set = False
    arm.rigify_layers[52].group = 0
    arm.rigify_layers[53].name = ' '
    arm.rigify_layers[53].row = 1
    arm.rigify_layers[53].set = False
    arm.rigify_layers[53].group = 0
    arm.rigify_layers[54].name = ' '
    arm.rigify_layers[54].row = 1
    arm.rigify_layers[54].set = False
    arm.rigify_layers[54].group = 0
    arm.rigify_layers[55].name = ' '
    arm.rigify_layers[55].row = 1
    arm.rigify_layers[55].set = False
    arm.rigify_layers[55].group = 0
    arm.rigify_layers[56].name = ' '
    arm.rigify_layers[56].row = 1
    arm.rigify_layers[56].set = False
    arm.rigify_layers[56].group = 0
    arm.rigify_layers[57].name = ' '
    arm.rigify_layers[57].row = 1
    arm.rigify_layers[57].set = False
    arm.rigify_layers[57].group = 0
    bones = {}
    bone = arm.edit_bones.new('spine')
    bone.head[:] = srcBones['pelvis']['head']
    bone.tail[:] = srcBones['pelvis']['tail']
    bone.roll = srcBones['pelvis']['roll']
    bone.use_connect = False
    bones['spine'] = bone.name
    bone = arm.edit_bones.new('spine.001')
    tmp = srcBones['spine01']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine']]
    bones['spine.001'] = bone.name
    bone = arm.edit_bones.new('thigh.L')
    bone.head[:] = 0.098, 0.0124, 1.072
    bone.tail[:] = 0.098, -0.0286, 0.5372
    bone.roll = 0.0
    tmp = srcBones['thigh_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.L'] = bone.name
    bone = arm.edit_bones.new('thigh.R')
    bone.head[:] = -0.098, 0.0124, 1.072
    bone.tail[:] = -0.098, -0.0286, 0.5372
    bone.roll = 0.0
    tmp = srcBones['thigh_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.R'] = bone.name
    bone = arm.edit_bones.new('spine.002')
    bone.head[:] = 0.0, 0.0004, 1.2929
    bone.tail[:] = 0.0, 0.0059, 1.4657
    bone.roll = 0.0
    tmp = srcBones['spine02']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.001']]
    bones['spine.002'] = bone.name
    bone = arm.edit_bones.new('shin.L')
    bone.head[:] = 0.098, -0.0286, 0.5372
    bone.tail[:] = 0.098, 0.0162, 0.0852
    bone.roll = 0.0
    tmp = srcBones['calf_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.L']]
    bones['shin.L'] = bone.name
    bone = arm.edit_bones.new('shin.R')
    bone.head[:] = -0.098, -0.0286, 0.5372
    bone.tail[:] = -0.098, 0.0162, 0.0852
    bone.roll = 0.0
    tmp = srcBones['calf_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.R']]
    bones['shin.R'] = bone.name
    bone = arm.edit_bones.new('spine.003')
    bone.head[:] = 0.0, 0.0059, 1.4657
    bone.tail[:] = 0.0, 0.0114, 1.6582
    bone.roll = 0.0
    tmp = srcBones['spine03']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.002']]
    bones['spine.003'] = bone.name
    bone = arm.edit_bones.new('foot.L')
    bone.head[:] = 0.098, 0.0162, 0.0852
    bone.tail[:] = 0.098, -0.0934, 0.0167
    bone.roll = 0.0
    tmp = srcBones['foot_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.L']]
    bones['foot.L'] = bone.name
    bone = arm.edit_bones.new('foot.R')
    bone.head[:] = -0.098, 0.0162, 0.0852
    bone.tail[:] = -0.098, -0.0934, 0.0167
    bone.roll = -0.0
    tmp = srcBones['foot_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.R']]
    bones['foot.R'] = bone.name
    bone = arm.edit_bones.new('spine.004')
    bone.head[:] = 0.0, 0.0114, 1.6582
    bone.tail[:] = 0.0, -0.013, 1.7197
    bone.roll = 0.0
    tmp = srcBones['neck']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['spine.004'] = bone.name
    bone = arm.edit_bones.new('shoulder.L')
    bone.head[:] = 0.0183, -0.0684, 1.6051
    bone.tail[:] = 0.1694, 0.0205, 1.605
    bone.roll = 0.0004
    tmp = srcBones['clavicle_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.L'] = bone.name
    bone = arm.edit_bones.new('shoulder.R')
    bone.head[:] = -0.0183, -0.0684, 1.6051
    bone.tail[:] = -0.1694, 0.0205, 1.605
    bone.roll = -0.0004
    tmp = srcBones['clavicle_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.R'] = bone.name
    bone = arm.edit_bones.new('breast.L')
    bone.head[:] = 0.1184, 0.0485, 1.4596
    bone.tail[:] = 0.1184, -0.0907, 1.4596
    bone.roll = 0.0
    tmp = srcBones['breast_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.L'] = bone.name
    bone = arm.edit_bones.new('breast.R')
    bone.head[:] = -0.1184, 0.0485, 1.4596
    bone.tail[:] = -0.1184, -0.0907, 1.4596
    bone.roll = -0.0
    tmp = srcBones['breast_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.R'] = bone.name
    bone = arm.edit_bones.new('toe.L')
    bone.head[:] = 0.098, -0.0934, 0.0167
    bone.tail[:] = 0.098, -0.1606, 0.0167
    bone.roll = -0.0
    tmp = srcBones['toes_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['toe.L'] = bone.name
    bone = arm.edit_bones.new('heel.02.L')
    bone.head[:] = 0.06, 0.0459, 0.0
    bone.tail[:] = 0.14, 0.0459, 0.0
    bone.roll = 0.0
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['heel.02.L'] = bone.name
    bone = arm.edit_bones.new('toe.R')
    bone.head[:] = -0.098, -0.0934, 0.0167
    bone.tail[:] = -0.098, -0.1606, 0.0167
    bone.roll = 0.0
    tmp = srcBones['toes_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['toe.R'] = bone.name
    bone = arm.edit_bones.new('heel.02.R')
    bone.head[:] = -0.06, 0.0459, 0.0
    bone.tail[:] = -0.14, 0.0459, 0.0
    bone.roll = -0.0
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['heel.02.R'] = bone.name
    bone = arm.edit_bones.new('spine.005')
    bone.head[:] = 0.0, -0.013, 1.7197
    bone.tail[:] = 0.0, -0.0247, 1.7813
    bone.roll = 0.0
    tmp = srcBones['head']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.004']]
    bones['spine.005'] = bone.name
    bone = arm.edit_bones.new('upper_arm.L')
    bone.head[:] = 0.1953, 0.0267, 1.5846
    bone.tail[:] = 0.4424, 0.0885, 1.4491
    bone.roll = 2.0724
    tmp = srcBones['upperarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.L']]
    bones['upper_arm.L'] = bone.name
    bone = arm.edit_bones.new('upper_arm.R')
    bone.head[:] = -0.1953, 0.0267, 1.5846
    bone.tail[:] = -0.4424, 0.0885, 1.4491
    bone.roll = -2.0724
    tmp = srcBones['upperarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.R']]
    bones['upper_arm.R'] = bone.name
    bone = arm.edit_bones.new('forearm.L')
    bone.head[:] = 0.4424, 0.0885, 1.4491
    bone.tail[:] = 0.6594, 0.0492, 1.3061
    bone.roll = 2.1535
    tmp = srcBones['lowerarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.L']]
    bones['forearm.L'] = bone.name
    bone = arm.edit_bones.new('forearm.R')
    bone.head[:] = -0.4424, 0.0885, 1.4491
    bone.tail[:] = -0.6594, 0.0492, 1.3061
    bone.roll = -2.1535
    tmp = srcBones['lowerarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.R']]
    bones['forearm.R'] = bone.name
    bone = arm.edit_bones.new('hand.L')
    bone.head[:] = 0.6594, 0.0492, 1.3061
    bone.tail[:] = 0.7234, 0.0412, 1.2585
    bone.roll = 2.2103
    tmp = srcBones['hand_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.L']]
    bones['hand.L'] = bone.name
    bone = arm.edit_bones.new('hand.R')
    bone.head[:] = -0.6594, 0.0492, 1.3061
    bone.tail[:] = -0.7234, 0.0412, 1.2585
    bone.roll = -2.2103
    tmp = srcBones['hand_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.R']]
    bones['hand.R'] = bone.name
    bone = arm.edit_bones.new('palm.01.L')
    bone.head[:] = 0.6921, 0.0224, 1.2882
    bone.tail[:] = 0.7464, 0.0051, 1.2482
    bone.roll = -2.4928
    tmp = srcBones['index00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.01.L'] = bone.name
    bone = arm.edit_bones.new('palm.02.L')
    bone.head[:] = 0.697, 0.0389, 1.2877
    bone.tail[:] = 0.7518, 0.0277, 1.2487
    bone.roll = -2.5274
    tmp = srcBones['middle00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.02.L'] = bone.name
    bone = arm.edit_bones.new('palm.03.L')
    bone.head[:] = 0.6963, 0.0545, 1.2874
    bone.tail[:] = 0.754, 0.0521, 1.2482
    bone.roll = -2.5843
    tmp = srcBones['ring00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.03.L'] = bone.name
    bone = arm.edit_bones.new('palm.04.L')
    bone.head[:] = 0.6929, 0.0696, 1.2871
    bone.tail[:] = 0.7528, 0.0763, 1.2428
    bone.roll = -2.5155
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.04.L'] = bone.name
    bone = arm.edit_bones.new('palm.01.R')
    bone.head[:] = -0.6921, 0.0224, 1.2882
    bone.tail[:] = -0.7464, 0.0051, 1.2482
    bone.roll = 2.4928
    tmp = srcBones['index00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.01.R'] = bone.name
    bone = arm.edit_bones.new('palm.02.R')
    bone.head[:] = -0.697, 0.0389, 1.2877
    bone.tail[:] = -0.7518, 0.0277, 1.2487
    bone.roll = 2.5274
    tmp = srcBones['middle00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.02.R'] = bone.name
    bone = arm.edit_bones.new('palm.03.R')
    bone.head[:] = -0.6963, 0.0544, 1.2874
    bone.tail[:] = -0.754, 0.0521, 1.2482
    bone.roll = 2.5843
    tmp = srcBones['ring00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.03.R'] = bone.name
    bone = arm.edit_bones.new('palm.04.R')
    bone.head[:] = -0.6929, 0.0696, 1.2871
    bone.tail[:] = -0.7528, 0.0763, 1.2428
    bone.roll = 2.5155
    tmp = srcBones['pinky00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.04.R'] = bone.name
    bone = arm.edit_bones.new('f_index.01.L')
    bone.head[:] = 0.7464, 0.0051, 1.2482
    bone.tail[:] = 0.7718, 0.0013, 1.2112
    bone.roll = -2.0315
    tmp = srcBones['index01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['f_index.01.L'] = bone.name
    bone = arm.edit_bones.new('thumb.01.L')
    bone.head[:] = 0.6705, 0.0214, 1.2738
    bone.tail[:] = 0.6857, 0.0015, 1.2404
    bone.roll = -0.1587
    tmp = srcBones['thumb01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['thumb.01.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.L')
    bone.head[:] = 0.7518, 0.0277, 1.2487
    bone.tail[:] = 0.7762, 0.0234, 1.2058
    bone.roll = -2.0067
    tmp = srcBones['middle01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.L']]
    bones['f_middle.01.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.L')
    bone.head[:] = 0.754, 0.0521, 1.2482
    bone.tail[:] = 0.7715, 0.0499, 1.207
    bone.roll = -2.0082
    tmp = srcBones['ring01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.L']]
    bones['f_ring.01.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.L')
    bone.head[:] = 0.7528, 0.0763, 1.2428
    bone.tail[:] = 0.7589, 0.0765, 1.2156
    bone.roll = -1.9749
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.L']]
    bones['f_pinky.01.L'] = bone.name
    bone = arm.edit_bones.new('f_index.01.R')
    bone.head[:] = -0.7464, 0.0051, 1.2482
    bone.tail[:] = -0.7718, 0.0012, 1.2112
    bone.roll = 2.0315
    tmp = srcBones['index01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['f_index.01.R'] = bone.name
    bone = arm.edit_bones.new('thumb.01.R')
    bone.head[:] = -0.6705, 0.0214, 1.2738
    bone.tail[:] = -0.6857, 0.0015, 1.2404
    bone.roll = 0.1587
    tmp = srcBones['thumb01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['thumb.01.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.R')
    bone.head[:] = -0.7518, 0.0277, 1.2487
    bone.tail[:] = -0.7762, 0.0233, 1.2058
    bone.roll = 2.0067
    tmp = srcBones['middle01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.R']]
    bones['f_middle.01.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.R')
    bone.head[:] = -0.754, 0.0521, 1.2482
    bone.tail[:] = -0.7715, 0.0499, 1.207
    bone.roll = 2.0082
    tmp = srcBones['ring01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.R']]
    bones['f_ring.01.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.R')
    bone.head[:] = -0.7528, 0.0763, 1.2428
    bone.tail[:] = -0.7589, 0.0765, 1.2156
    bone.roll = 1.9749
    tmp = srcBones['pinky01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.R']]
    bones['f_pinky.01.R'] = bone.name
    bone = arm.edit_bones.new('f_index.02.L')
    bone.head[:] = 0.7718, 0.0013, 1.2112
    bone.tail[:] = 0.784, -0.0003, 1.1858
    bone.roll = -1.8799
    tmp = srcBones['index02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.L']]
    bones['f_index.02.L'] = bone.name
    bone = arm.edit_bones.new('thumb.02.L')
    bone.head[:] = 0.6857, 0.0015, 1.2404
    bone.tail[:] = 0.7056, -0.0057, 1.2145
    bone.roll = -0.4798
    tmp = srcBones['thumb02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.L']]
    bones['thumb.02.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.L')
    bone.head[:] = 0.7762, 0.0234, 1.2058
    bone.tail[:] = 0.7851, 0.0218, 1.1749
    bone.roll = -1.8283
    tmp = srcBones['middle02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.L']]
    bones['f_middle.02.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.L')
    bone.head[:] = 0.7715, 0.0499, 1.207
    bone.tail[:] = 0.7794, 0.0494, 1.1762
    bone.roll = -1.8946
    tmp = srcBones['ring02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.L']]
    bones['f_ring.02.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.L')
    bone.head[:] = 0.7589, 0.0765, 1.2156
    bone.tail[:] = 0.7618, 0.077, 1.1932
    bone.roll = -1.9059
    tmp = srcBones['pinky02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.L']]
    bones['f_pinky.02.L'] = bone.name
    bone = arm.edit_bones.new('f_index.02.R')
    bone.head[:] = -0.7718, 0.0012, 1.2112
    bone.tail[:] = -0.784, -0.0003, 1.1858
    bone.roll = 1.8799
    tmp = srcBones['index02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.R']]
    bones['f_index.02.R'] = bone.name
    bone = arm.edit_bones.new('thumb.02.R')
    bone.head[:] = -0.6857, 0.0015, 1.2404
    bone.tail[:] = -0.7056, -0.0057, 1.2145
    bone.roll = 0.4798
    tmp = srcBones['thumb02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.R']]
    bones['thumb.02.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.R')
    bone.head[:] = -0.7762, 0.0233, 1.2058
    bone.tail[:] = -0.7851, 0.0218, 1.1749
    bone.roll = 1.8283
    tmp = srcBones['middle02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.R']]
    bones['f_middle.02.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.R')
    bone.head[:] = -0.7715, 0.0499, 1.207
    bone.tail[:] = -0.7794, 0.0494, 1.1762
    bone.roll = 1.8946
    tmp = srcBones['ring02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.R']]
    bones['f_ring.02.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.R')
    bone.head[:] = -0.7589, 0.0765, 1.2156
    bone.tail[:] = -0.7618, 0.077, 1.1932
    bone.roll = 1.9059
    tmp = srcBones['pinky02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.R']]
    bones['f_pinky.02.R'] = bone.name
    bone = arm.edit_bones.new('f_index.03.L')
    bone.head[:] = 0.784, -0.0003, 1.1858
    bone.tail[:] = 0.7892, 0.0006, 1.1636
    bone.roll = -1.676
    tmp = srcBones['index03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.L']]
    bones['f_index.03.L'] = bone.name
    bone = arm.edit_bones.new('thumb.03.L')
    bone.head[:] = 0.7056, -0.0057, 1.2145
    bone.tail[:] = 0.7194, -0.0098, 1.1995
    bone.roll = -0.5826
    tmp = srcBones['thumb03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.L']]
    bones['thumb.03.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.L')
    bone.head[:] = 0.7851, 0.0218, 1.1749
    bone.tail[:] = 0.7888, 0.0216, 1.1525
    bone.roll = -1.7483
    tmp = srcBones['middle03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.L']]
    bones['f_middle.03.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.L')
    bone.head[:] = 0.7794, 0.0494, 1.1762
    bone.tail[:] = 0.7781, 0.0498, 1.1577
    bone.roll = -1.6582
    tmp = srcBones['ring03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.L']]
    bones['f_ring.03.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.L')
    bone.head[:] = 0.7618, 0.077, 1.1932
    bone.tail[:] = 0.7611, 0.0772, 1.1782
    bone.roll = -1.7639
    tmp = srcBones['pinky03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.L']]
    bones['f_pinky.03.L'] = bone.name
    bone = arm.edit_bones.new('f_index.03.R')
    bone.head[:] = -0.784, -0.0003, 1.1858
    bone.tail[:] = -0.7892, 0.0006, 1.1636
    bone.roll = 1.676
    tmp = srcBones['index03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.R']]
    bones['f_index.03.R'] = bone.name
    bone = arm.edit_bones.new('thumb.03.R')
    bone.head[:] = -0.7056, -0.0057, 1.2145
    bone.tail[:] = -0.7194, -0.0098, 1.1995
    bone.roll = 0.5826
    tmp = srcBones['thumb03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.R']]
    bones['thumb.03.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.R')
    bone.head[:] = -0.7851, 0.0218, 1.1749
    bone.tail[:] = -0.7888, 0.0216, 1.1525
    bone.roll = 1.7483
    tmp = srcBones['middle03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.R']]
    bones['f_middle.03.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.R')
    bone.head[:] = -0.7794, 0.0494, 1.1762
    bone.tail[:] = -0.7781, 0.0498, 1.1577
    bone.roll = 1.6582
    tmp = srcBones['ring03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.R']]
    bones['f_ring.03.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.R')
    bone.head[:] = -0.7618, 0.077, 1.1932
    bone.tail[:] = -0.7611, 0.0772, 1.1782
    bone.roll = 1.7639
    tmp = srcBones['pinky03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.R']]
    bones['f_pinky.03.R'] = bone.name
    bpy.ops.object.mode_set(mode='OBJECT')
    pbone = obj.pose.bones[bones['spine']]
    pbone.rigify_type = 'spines.super_spine'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.neck_pos = 4
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            True, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.001']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thigh.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.limb_type = 'leg'
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, True, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, False, 
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thigh.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, True, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, True, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.limb_type = 'leg'
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.002']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.003']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.004']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shoulder.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['shoulder.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['breast.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['breast.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.005']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['upper_arm.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, True, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, True, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['upper_arm.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, True, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, True, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['forearm.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['forearm.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.L']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.R']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    bpy.ops.object.mode_set(mode='EDIT')
    for bone in arm.edit_bones:
        bone.select = False
        bone.select_head = False
        bone.select_tail = False
    for b in bones:
        bone = arm.edit_bones[bones[b]]
        bone.select = True
        bone.select_head = True
        bone.select_tail = True
        arm.edit_bones.active = bone
    arm.layers = [(x in [3, 5, 7, 10, 13, 16]) for x in range(32)]


print('Sadfsdfasdf')
o = bpy.context.object
mblName = o.name
print(mblName)
armature = bpy.context.object.find_armature()
print(armature)
boneData = {}
bpy.data.objects[armature.name].select = True
bpy.context.scene.objects.active = bpy.data.objects[armature.name]
bpy.ops.object.mode_set(mode='EDIT')
for b in bpy.context.object.data.edit_bones:
    boneData[b.name] = {'roll': b.roll, 'head': b.head, 'tail': b.tail}
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action='DESELECT')
if __name__ == '__main__':
    amt = bpy.data.armatures.new('ArmatureTest')
    ob = bpy.data.objects.new('ObjectTest2', amt)
    scn = bpy.context.scene
    scn.objects.link(ob)
    scn.objects.active = ob
    ob.select = True
    print(boneData['pelvis'])
    create(ob, boneData)

import bpy
from mathutils import Color
1


def create(obj, srcBones):
    bpy.ops.object.mode_set(mode='EDIT')
    arm = obj.data
    for i in range(12):
        arm.rigify_colors.add()
    arm.rigify_colors[0].name = 'Root'
    arm.rigify_colors[0].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[0].normal = Color((0.4352940022945404, 
        0.18431399762630463, 0.4156860113143921))
    arm.rigify_colors[0].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[0].standard_colors_lock = True
    arm.rigify_colors[1].name = 'IK'
    arm.rigify_colors[1].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[1].normal = Color((0.6039220094680786, 0.0, 0.0))
    arm.rigify_colors[1].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[1].standard_colors_lock = True
    arm.rigify_colors[2].name = 'Special'
    arm.rigify_colors[2].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[2].normal = Color((0.9568629860877991, 
        0.7882350087165833, 0.04705899953842163))
    arm.rigify_colors[2].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[2].standard_colors_lock = True
    arm.rigify_colors[3].name = 'Tweak'
    arm.rigify_colors[3].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[3].normal = Color((0.03921600058674812, 
        0.21176500618457794, 0.5803920030593872))
    arm.rigify_colors[3].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[3].standard_colors_lock = True
    arm.rigify_colors[4].name = 'FK'
    arm.rigify_colors[4].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[4].normal = Color((0.11764699965715408, 
        0.5686269998550415, 0.035294000059366226))
    arm.rigify_colors[4].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[4].standard_colors_lock = True
    arm.rigify_colors[5].name = 'Extra'
    arm.rigify_colors[5].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[5].normal = Color((0.9686279892921448, 
        0.2509799897670746, 0.09411799907684326))
    arm.rigify_colors[5].select = Color((0.31372547149658203, 
        0.7843138575553894, 1.0))
    arm.rigify_colors[5].standard_colors_lock = True
    arm.rigify_colors[6].name = ' '
    arm.rigify_colors[6].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].standard_colors_lock = True
    arm.rigify_colors[7].name = ' '
    arm.rigify_colors[7].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].standard_colors_lock = True
    arm.rigify_colors[8].name = ' '
    arm.rigify_colors[8].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].standard_colors_lock = True
    arm.rigify_colors[9].name = ' '
    arm.rigify_colors[9].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].standard_colors_lock = True
    arm.rigify_colors[10].name = ' '
    arm.rigify_colors[10].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].standard_colors_lock = True
    arm.rigify_colors[11].name = ' '
    arm.rigify_colors[11].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].standard_colors_lock = True
    for i in range(58):
        arm.rigify_layers.add()
    arm.rigify_layers[0].name = 'Face'
    arm.rigify_layers[0].row = 1
    arm.rigify_layers[0].set = False
    arm.rigify_layers[0].group = 5
    arm.rigify_layers[1].name = 'Face (Primary)'
    arm.rigify_layers[1].row = 2
    arm.rigify_layers[1].set = False
    arm.rigify_layers[1].group = 2
    arm.rigify_layers[2].name = 'Face (Secondary)'
    arm.rigify_layers[2].row = 2
    arm.rigify_layers[2].set = False
    arm.rigify_layers[2].group = 3
    arm.rigify_layers[3].name = 'Torso'
    arm.rigify_layers[3].row = 3
    arm.rigify_layers[3].set = False
    arm.rigify_layers[3].group = 3
    arm.rigify_layers[4].name = 'Torso (Tweak)'
    arm.rigify_layers[4].row = 4
    arm.rigify_layers[4].set = False
    arm.rigify_layers[4].group = 4
    arm.rigify_layers[5].name = 'Fingers'
    arm.rigify_layers[5].row = 5
    arm.rigify_layers[5].set = False
    arm.rigify_layers[5].group = 6
    arm.rigify_layers[6].name = 'Fingers (Tweak)'
    arm.rigify_layers[6].row = 6
    arm.rigify_layers[6].set = False
    arm.rigify_layers[6].group = 4
    arm.rigify_layers[7].name = 'Arm.L (IK)'
    arm.rigify_layers[7].row = 7
    arm.rigify_layers[7].set = False
    arm.rigify_layers[7].group = 2
    arm.rigify_layers[8].name = 'Arm.L (FK)'
    arm.rigify_layers[8].row = 8
    arm.rigify_layers[8].set = False
    arm.rigify_layers[8].group = 5
    arm.rigify_layers[9].name = 'Arm.L (Tweak)'
    arm.rigify_layers[9].row = 9
    arm.rigify_layers[9].set = False
    arm.rigify_layers[9].group = 4
    arm.rigify_layers[10].name = 'Arm.R (IK)'
    arm.rigify_layers[10].row = 7
    arm.rigify_layers[10].set = False
    arm.rigify_layers[10].group = 2
    arm.rigify_layers[11].name = 'Arm.R (FK)'
    arm.rigify_layers[11].row = 8
    arm.rigify_layers[11].set = False
    arm.rigify_layers[11].group = 5
    arm.rigify_layers[12].name = 'Arm.R (Tweak)'
    arm.rigify_layers[12].row = 9
    arm.rigify_layers[12].set = False
    arm.rigify_layers[12].group = 4
    arm.rigify_layers[13].name = 'Leg.L (IK)'
    arm.rigify_layers[13].row = 10
    arm.rigify_layers[13].set = False
    arm.rigify_layers[13].group = 2
    arm.rigify_layers[14].name = 'Leg.L (FK)'
    arm.rigify_layers[14].row = 11
    arm.rigify_layers[14].set = False
    arm.rigify_layers[14].group = 5
    arm.rigify_layers[15].name = 'Leg.L (Tweak)'
    arm.rigify_layers[15].row = 12
    arm.rigify_layers[15].set = False
    arm.rigify_layers[15].group = 4
    arm.rigify_layers[16].name = 'Leg.R (IK)'
    arm.rigify_layers[16].row = 10
    arm.rigify_layers[16].set = False
    arm.rigify_layers[16].group = 2
    arm.rigify_layers[17].name = 'Leg.R (FK)'
    arm.rigify_layers[17].row = 11
    arm.rigify_layers[17].set = False
    arm.rigify_layers[17].group = 5
    arm.rigify_layers[18].name = 'Leg.R (Tweak)'
    arm.rigify_layers[18].row = 12
    arm.rigify_layers[18].set = False
    arm.rigify_layers[18].group = 4
    arm.rigify_layers[19].name = ''
    arm.rigify_layers[19].row = 1
    arm.rigify_layers[19].set = False
    arm.rigify_layers[19].group = 0
    arm.rigify_layers[20].name = ''
    arm.rigify_layers[20].row = 1
    arm.rigify_layers[20].set = False
    arm.rigify_layers[20].group = 0
    arm.rigify_layers[21].name = ''
    arm.rigify_layers[21].row = 1
    arm.rigify_layers[21].set = False
    arm.rigify_layers[21].group = 0
    arm.rigify_layers[22].name = ''
    arm.rigify_layers[22].row = 1
    arm.rigify_layers[22].set = False
    arm.rigify_layers[22].group = 0
    arm.rigify_layers[23].name = ''
    arm.rigify_layers[23].row = 1
    arm.rigify_layers[23].set = False
    arm.rigify_layers[23].group = 0
    arm.rigify_layers[24].name = ''
    arm.rigify_layers[24].row = 1
    arm.rigify_layers[24].set = False
    arm.rigify_layers[24].group = 0
    arm.rigify_layers[25].name = ''
    arm.rigify_layers[25].row = 1
    arm.rigify_layers[25].set = False
    arm.rigify_layers[25].group = 0
    arm.rigify_layers[26].name = ''
    arm.rigify_layers[26].row = 1
    arm.rigify_layers[26].set = False
    arm.rigify_layers[26].group = 0
    arm.rigify_layers[27].name = ''
    arm.rigify_layers[27].row = 1
    arm.rigify_layers[27].set = False
    arm.rigify_layers[27].group = 0
    arm.rigify_layers[28].name = 'Root'
    arm.rigify_layers[28].row = 14
    arm.rigify_layers[28].set = False
    arm.rigify_layers[28].group = 1
    arm.rigify_layers[29].name = ' '
    arm.rigify_layers[29].row = 1
    arm.rigify_layers[29].set = False
    arm.rigify_layers[29].group = 0
    arm.rigify_layers[30].name = ' '
    arm.rigify_layers[30].row = 1
    arm.rigify_layers[30].set = False
    arm.rigify_layers[30].group = 0
    arm.rigify_layers[31].name = ' '
    arm.rigify_layers[31].row = 1
    arm.rigify_layers[31].set = False
    arm.rigify_layers[31].group = 0
    arm.rigify_layers[32].name = ' '
    arm.rigify_layers[32].row = 1
    arm.rigify_layers[32].set = False
    arm.rigify_layers[32].group = 0
    arm.rigify_layers[33].name = ' '
    arm.rigify_layers[33].row = 1
    arm.rigify_layers[33].set = False
    arm.rigify_layers[33].group = 0
    arm.rigify_layers[34].name = ' '
    arm.rigify_layers[34].row = 1
    arm.rigify_layers[34].set = False
    arm.rigify_layers[34].group = 0
    arm.rigify_layers[35].name = ' '
    arm.rigify_layers[35].row = 1
    arm.rigify_layers[35].set = False
    arm.rigify_layers[35].group = 0
    arm.rigify_layers[36].name = ' '
    arm.rigify_layers[36].row = 1
    arm.rigify_layers[36].set = False
    arm.rigify_layers[36].group = 0
    arm.rigify_layers[37].name = ' '
    arm.rigify_layers[37].row = 1
    arm.rigify_layers[37].set = False
    arm.rigify_layers[37].group = 0
    arm.rigify_layers[38].name = ' '
    arm.rigify_layers[38].row = 1
    arm.rigify_layers[38].set = False
    arm.rigify_layers[38].group = 0
    arm.rigify_layers[39].name = ' '
    arm.rigify_layers[39].row = 1
    arm.rigify_layers[39].set = False
    arm.rigify_layers[39].group = 0
    arm.rigify_layers[40].name = ' '
    arm.rigify_layers[40].row = 1
    arm.rigify_layers[40].set = False
    arm.rigify_layers[40].group = 0
    arm.rigify_layers[41].name = ' '
    arm.rigify_layers[41].row = 1
    arm.rigify_layers[41].set = False
    arm.rigify_layers[41].group = 0
    arm.rigify_layers[42].name = ' '
    arm.rigify_layers[42].row = 1
    arm.rigify_layers[42].set = False
    arm.rigify_layers[42].group = 0
    arm.rigify_layers[43].name = ' '
    arm.rigify_layers[43].row = 1
    arm.rigify_layers[43].set = False
    arm.rigify_layers[43].group = 0
    arm.rigify_layers[44].name = ' '
    arm.rigify_layers[44].row = 1
    arm.rigify_layers[44].set = False
    arm.rigify_layers[44].group = 0
    arm.rigify_layers[45].name = ' '
    arm.rigify_layers[45].row = 1
    arm.rigify_layers[45].set = False
    arm.rigify_layers[45].group = 0
    arm.rigify_layers[46].name = ' '
    arm.rigify_layers[46].row = 1
    arm.rigify_layers[46].set = False
    arm.rigify_layers[46].group = 0
    arm.rigify_layers[47].name = ' '
    arm.rigify_layers[47].row = 1
    arm.rigify_layers[47].set = False
    arm.rigify_layers[47].group = 0
    arm.rigify_layers[48].name = ' '
    arm.rigify_layers[48].row = 1
    arm.rigify_layers[48].set = False
    arm.rigify_layers[48].group = 0
    arm.rigify_layers[49].name = ' '
    arm.rigify_layers[49].row = 1
    arm.rigify_layers[49].set = False
    arm.rigify_layers[49].group = 0
    arm.rigify_layers[50].name = ' '
    arm.rigify_layers[50].row = 1
    arm.rigify_layers[50].set = False
    arm.rigify_layers[50].group = 0
    arm.rigify_layers[51].name = ' '
    arm.rigify_layers[51].row = 1
    arm.rigify_layers[51].set = False
    arm.rigify_layers[51].group = 0
    arm.rigify_layers[52].name = ' '
    arm.rigify_layers[52].row = 1
    arm.rigify_layers[52].set = False
    arm.rigify_layers[52].group = 0
    arm.rigify_layers[53].name = ' '
    arm.rigify_layers[53].row = 1
    arm.rigify_layers[53].set = False
    arm.rigify_layers[53].group = 0
    arm.rigify_layers[54].name = ' '
    arm.rigify_layers[54].row = 1
    arm.rigify_layers[54].set = False
    arm.rigify_layers[54].group = 0
    arm.rigify_layers[55].name = ' '
    arm.rigify_layers[55].row = 1
    arm.rigify_layers[55].set = False
    arm.rigify_layers[55].group = 0
    arm.rigify_layers[56].name = ' '
    arm.rigify_layers[56].row = 1
    arm.rigify_layers[56].set = False
    arm.rigify_layers[56].group = 0
    arm.rigify_layers[57].name = ' '
    arm.rigify_layers[57].row = 1
    arm.rigify_layers[57].set = False
    arm.rigify_layers[57].group = 0
    bones = {}
    bone = arm.edit_bones.new('spine')
    bone.head[:] = srcBones['pelvis']['head']
    bone.tail[:] = srcBones['pelvis']['tail']
    bone.roll = srcBones['pelvis']['roll']
    bone.use_connect = False
    bones['spine'] = bone.name
    bone = arm.edit_bones.new('spine.001')
    tmp = srcBones['spine01']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine']]
    bones['spine.001'] = bone.name
    bone = arm.edit_bones.new('thigh.L')
    bone.head[:] = 0.098, 0.0124, 1.072
    bone.tail[:] = 0.098, -0.0286, 0.5372
    bone.roll = 0.0
    tmp = srcBones['thigh_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.L'] = bone.name
    bone = arm.edit_bones.new('thigh.R')
    bone.head[:] = -0.098, 0.0124, 1.072
    bone.tail[:] = -0.098, -0.0286, 0.5372
    bone.roll = 0.0
    tmp = srcBones['thigh_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.R'] = bone.name
    bone = arm.edit_bones.new('spine.002')
    bone.head[:] = 0.0, 0.0004, 1.2929
    bone.tail[:] = 0.0, 0.0059, 1.4657
    bone.roll = 0.0
    tmp = srcBones['spine02']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.001']]
    bones['spine.002'] = bone.name
    bone = arm.edit_bones.new('shin.L')
    bone.head[:] = 0.098, -0.0286, 0.5372
    bone.tail[:] = 0.098, 0.0162, 0.0852
    bone.roll = 0.0
    tmp = srcBones['calf_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.L']]
    bones['shin.L'] = bone.name
    bone = arm.edit_bones.new('shin.R')
    bone.head[:] = -0.098, -0.0286, 0.5372
    bone.tail[:] = -0.098, 0.0162, 0.0852
    bone.roll = 0.0
    tmp = srcBones['calf_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.R']]
    bones['shin.R'] = bone.name
    bone = arm.edit_bones.new('spine.003')
    bone.head[:] = 0.0, 0.0059, 1.4657
    bone.tail[:] = 0.0, 0.0114, 1.6582
    bone.roll = 0.0
    tmp = srcBones['spine03']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.002']]
    bones['spine.003'] = bone.name
    bone = arm.edit_bones.new('foot.L')
    bone.head[:] = 0.098, 0.0162, 0.0852
    bone.tail[:] = 0.098, -0.0934, 0.0167
    bone.roll = 0.0
    tmp = srcBones['foot_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.L']]
    bones['foot.L'] = bone.name
    bone = arm.edit_bones.new('foot.R')
    bone.head[:] = -0.098, 0.0162, 0.0852
    bone.tail[:] = -0.098, -0.0934, 0.0167
    bone.roll = -0.0
    tmp = srcBones['foot_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.R']]
    bones['foot.R'] = bone.name
    bone = arm.edit_bones.new('spine.004')
    bone.head[:] = 0.0, 0.0114, 1.6582
    bone.tail[:] = 0.0, -0.013, 1.7197
    bone.roll = 0.0
    tmp = srcBones['neck']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['spine.004'] = bone.name
    bone = arm.edit_bones.new('shoulder.L')
    bone.head[:] = 0.0183, -0.0684, 1.6051
    bone.tail[:] = 0.1694, 0.0205, 1.605
    bone.roll = 0.0004
    tmp = srcBones['clavicle_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.L'] = bone.name
    bone = arm.edit_bones.new('shoulder.R')
    bone.head[:] = -0.0183, -0.0684, 1.6051
    bone.tail[:] = -0.1694, 0.0205, 1.605
    bone.roll = -0.0004
    tmp = srcBones['clavicle_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.R'] = bone.name
    bone = arm.edit_bones.new('breast.L')
    bone.head[:] = 0.1184, 0.0485, 1.4596
    bone.tail[:] = 0.1184, -0.0907, 1.4596
    bone.roll = 0.0
    tmp = srcBones['breast_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.L'] = bone.name
    bone = arm.edit_bones.new('breast.R')
    bone.head[:] = -0.1184, 0.0485, 1.4596
    bone.tail[:] = -0.1184, -0.0907, 1.4596
    bone.roll = -0.0
    tmp = srcBones['breast_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.R'] = bone.name
    bone = arm.edit_bones.new('toe.L')
    bone.head[:] = 0.098, -0.0934, 0.0167
    bone.tail[:] = 0.098, -0.1606, 0.0167
    bone.roll = -0.0
    tmp = srcBones['toes_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['toe.L'] = bone.name
    bone = arm.edit_bones.new('heel.02.L')
    bone.head[:] = 0.06, 0.0459, 0.0
    bone.tail[:] = 0.14, 0.0459, 0.0
    bone.roll = 0.0
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['heel.02.L'] = bone.name
    bone = arm.edit_bones.new('toe.R')
    bone.head[:] = -0.098, -0.0934, 0.0167
    bone.tail[:] = -0.098, -0.1606, 0.0167
    bone.roll = 0.0
    tmp = srcBones['toes_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['toe.R'] = bone.name
    bone = arm.edit_bones.new('heel.02.R')
    bone.head[:] = -0.06, 0.0459, 0.0
    bone.tail[:] = -0.14, 0.0459, 0.0
    bone.roll = -0.0
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['heel.02.R'] = bone.name
    bone = arm.edit_bones.new('spine.005')
    bone.head[:] = 0.0, -0.013, 1.7197
    bone.tail[:] = 0.0, -0.0247, 1.7813
    bone.roll = 0.0
    tmp = srcBones['head']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.004']]
    bones['spine.005'] = bone.name
    bone = arm.edit_bones.new('upper_arm.L')
    bone.head[:] = 0.1953, 0.0267, 1.5846
    bone.tail[:] = 0.4424, 0.0885, 1.4491
    bone.roll = 2.0724
    tmp = srcBones['upperarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.L']]
    bones['upper_arm.L'] = bone.name
    bone = arm.edit_bones.new('upper_arm.R')
    bone.head[:] = -0.1953, 0.0267, 1.5846
    bone.tail[:] = -0.4424, 0.0885, 1.4491
    bone.roll = -2.0724
    tmp = srcBones['upperarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.R']]
    bones['upper_arm.R'] = bone.name
    bone = arm.edit_bones.new('forearm.L')
    bone.head[:] = 0.4424, 0.0885, 1.4491
    bone.tail[:] = 0.6594, 0.0492, 1.3061
    bone.roll = 2.1535
    tmp = srcBones['lowerarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.L']]
    bones['forearm.L'] = bone.name
    bone = arm.edit_bones.new('forearm.R')
    bone.head[:] = -0.4424, 0.0885, 1.4491
    bone.tail[:] = -0.6594, 0.0492, 1.3061
    bone.roll = -2.1535
    tmp = srcBones['lowerarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.R']]
    bones['forearm.R'] = bone.name
    bone = arm.edit_bones.new('hand.L')
    bone.head[:] = 0.6594, 0.0492, 1.3061
    bone.tail[:] = 0.7234, 0.0412, 1.2585
    bone.roll = 2.2103
    tmp = srcBones['hand_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.L']]
    bones['hand.L'] = bone.name
    bone = arm.edit_bones.new('hand.R')
    bone.head[:] = -0.6594, 0.0492, 1.3061
    bone.tail[:] = -0.7234, 0.0412, 1.2585
    bone.roll = -2.2103
    tmp = srcBones['hand_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.R']]
    bones['hand.R'] = bone.name
    bone = arm.edit_bones.new('palm.01.L')
    bone.head[:] = 0.6921, 0.0224, 1.2882
    bone.tail[:] = 0.7464, 0.0051, 1.2482
    bone.roll = -2.4928
    tmp = srcBones['index00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.01.L'] = bone.name
    bone = arm.edit_bones.new('palm.02.L')
    bone.head[:] = 0.697, 0.0389, 1.2877
    bone.tail[:] = 0.7518, 0.0277, 1.2487
    bone.roll = -2.5274
    tmp = srcBones['middle00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.02.L'] = bone.name
    bone = arm.edit_bones.new('palm.03.L')
    bone.head[:] = 0.6963, 0.0545, 1.2874
    bone.tail[:] = 0.754, 0.0521, 1.2482
    bone.roll = -2.5843
    tmp = srcBones['ring00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.03.L'] = bone.name
    bone = arm.edit_bones.new('palm.04.L')
    bone.head[:] = 0.6929, 0.0696, 1.2871
    bone.tail[:] = 0.7528, 0.0763, 1.2428
    bone.roll = -2.5155
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.04.L'] = bone.name
    bone = arm.edit_bones.new('palm.01.R')
    bone.head[:] = -0.6921, 0.0224, 1.2882
    bone.tail[:] = -0.7464, 0.0051, 1.2482
    bone.roll = 2.4928
    tmp = srcBones['index00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.01.R'] = bone.name
    bone = arm.edit_bones.new('palm.02.R')
    bone.head[:] = -0.697, 0.0389, 1.2877
    bone.tail[:] = -0.7518, 0.0277, 1.2487
    bone.roll = 2.5274
    tmp = srcBones['middle00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.02.R'] = bone.name
    bone = arm.edit_bones.new('palm.03.R')
    bone.head[:] = -0.6963, 0.0544, 1.2874
    bone.tail[:] = -0.754, 0.0521, 1.2482
    bone.roll = 2.5843
    tmp = srcBones['ring00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.03.R'] = bone.name
    bone = arm.edit_bones.new('palm.04.R')
    bone.head[:] = -0.6929, 0.0696, 1.2871
    bone.tail[:] = -0.7528, 0.0763, 1.2428
    bone.roll = 2.5155
    tmp = srcBones['pinky00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.04.R'] = bone.name
    bone = arm.edit_bones.new('f_index.01.L')
    bone.head[:] = 0.7464, 0.0051, 1.2482
    bone.tail[:] = 0.7718, 0.0013, 1.2112
    bone.roll = -2.0315
    tmp = srcBones['index01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['f_index.01.L'] = bone.name
    bone = arm.edit_bones.new('thumb.01.L')
    bone.head[:] = 0.6705, 0.0214, 1.2738
    bone.tail[:] = 0.6857, 0.0015, 1.2404
    bone.roll = -0.1587
    tmp = srcBones['thumb01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['thumb.01.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.L')
    bone.head[:] = 0.7518, 0.0277, 1.2487
    bone.tail[:] = 0.7762, 0.0234, 1.2058
    bone.roll = -2.0067
    tmp = srcBones['middle01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.L']]
    bones['f_middle.01.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.L')
    bone.head[:] = 0.754, 0.0521, 1.2482
    bone.tail[:] = 0.7715, 0.0499, 1.207
    bone.roll = -2.0082
    tmp = srcBones['ring01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.L']]
    bones['f_ring.01.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.L')
    bone.head[:] = 0.7528, 0.0763, 1.2428
    bone.tail[:] = 0.7589, 0.0765, 1.2156
    bone.roll = -1.9749
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.L']]
    bones['f_pinky.01.L'] = bone.name
    bone = arm.edit_bones.new('f_index.01.R')
    bone.head[:] = -0.7464, 0.0051, 1.2482
    bone.tail[:] = -0.7718, 0.0012, 1.2112
    bone.roll = 2.0315
    tmp = srcBones['index01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['f_index.01.R'] = bone.name
    bone = arm.edit_bones.new('thumb.01.R')
    bone.head[:] = -0.6705, 0.0214, 1.2738
    bone.tail[:] = -0.6857, 0.0015, 1.2404
    bone.roll = 0.1587
    tmp = srcBones['thumb01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['thumb.01.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.R')
    bone.head[:] = -0.7518, 0.0277, 1.2487
    bone.tail[:] = -0.7762, 0.0233, 1.2058
    bone.roll = 2.0067
    tmp = srcBones['middle01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.R']]
    bones['f_middle.01.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.R')
    bone.head[:] = -0.754, 0.0521, 1.2482
    bone.tail[:] = -0.7715, 0.0499, 1.207
    bone.roll = 2.0082
    tmp = srcBones['ring01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.R']]
    bones['f_ring.01.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.R')
    bone.head[:] = -0.7528, 0.0763, 1.2428
    bone.tail[:] = -0.7589, 0.0765, 1.2156
    bone.roll = 1.9749
    tmp = srcBones['pinky01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.R']]
    bones['f_pinky.01.R'] = bone.name
    bone = arm.edit_bones.new('f_index.02.L')
    bone.head[:] = 0.7718, 0.0013, 1.2112
    bone.tail[:] = 0.784, -0.0003, 1.1858
    bone.roll = -1.8799
    tmp = srcBones['index02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.L']]
    bones['f_index.02.L'] = bone.name
    bone = arm.edit_bones.new('thumb.02.L')
    bone.head[:] = 0.6857, 0.0015, 1.2404
    bone.tail[:] = 0.7056, -0.0057, 1.2145
    bone.roll = -0.4798
    tmp = srcBones['thumb02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.L']]
    bones['thumb.02.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.L')
    bone.head[:] = 0.7762, 0.0234, 1.2058
    bone.tail[:] = 0.7851, 0.0218, 1.1749
    bone.roll = -1.8283
    tmp = srcBones['middle02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.L']]
    bones['f_middle.02.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.L')
    bone.head[:] = 0.7715, 0.0499, 1.207
    bone.tail[:] = 0.7794, 0.0494, 1.1762
    bone.roll = -1.8946
    tmp = srcBones['ring02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.L']]
    bones['f_ring.02.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.L')
    bone.head[:] = 0.7589, 0.0765, 1.2156
    bone.tail[:] = 0.7618, 0.077, 1.1932
    bone.roll = -1.9059
    tmp = srcBones['pinky02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.L']]
    bones['f_pinky.02.L'] = bone.name
    bone = arm.edit_bones.new('f_index.02.R')
    bone.head[:] = -0.7718, 0.0012, 1.2112
    bone.tail[:] = -0.784, -0.0003, 1.1858
    bone.roll = 1.8799
    tmp = srcBones['index02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.R']]
    bones['f_index.02.R'] = bone.name
    bone = arm.edit_bones.new('thumb.02.R')
    bone.head[:] = -0.6857, 0.0015, 1.2404
    bone.tail[:] = -0.7056, -0.0057, 1.2145
    bone.roll = 0.4798
    tmp = srcBones['thumb02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.R']]
    bones['thumb.02.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.R')
    bone.head[:] = -0.7762, 0.0233, 1.2058
    bone.tail[:] = -0.7851, 0.0218, 1.1749
    bone.roll = 1.8283
    tmp = srcBones['middle02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.R']]
    bones['f_middle.02.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.R')
    bone.head[:] = -0.7715, 0.0499, 1.207
    bone.tail[:] = -0.7794, 0.0494, 1.1762
    bone.roll = 1.8946
    tmp = srcBones['ring02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.R']]
    bones['f_ring.02.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.R')
    bone.head[:] = -0.7589, 0.0765, 1.2156
    bone.tail[:] = -0.7618, 0.077, 1.1932
    bone.roll = 1.9059
    tmp = srcBones['pinky02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.R']]
    bones['f_pinky.02.R'] = bone.name
    bone = arm.edit_bones.new('f_index.03.L')
    bone.head[:] = 0.784, -0.0003, 1.1858
    bone.tail[:] = 0.7892, 0.0006, 1.1636
    bone.roll = -1.676
    tmp = srcBones['index03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.L']]
    bones['f_index.03.L'] = bone.name
    bone = arm.edit_bones.new('thumb.03.L')
    bone.head[:] = 0.7056, -0.0057, 1.2145
    bone.tail[:] = 0.7194, -0.0098, 1.1995
    bone.roll = -0.5826
    tmp = srcBones['thumb03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.L']]
    bones['thumb.03.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.L')
    bone.head[:] = 0.7851, 0.0218, 1.1749
    bone.tail[:] = 0.7888, 0.0216, 1.1525
    bone.roll = -1.7483
    tmp = srcBones['middle03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.L']]
    bones['f_middle.03.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.L')
    bone.head[:] = 0.7794, 0.0494, 1.1762
    bone.tail[:] = 0.7781, 0.0498, 1.1577
    bone.roll = -1.6582
    tmp = srcBones['ring03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.L']]
    bones['f_ring.03.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.L')
    bone.head[:] = 0.7618, 0.077, 1.1932
    bone.tail[:] = 0.7611, 0.0772, 1.1782
    bone.roll = -1.7639
    tmp = srcBones['pinky03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.L']]
    bones['f_pinky.03.L'] = bone.name
    bone = arm.edit_bones.new('f_index.03.R')
    bone.head[:] = -0.784, -0.0003, 1.1858
    bone.tail[:] = -0.7892, 0.0006, 1.1636
    bone.roll = 1.676
    tmp = srcBones['index03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.R']]
    bones['f_index.03.R'] = bone.name
    bone = arm.edit_bones.new('thumb.03.R')
    bone.head[:] = -0.7056, -0.0057, 1.2145
    bone.tail[:] = -0.7194, -0.0098, 1.1995
    bone.roll = 0.5826
    tmp = srcBones['thumb03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.R']]
    bones['thumb.03.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.R')
    bone.head[:] = -0.7851, 0.0218, 1.1749
    bone.tail[:] = -0.7888, 0.0216, 1.1525
    bone.roll = 1.7483
    tmp = srcBones['middle03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.R']]
    bones['f_middle.03.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.R')
    bone.head[:] = -0.7794, 0.0494, 1.1762
    bone.tail[:] = -0.7781, 0.0498, 1.1577
    bone.roll = 1.6582
    tmp = srcBones['ring03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.R']]
    bones['f_ring.03.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.R')
    bone.head[:] = -0.7618, 0.077, 1.1932
    bone.tail[:] = -0.7611, 0.0772, 1.1782
    bone.roll = 1.7639
    tmp = srcBones['pinky03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.R']]
    bones['f_pinky.03.R'] = bone.name
    bpy.ops.object.mode_set(mode='OBJECT')
    pbone = obj.pose.bones[bones['spine']]
    pbone.rigify_type = 'spines.super_spine'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.neck_pos = 4
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            True, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.001']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thigh.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.limb_type = 'leg'
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, True, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, False, 
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thigh.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, True, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, True, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.limb_type = 'leg'
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.002']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.003']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.004']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shoulder.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['shoulder.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['breast.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['breast.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, True, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, True,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.005']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['upper_arm.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, True, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, True, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['upper_arm.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, False, False, False, False, False, False, True, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, 
            False, False, False, False, False, False, False, True, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['forearm.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['forearm.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        True, False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, 
        False, False, False, True, False, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.L']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.R']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False,
            False, False, True, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False, False, False, False, False, False, False, False, False, 
            False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = False, False, False
    pbone.lock_rotation = False, False, False
    pbone.lock_rotation_w = False
    pbone.lock_scale = False, False, False
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False, False, False, 
        False, False, False, False, False, False, False]
    bpy.ops.object.mode_set(mode='EDIT')
    for bone in arm.edit_bones:
        bone.select = False
        bone.select_head = False
        bone.select_tail = False
    for b in bones:
        bone = arm.edit_bones[bones[b]]
        bone.select = True
        bone.select_head = True
        bone.select_tail = True
        arm.edit_bones.active = bone
    arm.layers = [(x in [3, 5, 7, 10, 13, 16]) for x in range(32)]


print('Sadfsdfasdf')
o = bpy.context.object
mblName = o.name
print(mblName)
armature = bpy.context.object.find_armature()
print(armature)
boneData = {}
bpy.data.objects[armature.name].select = True
bpy.context.scene.objects.active = bpy.data.objects[armature.name]
bpy.ops.object.mode_set(mode='EDIT')
for b in bpy.context.object.data.edit_bones:
    boneData[b.name] = {'roll': b.roll, 'head': b.head, 'tail': b.tail}
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action='DESELECT')
if __name__ == '__main__':
    amt = bpy.data.armatures.new('ArmatureTest')
    ob = bpy.data.objects.new('ObjectTest2', amt)
    scn = bpy.context.scene
    scn.objects.link(ob)
    scn.objects.active = ob
    ob.select = True
    print(boneData['pelvis'])
    create(ob, boneData)

import bpy

from mathutils import Color
1

def create(obj, srcBones):
    # generated by rigify.utils.write_metarig
    
    #arm = bpy.data.armatures.new("metaRig")
    #ob = bpy.data.objects.new("MetatRigObject", arm)  
    #scn = bpy.context.scene
    #scn.objects.link(ob)
    #scn.objects.active = ob
    #ob.select = True
    #bpy.ops.object.mode_set(mode='EDIT')
    
    #arm = bpy.data.armatures.new("testArm")
    #bpy.ops.object.mode_set(mode='EDIT')
    #arm = obj.data

    bpy.ops.object.mode_set(mode='EDIT')
    arm = obj.data

    for i in range(12):
        arm.rigify_colors.add()

    arm.rigify_colors[0].name = "Root"
    arm.rigify_colors[0].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[0].normal = Color((0.4352940022945404, 0.18431399762630463, 0.4156860113143921))
    arm.rigify_colors[0].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[0].standard_colors_lock = True
    arm.rigify_colors[1].name = "IK"
    arm.rigify_colors[1].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[1].normal = Color((0.6039220094680786, 0.0, 0.0))
    arm.rigify_colors[1].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[1].standard_colors_lock = True
    arm.rigify_colors[2].name = "Special"
    arm.rigify_colors[2].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[2].normal = Color((0.9568629860877991, 0.7882350087165833, 0.04705899953842163))
    arm.rigify_colors[2].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[2].standard_colors_lock = True
    arm.rigify_colors[3].name = "Tweak"
    arm.rigify_colors[3].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[3].normal = Color((0.03921600058674812, 0.21176500618457794, 0.5803920030593872))
    arm.rigify_colors[3].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[3].standard_colors_lock = True
    arm.rigify_colors[4].name = "FK"
    arm.rigify_colors[4].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[4].normal = Color((0.11764699965715408, 0.5686269998550415, 0.035294000059366226))
    arm.rigify_colors[4].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[4].standard_colors_lock = True
    arm.rigify_colors[5].name = "Extra"
    arm.rigify_colors[5].active = Color((0.5490196347236633, 1.0, 1.0))
    arm.rigify_colors[5].normal = Color((0.9686279892921448, 0.2509799897670746, 0.09411799907684326))
    arm.rigify_colors[5].select = Color((0.31372547149658203, 0.7843138575553894, 1.0))
    arm.rigify_colors[5].standard_colors_lock = True
    arm.rigify_colors[6].name = " "
    arm.rigify_colors[6].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[6].standard_colors_lock = True
    arm.rigify_colors[7].name = " "
    arm.rigify_colors[7].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[7].standard_colors_lock = True
    arm.rigify_colors[8].name = " "
    arm.rigify_colors[8].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[8].standard_colors_lock = True
    arm.rigify_colors[9].name = " "
    arm.rigify_colors[9].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[9].standard_colors_lock = True
    arm.rigify_colors[10].name = " "
    arm.rigify_colors[10].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[10].standard_colors_lock = True
    arm.rigify_colors[11].name = " "
    arm.rigify_colors[11].active = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].normal = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].select = Color((1.0, 1.0, 1.0))
    arm.rigify_colors[11].standard_colors_lock = True

    for i in range(58):
        arm.rigify_layers.add()

    arm.rigify_layers[0].name = "Face"
    arm.rigify_layers[0].row = 1
    arm.rigify_layers[0].set = False
    arm.rigify_layers[0].group = 5
    arm.rigify_layers[1].name = "Face (Primary)"
    arm.rigify_layers[1].row = 2
    arm.rigify_layers[1].set = False
    arm.rigify_layers[1].group = 2
    arm.rigify_layers[2].name = "Face (Secondary)"
    arm.rigify_layers[2].row = 2
    arm.rigify_layers[2].set = False
    arm.rigify_layers[2].group = 3
    arm.rigify_layers[3].name = "Torso"
    arm.rigify_layers[3].row = 3
    arm.rigify_layers[3].set = False
    arm.rigify_layers[3].group = 3
    arm.rigify_layers[4].name = "Torso (Tweak)"
    arm.rigify_layers[4].row = 4
    arm.rigify_layers[4].set = False
    arm.rigify_layers[4].group = 4
    arm.rigify_layers[5].name = "Fingers"
    arm.rigify_layers[5].row = 5
    arm.rigify_layers[5].set = False
    arm.rigify_layers[5].group = 6
    arm.rigify_layers[6].name = "Fingers (Tweak)"
    arm.rigify_layers[6].row = 6
    arm.rigify_layers[6].set = False
    arm.rigify_layers[6].group = 4
    arm.rigify_layers[7].name = "Arm.L (IK)"
    arm.rigify_layers[7].row = 7
    arm.rigify_layers[7].set = False
    arm.rigify_layers[7].group = 2
    arm.rigify_layers[8].name = "Arm.L (FK)"
    arm.rigify_layers[8].row = 8
    arm.rigify_layers[8].set = False
    arm.rigify_layers[8].group = 5
    arm.rigify_layers[9].name = "Arm.L (Tweak)"
    arm.rigify_layers[9].row = 9
    arm.rigify_layers[9].set = False
    arm.rigify_layers[9].group = 4
    arm.rigify_layers[10].name = "Arm.R (IK)"
    arm.rigify_layers[10].row = 7
    arm.rigify_layers[10].set = False
    arm.rigify_layers[10].group = 2
    arm.rigify_layers[11].name = "Arm.R (FK)"
    arm.rigify_layers[11].row = 8
    arm.rigify_layers[11].set = False
    arm.rigify_layers[11].group = 5
    arm.rigify_layers[12].name = "Arm.R (Tweak)"
    arm.rigify_layers[12].row = 9
    arm.rigify_layers[12].set = False
    arm.rigify_layers[12].group = 4
    arm.rigify_layers[13].name = "Leg.L (IK)"
    arm.rigify_layers[13].row = 10
    arm.rigify_layers[13].set = False
    arm.rigify_layers[13].group = 2
    arm.rigify_layers[14].name = "Leg.L (FK)"
    arm.rigify_layers[14].row = 11
    arm.rigify_layers[14].set = False
    arm.rigify_layers[14].group = 5
    arm.rigify_layers[15].name = "Leg.L (Tweak)"
    arm.rigify_layers[15].row = 12
    arm.rigify_layers[15].set = False
    arm.rigify_layers[15].group = 4
    arm.rigify_layers[16].name = "Leg.R (IK)"
    arm.rigify_layers[16].row = 10
    arm.rigify_layers[16].set = False
    arm.rigify_layers[16].group = 2
    arm.rigify_layers[17].name = "Leg.R (FK)"
    arm.rigify_layers[17].row = 11
    arm.rigify_layers[17].set = False
    arm.rigify_layers[17].group = 5
    arm.rigify_layers[18].name = "Leg.R (Tweak)"
    arm.rigify_layers[18].row = 12
    arm.rigify_layers[18].set = False
    arm.rigify_layers[18].group = 4
    arm.rigify_layers[19].name = ""
    arm.rigify_layers[19].row = 1
    arm.rigify_layers[19].set = False
    arm.rigify_layers[19].group = 0
    arm.rigify_layers[20].name = ""
    arm.rigify_layers[20].row = 1
    arm.rigify_layers[20].set = False
    arm.rigify_layers[20].group = 0
    arm.rigify_layers[21].name = ""
    arm.rigify_layers[21].row = 1
    arm.rigify_layers[21].set = False
    arm.rigify_layers[21].group = 0
    arm.rigify_layers[22].name = ""
    arm.rigify_layers[22].row = 1
    arm.rigify_layers[22].set = False
    arm.rigify_layers[22].group = 0
    arm.rigify_layers[23].name = ""
    arm.rigify_layers[23].row = 1
    arm.rigify_layers[23].set = False
    arm.rigify_layers[23].group = 0
    arm.rigify_layers[24].name = ""
    arm.rigify_layers[24].row = 1
    arm.rigify_layers[24].set = False
    arm.rigify_layers[24].group = 0
    arm.rigify_layers[25].name = ""
    arm.rigify_layers[25].row = 1
    arm.rigify_layers[25].set = False
    arm.rigify_layers[25].group = 0
    arm.rigify_layers[26].name = ""
    arm.rigify_layers[26].row = 1
    arm.rigify_layers[26].set = False
    arm.rigify_layers[26].group = 0
    arm.rigify_layers[27].name = ""
    arm.rigify_layers[27].row = 1
    arm.rigify_layers[27].set = False
    arm.rigify_layers[27].group = 0
    arm.rigify_layers[28].name = "Root"
    arm.rigify_layers[28].row = 14
    arm.rigify_layers[28].set = False
    arm.rigify_layers[28].group = 1
    arm.rigify_layers[29].name = " "
    arm.rigify_layers[29].row = 1
    arm.rigify_layers[29].set = False
    arm.rigify_layers[29].group = 0
    arm.rigify_layers[30].name = " "
    arm.rigify_layers[30].row = 1
    arm.rigify_layers[30].set = False
    arm.rigify_layers[30].group = 0
    arm.rigify_layers[31].name = " "
    arm.rigify_layers[31].row = 1
    arm.rigify_layers[31].set = False
    arm.rigify_layers[31].group = 0
    arm.rigify_layers[32].name = " "
    arm.rigify_layers[32].row = 1
    arm.rigify_layers[32].set = False
    arm.rigify_layers[32].group = 0
    arm.rigify_layers[33].name = " "
    arm.rigify_layers[33].row = 1
    arm.rigify_layers[33].set = False
    arm.rigify_layers[33].group = 0
    arm.rigify_layers[34].name = " "
    arm.rigify_layers[34].row = 1
    arm.rigify_layers[34].set = False
    arm.rigify_layers[34].group = 0
    arm.rigify_layers[35].name = " "
    arm.rigify_layers[35].row = 1
    arm.rigify_layers[35].set = False
    arm.rigify_layers[35].group = 0
    arm.rigify_layers[36].name = " "
    arm.rigify_layers[36].row = 1
    arm.rigify_layers[36].set = False
    arm.rigify_layers[36].group = 0
    arm.rigify_layers[37].name = " "
    arm.rigify_layers[37].row = 1
    arm.rigify_layers[37].set = False
    arm.rigify_layers[37].group = 0
    arm.rigify_layers[38].name = " "
    arm.rigify_layers[38].row = 1
    arm.rigify_layers[38].set = False
    arm.rigify_layers[38].group = 0
    arm.rigify_layers[39].name = " "
    arm.rigify_layers[39].row = 1
    arm.rigify_layers[39].set = False
    arm.rigify_layers[39].group = 0
    arm.rigify_layers[40].name = " "
    arm.rigify_layers[40].row = 1
    arm.rigify_layers[40].set = False
    arm.rigify_layers[40].group = 0
    arm.rigify_layers[41].name = " "
    arm.rigify_layers[41].row = 1
    arm.rigify_layers[41].set = False
    arm.rigify_layers[41].group = 0
    arm.rigify_layers[42].name = " "
    arm.rigify_layers[42].row = 1
    arm.rigify_layers[42].set = False
    arm.rigify_layers[42].group = 0
    arm.rigify_layers[43].name = " "
    arm.rigify_layers[43].row = 1
    arm.rigify_layers[43].set = False
    arm.rigify_layers[43].group = 0
    arm.rigify_layers[44].name = " "
    arm.rigify_layers[44].row = 1
    arm.rigify_layers[44].set = False
    arm.rigify_layers[44].group = 0
    arm.rigify_layers[45].name = " "
    arm.rigify_layers[45].row = 1
    arm.rigify_layers[45].set = False
    arm.rigify_layers[45].group = 0
    arm.rigify_layers[46].name = " "
    arm.rigify_layers[46].row = 1
    arm.rigify_layers[46].set = False
    arm.rigify_layers[46].group = 0
    arm.rigify_layers[47].name = " "
    arm.rigify_layers[47].row = 1
    arm.rigify_layers[47].set = False
    arm.rigify_layers[47].group = 0
    arm.rigify_layers[48].name = " "
    arm.rigify_layers[48].row = 1
    arm.rigify_layers[48].set = False
    arm.rigify_layers[48].group = 0
    arm.rigify_layers[49].name = " "
    arm.rigify_layers[49].row = 1
    arm.rigify_layers[49].set = False
    arm.rigify_layers[49].group = 0
    arm.rigify_layers[50].name = " "
    arm.rigify_layers[50].row = 1
    arm.rigify_layers[50].set = False
    arm.rigify_layers[50].group = 0
    arm.rigify_layers[51].name = " "
    arm.rigify_layers[51].row = 1
    arm.rigify_layers[51].set = False
    arm.rigify_layers[51].group = 0
    arm.rigify_layers[52].name = " "
    arm.rigify_layers[52].row = 1
    arm.rigify_layers[52].set = False
    arm.rigify_layers[52].group = 0
    arm.rigify_layers[53].name = " "
    arm.rigify_layers[53].row = 1
    arm.rigify_layers[53].set = False
    arm.rigify_layers[53].group = 0
    arm.rigify_layers[54].name = " "
    arm.rigify_layers[54].row = 1
    arm.rigify_layers[54].set = False
    arm.rigify_layers[54].group = 0
    arm.rigify_layers[55].name = " "
    arm.rigify_layers[55].row = 1
    arm.rigify_layers[55].set = False
    arm.rigify_layers[55].group = 0
    arm.rigify_layers[56].name = " "
    arm.rigify_layers[56].row = 1
    arm.rigify_layers[56].set = False
    arm.rigify_layers[56].group = 0
    arm.rigify_layers[57].name = " "
    arm.rigify_layers[57].row = 1
    arm.rigify_layers[57].set = False
    arm.rigify_layers[57].group = 0

    bones = {}

    bone = arm.edit_bones.new('spine')
    #bone.head[:] = 0.0000, 0.0552, 1.0099
    #print(srcBones['pelvis'].head)
    ##print(bone.head)
    #bone.tail[:] = 0.0000, 0.0172, 1.1573
    #print(bone.tail)
    bone.head[:] = srcBones['pelvis']['head']
    bone.tail[:] = srcBones['pelvis']['tail']
    bone.roll = srcBones['pelvis']['roll']
    ##bone.roll = 0.0000
    bone.use_connect = False
    bones['spine'] = bone.name

    bone = arm.edit_bones.new('spine.001')
    #bone.head[:] = 0.0000, 0.0172, 1.1573
    #bone.tail[:] = 0.0000, 0.0004, 1.2929
    #bone.roll = 0.0000
    tmp = srcBones['spine01']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine']]
    bones['spine.001'] = bone.name
    bone = arm.edit_bones.new('thigh.L')
    bone.head[:] = 0.0980, 0.0124, 1.0720
    bone.tail[:] = 0.0980, -0.0286, 0.5372
    bone.roll = 0.0000

    tmp = srcBones['thigh_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.L'] = bone.name
    bone = arm.edit_bones.new('thigh.R')
    bone.head[:] = -0.0980, 0.0124, 1.0720
    bone.tail[:] = -0.0980, -0.0286, 0.5372
    bone.roll = 0.000
    tmp = srcBones['thigh_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine']]
    bones['thigh.R'] = bone.name
    bone = arm.edit_bones.new('spine.002')
    bone.head[:] = 0.0000, 0.0004, 1.2929
    bone.tail[:] = 0.0000, 0.0059, 1.4657
    bone.roll = 0.0000
    tmp = srcBones['spine02']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.001']]
    bones['spine.002'] = bone.name
    bone = arm.edit_bones.new('shin.L')
    bone.head[:] = 0.0980, -0.0286, 0.5372
    bone.tail[:] = 0.0980, 0.0162, 0.0852
    bone.roll = 0.0000
    tmp = srcBones['calf_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.L']]
    bones['shin.L'] = bone.name
    bone = arm.edit_bones.new('shin.R')
    bone.head[:] = -0.0980, -0.0286, 0.5372
    bone.tail[:] = -0.0980, 0.0162, 0.0852
    bone.roll = 0.0000
    tmp = srcBones['calf_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thigh.R']]
    bones['shin.R'] = bone.name
    bone = arm.edit_bones.new('spine.003')
    bone.head[:] = 0.0000, 0.0059, 1.4657
    bone.tail[:] = 0.0000, 0.0114, 1.6582
    bone.roll = 0.0000
    tmp = srcBones['spine03']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.002']]
    bones['spine.003'] = bone.name
    bone = arm.edit_bones.new('foot.L')
    bone.head[:] = 0.0980, 0.0162, 0.0852
    bone.tail[:] = 0.0980, -0.0934, 0.0167
    bone.roll = 0.0000
    tmp = srcBones['foot_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.L']]
    bones['foot.L'] = bone.name
    bone = arm.edit_bones.new('foot.R')
    bone.head[:] = -0.0980, 0.0162, 0.0852
    bone.tail[:] = -0.0980, -0.0934, 0.0167
    bone.roll = -0.0000
    tmp = srcBones['foot_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['shin.R']]
    bones['foot.R'] = bone.name
    bone = arm.edit_bones.new('spine.004')
    bone.head[:] = 0.0000, 0.0114, 1.6582
    bone.tail[:] = 0.0000, -0.0130, 1.7197
    bone.roll = 0.0000
    tmp = srcBones['neck']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['spine.004'] = bone.name
    bone = arm.edit_bones.new('shoulder.L')
    bone.head[:] = 0.0183, -0.0684, 1.6051
    bone.tail[:] = 0.1694, 0.0205, 1.6050
    bone.roll = 0.0004
    tmp = srcBones['clavicle_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.L'] = bone.name
    bone = arm.edit_bones.new('shoulder.R')
    bone.head[:] = -0.0183, -0.0684, 1.6051
    bone.tail[:] = -0.1694, 0.0205, 1.6050
    bone.roll = -0.0004
    tmp = srcBones['clavicle_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['shoulder.R'] = bone.name
    bone = arm.edit_bones.new('breast.L')
    bone.head[:] = 0.1184, 0.0485, 1.4596
    bone.tail[:] = 0.1184, -0.0907, 1.4596
    bone.roll = 0.0000
    tmp = srcBones['breast_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.L'] = bone.name
    bone = arm.edit_bones.new('breast.R')
    bone.head[:] = -0.1184, 0.0485, 1.4596
    bone.tail[:] = -0.1184, -0.0907, 1.4596
    bone.roll = -0.0000
    tmp = srcBones['breast_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['spine.003']]
    bones['breast.R'] = bone.name
    bone = arm.edit_bones.new('toe.L')
    bone.head[:] = 0.0980, -0.0934, 0.0167
    bone.tail[:] = 0.0980, -0.1606, 0.0167
    bone.roll = -0.0000
    tmp = srcBones['toes_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['toe.L'] = bone.name
    bone = arm.edit_bones.new('heel.02.L')
    bone.head[:] = 0.0600, 0.0459, 0.0000
    bone.tail[:] = 0.1400, 0.0459, 0.0000
    bone.roll = 0.0000
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.L']]
    bones['heel.02.L'] = bone.name
    bone = arm.edit_bones.new('toe.R')
    bone.head[:] = -0.0980, -0.0934, 0.0167
    bone.tail[:] = -0.0980, -0.1606, 0.0167
    bone.roll = 0.0000
    tmp = srcBones['toes_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['toe.R'] = bone.name
    bone = arm.edit_bones.new('heel.02.R')
    bone.head[:] = -0.0600, 0.0459, 0.0000
    bone.tail[:] = -0.1400, 0.0459, 0.0000
    bone.roll = -0.0000
    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['foot.R']]
    bones['heel.02.R'] = bone.name
    bone = arm.edit_bones.new('spine.005')
    bone.head[:] = 0.0000, -0.0130, 1.7197
    bone.tail[:] = 0.0000, -0.0247, 1.7813
    bone.roll = 0.0000
    tmp = srcBones['head']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['spine.004']]
    bones['spine.005'] = bone.name
    bone = arm.edit_bones.new('upper_arm.L')
    bone.head[:] = 0.1953, 0.0267, 1.5846
    bone.tail[:] = 0.4424, 0.0885, 1.4491
    bone.roll = 2.0724
    tmp = srcBones['upperarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.L']]
    bones['upper_arm.L'] = bone.name
    bone = arm.edit_bones.new('upper_arm.R')
    bone.head[:] = -0.1953, 0.0267, 1.5846
    bone.tail[:] = -0.4424, 0.0885, 1.4491
    bone.roll = -2.0724
    tmp = srcBones['upperarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['shoulder.R']]
    bones['upper_arm.R'] = bone.name
    bone = arm.edit_bones.new('forearm.L')
    bone.head[:] = 0.4424, 0.0885, 1.4491
    bone.tail[:] = 0.6594, 0.0492, 1.3061
    bone.roll = 2.1535
    tmp = srcBones['lowerarm_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']
    
    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.L']]
    bones['forearm.L'] = bone.name
    bone = arm.edit_bones.new('forearm.R')
    bone.head[:] = -0.4424, 0.0885, 1.4491
    bone.tail[:] = -0.6594, 0.0492, 1.3061
    bone.roll = -2.1535
    tmp = srcBones['lowerarm_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['upper_arm.R']]
    bones['forearm.R'] = bone.name
    bone = arm.edit_bones.new('hand.L')
    bone.head[:] = 0.6594, 0.0492, 1.3061
    bone.tail[:] = 0.7234, 0.0412, 1.2585
    bone.roll = 2.2103
    tmp = srcBones['hand_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.L']]
    bones['hand.L'] = bone.name
    bone = arm.edit_bones.new('hand.R')
    bone.head[:] = -0.6594, 0.0492, 1.3061
    bone.tail[:] = -0.7234, 0.0412, 1.2585
    bone.roll = -2.2103
    tmp = srcBones['hand_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['forearm.R']]
    bones['hand.R'] = bone.name
    bone = arm.edit_bones.new('palm.01.L')
    bone.head[:] = 0.6921, 0.0224, 1.2882
    bone.tail[:] = 0.7464, 0.0051, 1.2482
    bone.roll = -2.4928
    tmp = srcBones['index00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.01.L'] = bone.name
    bone = arm.edit_bones.new('palm.02.L')
    bone.head[:] = 0.6970, 0.0389, 1.2877
    bone.tail[:] = 0.7518, 0.0277, 1.2487
    bone.roll = -2.5274
    tmp = srcBones['middle00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.02.L'] = bone.name
    bone = arm.edit_bones.new('palm.03.L')
    bone.head[:] = 0.6963, 0.0545, 1.2874
    bone.tail[:] = 0.7540, 0.0521, 1.2482
    bone.roll = -2.5843
    tmp = srcBones['ring00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.03.L'] = bone.name
    bone = arm.edit_bones.new('palm.04.L')
    bone.head[:] = 0.6929, 0.0696, 1.2871
    bone.tail[:] = 0.7528, 0.0763, 1.2428
    bone.roll = -2.5155
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.L']]
    bones['palm.04.L'] = bone.name
    bone = arm.edit_bones.new('palm.01.R')
    bone.head[:] = -0.6921, 0.0224, 1.2882
    bone.tail[:] = -0.7464, 0.0051, 1.2482
    bone.roll = 2.4928
    tmp = srcBones['index00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.01.R'] = bone.name
    bone = arm.edit_bones.new('palm.02.R')
    bone.head[:] = -0.6970, 0.0389, 1.2877
    bone.tail[:] = -0.7518, 0.0277, 1.2487
    bone.roll = 2.5274
    tmp = srcBones['middle00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.02.R'] = bone.name
    bone = arm.edit_bones.new('palm.03.R')
    bone.head[:] = -0.6963, 0.0544, 1.2874
    bone.tail[:] = -0.7540, 0.0521, 1.2482
    bone.roll = 2.5843
    tmp = srcBones['ring00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.03.R'] = bone.name
    bone = arm.edit_bones.new('palm.04.R')
    bone.head[:] = -0.6929, 0.0696, 1.2871
    bone.tail[:] = -0.7528, 0.0763, 1.2428
    bone.roll = 2.5155
        
    tmp = srcBones['pinky00_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['hand.R']]
    bones['palm.04.R'] = bone.name
    bone = arm.edit_bones.new('f_index.01.L')
    bone.head[:] = 0.7464, 0.0051, 1.2482
    bone.tail[:] = 0.7718, 0.0013, 1.2112
    bone.roll = -2.0315
    
    tmp = srcBones['index01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['f_index.01.L'] = bone.name
    bone = arm.edit_bones.new('thumb.01.L')
    bone.head[:] = 0.6705, 0.0214, 1.2738
    bone.tail[:] = 0.6857, 0.0015, 1.2404
    bone.roll = -0.1587
    tmp = srcBones['thumb01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.L']]
    bones['thumb.01.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.L')
    bone.head[:] = 0.7518, 0.0277, 1.2487
    bone.tail[:] = 0.7762, 0.0234, 1.2058
    bone.roll = -2.0067
    tmp = srcBones['middle01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.L']]
    bones['f_middle.01.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.L')
    bone.head[:] = 0.7540, 0.0521, 1.2482
    bone.tail[:] = 0.7715, 0.0499, 1.2070
    bone.roll = -2.0082
    tmp = srcBones['ring01_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.L']]
    bones['f_ring.01.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.L')
    bone.head[:] = 0.7528, 0.0763, 1.2428
    bone.tail[:] = 0.7589, 0.0765, 1.2156
    bone.roll = -1.9749
    tmp = srcBones['pinky00_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.L']]
    bones['f_pinky.01.L'] = bone.name
    bone = arm.edit_bones.new('f_index.01.R')
    bone.head[:] = -0.7464, 0.0051, 1.2482
    bone.tail[:] = -0.7718, 0.0012, 1.2112
    bone.roll = 2.0315
    tmp = srcBones['index01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['f_index.01.R'] = bone.name
    bone = arm.edit_bones.new('thumb.01.R')
    bone.head[:] = -0.6705, 0.0214, 1.2738
    bone.tail[:] = -0.6857, 0.0015, 1.2404
    bone.roll = 0.1587
    tmp = srcBones['thumb01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.01.R']]
    bones['thumb.01.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.01.R')
    bone.head[:] = -0.7518, 0.0277, 1.2487
    bone.tail[:] = -0.7762, 0.0233, 1.2058
    bone.roll = 2.0067
    tmp = srcBones['middle01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.02.R']]
    bones['f_middle.01.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.01.R')
    bone.head[:] = -0.7540, 0.0521, 1.2482
    bone.tail[:] = -0.7715, 0.0499, 1.2070
    bone.roll = 2.0082
    tmp = srcBones['ring01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.03.R']]
    bones['f_ring.01.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.01.R')
    bone.head[:] = -0.7528, 0.0763, 1.2428
    bone.tail[:] = -0.7589, 0.0765, 1.2156
    bone.roll = 1.9749
    tmp = srcBones['pinky01_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = False
    bone.parent = arm.edit_bones[bones['palm.04.R']]
    bones['f_pinky.01.R'] = bone.name
    bone = arm.edit_bones.new('f_index.02.L')
    bone.head[:] = 0.7718, 0.0013, 1.2112
    bone.tail[:] = 0.7840, -0.0003, 1.1858
    bone.roll = -1.8799
    tmp = srcBones['index02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.L']]
    bones['f_index.02.L'] = bone.name
    bone = arm.edit_bones.new('thumb.02.L')
    bone.head[:] = 0.6857, 0.0015, 1.2404
    bone.tail[:] = 0.7056, -0.0057, 1.2145
    bone.roll = -0.4798
    tmp = srcBones['thumb02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.L']]
    bones['thumb.02.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.L')
    bone.head[:] = 0.7762, 0.0234, 1.2058
    bone.tail[:] = 0.7851, 0.0218, 1.1749
    bone.roll = -1.8283
    tmp = srcBones['middle02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.L']]
    bones['f_middle.02.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.L')
    bone.head[:] = 0.7715, 0.0499, 1.2070
    bone.tail[:] = 0.7794, 0.0494, 1.1762
    bone.roll = -1.8946
    tmp = srcBones['ring02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.L']]
    bones['f_ring.02.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.L')
    bone.head[:] = 0.7589, 0.0765, 1.2156
    bone.tail[:] = 0.7618, 0.0770, 1.1932
    bone.roll = -1.9059
    tmp = srcBones['pinky02_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.L']]
    bones['f_pinky.02.L'] = bone.name
    bone = arm.edit_bones.new('f_index.02.R')
    bone.head[:] = -0.7718, 0.0012, 1.2112
    bone.tail[:] = -0.7840, -0.0003, 1.1858
    bone.roll = 1.8799
    tmp = srcBones['index02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.01.R']]
    bones['f_index.02.R'] = bone.name
    bone = arm.edit_bones.new('thumb.02.R')
    bone.head[:] = -0.6857, 0.0015, 1.2404
    bone.tail[:] = -0.7056, -0.0057, 1.2145
    bone.roll = 0.4798
    tmp = srcBones['thumb02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.01.R']]
    bones['thumb.02.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.02.R')
    bone.head[:] = -0.7762, 0.0233, 1.2058
    bone.tail[:] = -0.7851, 0.0218, 1.1749
    bone.roll = 1.8283
    tmp = srcBones['middle02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.01.R']]
    bones['f_middle.02.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.02.R')
    bone.head[:] = -0.7715, 0.0499, 1.2070
    bone.tail[:] = -0.7794, 0.0494, 1.1762
    bone.roll = 1.8946
    tmp = srcBones['ring02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.01.R']]
    bones['f_ring.02.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.02.R')
    bone.head[:] = -0.7589, 0.0765, 1.2156
    bone.tail[:] = -0.7618, 0.0770, 1.1932
    bone.roll = 1.9059
    tmp = srcBones['pinky02_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.01.R']]
    bones['f_pinky.02.R'] = bone.name
    bone = arm.edit_bones.new('f_index.03.L')
    bone.head[:] = 0.7840, -0.0003, 1.1858
    bone.tail[:] = 0.7892, 0.0006, 1.1636
    bone.roll = -1.6760
    tmp = srcBones['index03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.L']]
    bones['f_index.03.L'] = bone.name
    bone = arm.edit_bones.new('thumb.03.L')
    bone.head[:] = 0.7056, -0.0057, 1.2145
    bone.tail[:] = 0.7194, -0.0098, 1.1995
    bone.roll = -0.5826
    tmp = srcBones['thumb03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.L']]
    bones['thumb.03.L'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.L')
    bone.head[:] = 0.7851, 0.0218, 1.1749
    bone.tail[:] = 0.7888, 0.0216, 1.1525
    bone.roll = -1.7483
    tmp = srcBones['middle03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.L']]
    bones['f_middle.03.L'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.L')
    bone.head[:] = 0.7794, 0.0494, 1.1762
    bone.tail[:] = 0.7781, 0.0498, 1.1577
    bone.roll = -1.6582
    tmp = srcBones['ring03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.L']]
    bones['f_ring.03.L'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.L')
    bone.head[:] = 0.7618, 0.0770, 1.1932
    bone.tail[:] = 0.7611, 0.0772, 1.1782
    bone.roll = -1.7639
    tmp = srcBones['pinky03_L']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.L']]
    bones['f_pinky.03.L'] = bone.name
    bone = arm.edit_bones.new('f_index.03.R')
    bone.head[:] = -0.7840, -0.0003, 1.1858
    bone.tail[:] = -0.7892, 0.0006, 1.1636
    bone.roll = 1.6760
    tmp = srcBones['index03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_index.02.R']]
    bones['f_index.03.R'] = bone.name
    bone = arm.edit_bones.new('thumb.03.R')
    bone.head[:] = -0.7056, -0.0057, 1.2145
    bone.tail[:] = -0.7194, -0.0098, 1.1995
    bone.roll = 0.5826
    tmp = srcBones['thumb03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['thumb.02.R']]
    bones['thumb.03.R'] = bone.name
    bone = arm.edit_bones.new('f_middle.03.R')
    bone.head[:] = -0.7851, 0.0218, 1.1749
    bone.tail[:] = -0.7888, 0.0216, 1.1525
    bone.roll = 1.7483
    tmp = srcBones['middle03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_middle.02.R']]
    bones['f_middle.03.R'] = bone.name
    bone = arm.edit_bones.new('f_ring.03.R')
    bone.head[:] = -0.7794, 0.0494, 1.1762
    bone.tail[:] = -0.7781, 0.0498, 1.1577
    bone.roll = 1.6582
    tmp = srcBones['ring03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_ring.02.R']]
    bones['f_ring.03.R'] = bone.name
    bone = arm.edit_bones.new('f_pinky.03.R')
    bone.head[:] = -0.7618, 0.0770, 1.1932
    bone.tail[:] = -0.7611, 0.0772, 1.1782
    bone.roll = 1.7639
    tmp = srcBones['pinky03_R']
    bone.head[:] = tmp['head']
    bone.tail[:] = tmp['tail']
    bone.roll = tmp['roll']

    bone.use_connect = True
    bone.parent = arm.edit_bones[bones['f_pinky.02.R']]
    bones['f_pinky.03.R'] = bone.name

    bpy.ops.object.mode_set(mode='OBJECT')
    pbone = obj.pose.bones[bones['spine']]
    pbone.rigify_type = 'spines.super_spine'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.neck_pos = 4
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.001']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thigh.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.limb_type = "leg"
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thigh.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.limb_type = "leg"
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['spine.002']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shin.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.003']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['foot.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.004']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['shoulder.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['shoulder.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.make_widget = False
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['breast.L']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['breast.R']]
    pbone.rigify_type = 'basic.super_copy'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['toe.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['heel.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['spine.005']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['upper_arm.L']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['upper_arm.R']]
    pbone.rigify_type = 'limbs.super_limb'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.fk_layers = [False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['forearm.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['forearm.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['hand.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.L']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.01.R']]
    pbone.rigify_type = 'limbs.super_palm'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['palm.04.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'YXZ'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.L']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['thumb.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_middle.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_ring.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_pinky.01.R']]
    pbone.rigify_type = 'limbs.simple_tentacle'
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    try:
        pbone.rigify_parameters.tweak_extra_layers = True
    except AttributeError:
        pass
    try:
        pbone.rigify_parameters.tweak_layers = [False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    except AttributeError:
        pass
    pbone = obj.pose.bones[bones['f_index.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.02.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.L']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_index.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['thumb.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_middle.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_ring.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
    pbone = obj.pose.bones[bones['f_pinky.03.R']]
    pbone.rigify_type = ''
    pbone.lock_location = (False, False, False)
    pbone.lock_rotation = (False, False, False)
    pbone.lock_rotation_w = False
    pbone.lock_scale = (False, False, False)
    pbone.rotation_mode = 'QUATERNION'
    pbone.bone.layers = [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]

    bpy.ops.object.mode_set(mode='EDIT')
    for bone in arm.edit_bones:
        bone.select = False
        bone.select_head = False
        bone.select_tail = False
    for b in bones:
        bone = arm.edit_bones[bones[b]]
        bone.select = True
        bone.select_head = True
        bone.select_tail = True
        arm.edit_bones.active = bone

    arm.layers = [(x in [3, 5, 7, 10, 13, 16]) for x in range(32)]
    #ob = bpy.data.objects.new("testObj", arm)


print("Sadfsdfasdf")
o = bpy.context.object

mblName = o.name
print(mblName)
armature = bpy.context.object.find_armature()
print(armature)

#bones = armature.data.bones
#bpy.ops.object.mode_set(mode='EDIT')

boneData = {}
bpy.data.objects[armature.name].select = True
bpy.context.scene.objects.active = bpy.data.objects[armature.name]
bpy.ops.object.mode_set(mode='EDIT')
for b in bpy.context.object.data.edit_bones:
    boneData[b.name] = {'roll': b.roll, 'head': b.head,'tail': b.tail}
bpy.ops.object.mode_set(mode='OBJECT')

#print(boneData)
#   print(b.name, b.roll, b.head, b.tail)

#bpy.ops.object.armature_human_metarig_add()
#target = bpy.context.object
#targetBones = target.data.bones;
#print(targetBones)

#for b in targetBones:
#    print(b.name)

#targetBones = target.bones

#print(armature.name)


#for b in targetBones:
#    print(type(b))    

bpy.ops.object.select_all(action='DESELECT')
if __name__ == "__main__":
    amt = bpy.data.armatures.new("ArmatureTest")
    ob = bpy.data.objects.new("ObjectTest2", amt)
    
    scn = bpy.context.scene
    scn.objects.link(ob)
    scn.objects.active = ob
    ob.select = True
    print(boneData['pelvis'])
    create(ob, boneData)
