##Section 1-----------------------------------------------------------------------------
##Move cockpits to layer 2
bpy.ops.object.select_pattern(pattern="*_cockpit_standard*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
##Move first person props to layer 5
bpy.ops.object.select_pattern(pattern="*_prop*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
##Move Damaged to layer 7
bpy.ops.object.select_pattern(pattern="*_damaged*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False))
##Move blanks to layer 6
bpy.ops.object.select_pattern(pattern="*_blank*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
##Move armature to layer 8
bpy.ops.object.select_pattern(pattern="*Armature*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False))
##Move founder, phoenix and hero items/geometry to layer 4
bpy.ops.object.select_pattern(pattern="*_founder*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_phoenix*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_hero*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_speakers*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
##Move all weapons systems to layer 3
bpy.ops.object.select_pattern(pattern="*_laser*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_lrm*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_srm*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_missile*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_missle*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_ppc*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_erppc*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_eppc*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_ac2*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_ac5*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_ac1*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_gauss*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_guass*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_hero_ac*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_ams*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_lbx*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_flamer*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_uac*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_mg*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_machinegun*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_narc*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_right_drg_5n*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*_2x_shield*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.object.select_pattern(pattern="*tbr_left_torso_shoulder_box_eh1*", case_sensitive=False, extend=False)
bpy.ops.object.move_to_layer(layers=(False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
##Section 2------------------------------------------------------------------------------
## MANUALLY SELECT LAYER 3 then move some stuff back:
bpy.ops.object.select_all(action='DESELECT')
bpy.data.objects['aws_right_arm_forearm_9m_eppc'].select = True
bpy.data.objects['cplt_left_arm_forearm_missile2_mh1'].select = True
bpy.data.objects['cplt_right_arm_forearm_missile2_mh1'].select = True
bpy.data.objects['cn9_right_arm_forearm_a_ac10'].select = True
bpy.data.objects['commando_torso_1b_srm2'].select = True
bpy.ops.object.move_to_layer(layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
##section 3-----------------------------------------------------------------------------
## MANUALLY SELECT LAYER 6 then move some stuff back:
bpy.ops.object.select_all(action='DESELECT')
bpy.data.objects['on1_left_torso_blank_mh1'].select = True
bpy.data.objects['jr7_left_arm_forearm_blank'].select = True
bpy.data.objects['jr7_right_arm_forearm_blank'].select = True
bpy.data.objects['jr7_center_torso_jr7k_blank_mh1'].select = True
bpy.data.objects['tbr_left_torso_shoulder_blank'].select = True
bpy.data.objects['tbr_right_torso_shoulder_blank'].select = True
bpy.ops.object.move_to_layer(layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))