-
Notifications
You must be signed in to change notification settings - Fork 0
/
macro_aimlayers.qci
161 lines (148 loc) · 12.8 KB
/
macro_aimlayers.qci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// ----------------------------------------------------------------------------
// MAKE AIM LAYERS
//
// Used for creating MP aimlayers. All of them use the AimLayerWL weightlist.
// MakeAimLayerNoLeftHandIK is used for one-handed weapons (e.g. crowbar).
// The difference between MakeAimLayer and MakeAimLayerB is unknown.
// ----------------------------------------------------------------------------
// ------------------------------------
// MAKE AIMLAYER, WITH LEFT HAND IK
// ------------------------------------
$definemacro MakeAimLayer layername filename \\
$animation a_$layername$_neutral $filename$ frame 4 4 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_down_left $filename$ frame 0 0 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_down_center $filename$ frame 1 1 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_down_right $filename$ frame 2 2 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_mid_left $filename$ frame 3 3 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_mid_center $filename$ frame 4 4 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_mid_right $filename$ frame 5 5 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_up_left $filename$ frame 6 6 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_up_center $filename$ frame 7 7 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_up_right $filename$ frame 8 8 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
// $animation a_$layername$_straight_up $filename$ frame 7 7 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$sequence $layername$ { \\
// a_$layername$_straight_up a_$layername$_straight_up a_$layername$_straight_up \\
a_$layername$_up_right a_$layername$_up_center a_$layername$_up_left \\
a_$layername$_mid_right a_$layername$_mid_center a_$layername$_mid_left \\
a_$layername$_down_right a_$layername$_down_center a_$layername$_down_left \\
blendref a_$layername$_neutral \\
blendcenter a_$layername$_mid_center \\
blendwidth 3 calcblend aim_yaw "anim_attachment_RH" ZR calcblend aim_pitch "anim_attachment_RH" YR \\
delta \\
iklock rfoot 1 0 iklock lfoot 1 0 \\
hidden \\
} \\
$continue $layername$
// ------------------------------------
// MAKE AIMLAYER, NO LEFT HAND IK
// ------------------------------------
$definemacro MakeAimLayerNoLeftHandIK layername filename \\
$animation a_$layername$_neutral $filename$ frame 4 4 weightlist AimLayerWL \\
$animation a_$layername$_down_left $filename$ frame 0 0 subtract a_$layername$_neutral 0 weightlist AimLayerWL \\
$animation a_$layername$_down_center $filename$ frame 1 1 subtract a_$layername$_neutral 0 weightlist AimLayerWL \\
$animation a_$layername$_down_right $filename$ frame 2 2 subtract a_$layername$_neutral 0 weightlist AimLayerWL \\
$animation a_$layername$_mid_left $filename$ frame 3 3 subtract a_$layername$_neutral 0 weightlist AimLayerWL \\
$animation a_$layername$_mid_center $filename$ frame 4 4 subtract a_$layername$_neutral 0 weightlist AimLayerWL \\
$animation a_$layername$_mid_right $filename$ frame 5 5 subtract a_$layername$_neutral 0 weightlist AimLayerWL \\
$animation a_$layername$_up_left $filename$ frame 6 6 subtract a_$layername$_neutral 0 weightlist AimLayerWL \\
$animation a_$layername$_up_center $filename$ frame 7 7 subtract a_$layername$_neutral 0 weightlist AimLayerWL \\
$animation a_$layername$_up_right $filename$ frame 8 8 subtract a_$layername$_neutral 0 weightlist AimLayerWL \\
// $animation a_$layername$_straight_up $filename$ frame 7 7 subtract a_$layername$_neutral 0 weightlist AimLayerWL \\
$sequence $layername$ { \\
// a_$layername$_straight_up a_$layername$_straight_up a_$layername$_straight_up \\
a_$layername$_up_right a_$layername$_up_center a_$layername$_up_left \\
a_$layername$_mid_right a_$layername$_mid_center a_$layername$_mid_left \\
a_$layername$_down_right a_$layername$_down_center a_$layername$_down_left \\
blendref a_$layername$_neutral \\
blendcenter a_$layername$_mid_center \\
blendwidth 3 calcblend aim_yaw "anim_attachment_RH" ZR calcblend aim_pitch "anim_attachment_RH" YR \\
delta \\
iklock rfoot 1 0 iklock lfoot 1 0 \\
hidden \\
} \\
$continue $layername$
// ------------------------------------
// MAKE AIMLAYER, TELEKINESIS
// ------------------------------------
// putting the hand facing the ground causes calcblend to go all over the place. love you too, source.
// for this reason, aimlayer_magic has a pistol pose that gets delta'd to the hand facing downwards.
$sequence aimlayer_magic_delta_ref "../aimlayers/aimlayer_magic" hidden
$animation a_aimlayer_magic_delta "../aimlayers/aimlayer_magic_delta" subtract aimlayer_magic_delta_ref 4
$sequence aimlayer_magic_delta a_aimlayer_magic_delta loop fps 1 delta hidden
$definemacro MakeAimLayerTelekinesis layername filename \\
$animation a_$layername$_neutral $filename$ frame 4 4 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_down_left $filename$ frame 0 0 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_down_center $filename$ frame 1 1 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_down_right $filename$ frame 2 2 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_mid_left $filename$ frame 3 3 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_mid_center $filename$ frame 4 4 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_mid_right $filename$ frame 5 5 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_up_left $filename$ frame 6 6 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_up_center $filename$ frame 7 7 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_up_right $filename$ frame 8 8 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$sequence $layername$ { \\
// a_$layername$_straight_up a_$layername$_straight_up a_$layername$_straight_up \\
a_$layername$_up_right a_$layername$_up_center a_$layername$_up_left \\
a_$layername$_mid_right a_$layername$_mid_center a_$layername$_mid_left \\
a_$layername$_down_right a_$layername$_down_center a_$layername$_down_left \\
blendref a_$layername$_neutral \\
blendcenter a_$layername$_mid_center \\
blendwidth 3 calcblend aim_yaw "anim_attachment_RH" ZR calcblend aim_pitch "anim_attachment_RH" YR \\
delta \\
addlayer aimlayer_magic_delta \\
iklock rfoot 1 0 iklock lfoot 1 0 \\
hidden \\
} \\
$continue $layername$
// ------------------------------------
// MAKE AIMLAYER, CAMERA
// ------------------------------------
// same as regular one, just with an added rule so the hands get locked to the head..
$definemacro MakeAimLayerCamera layername filename \\
$animation a_$layername$_neutral $filename$ frame 4 4 weightlist AimLayerWL ikrule rhand touch "ValveBiped.Bip01_Head1" usesource ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_down_left $filename$ frame 0 0 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule rhand touch "ValveBiped.Bip01_Head1" usesource ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_down_center $filename$ frame 1 1 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule rhand touch "ValveBiped.Bip01_Head1" usesource ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_down_right $filename$ frame 2 2 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule rhand touch "ValveBiped.Bip01_Head1" usesource ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_mid_left $filename$ frame 3 3 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule rhand touch "ValveBiped.Bip01_Head1" usesource ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_mid_center $filename$ frame 4 4 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule rhand touch "ValveBiped.Bip01_Head1" usesource ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_mid_right $filename$ frame 5 5 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule rhand touch "ValveBiped.Bip01_Head1" usesource ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_up_left $filename$ frame 6 6 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule rhand touch "ValveBiped.Bip01_Head1" usesource ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_up_center $filename$ frame 7 7 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule rhand touch "ValveBiped.Bip01_Head1" usesource ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$animation a_$layername$_up_right $filename$ frame 8 8 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule rhand touch "ValveBiped.Bip01_Head1" usesource ikrule lhand touch "ValveBiped.Bip01_Head1" usesource \\
$sequence $layername$ { \\
// a_$layername$_straight_up a_$layername$_straight_up a_$layername$_straight_up \\
a_$layername$_up_right a_$layername$_up_center a_$layername$_up_left \\
a_$layername$_mid_right a_$layername$_mid_center a_$layername$_mid_left \\
a_$layername$_down_right a_$layername$_down_center a_$layername$_down_left \\
blendref a_$layername$_neutral \\
blendcenter a_$layername$_mid_center \\
blendwidth 3 calcblend aim_yaw "anim_attachment_RH" ZR calcblend aim_pitch "anim_attachment_RH" YR \\
delta \\
iklock rfoot 1 0 iklock lfoot 1 0 \\
hidden \\
} \\
$continue $layername$
// ------------------------------------
// MAKE AIMLAYER B, WITH LEFT HAND IK
// ------------------------------------
$definemacro MakeAimLayerB layername filename \\
$animation a_$layername$_neutral $filename$ frame 1 1 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_mid_left $filename$ frame 0 0 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_mid_center $filename$ frame 1 1 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_mid_right $filename$ frame 2 2 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_up_left $filename$ frame 3 3 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_up_center $filename$ frame 4 4 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_up_right $filename$ frame 5 5 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_straight_up $filename$ frame 6 6 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$sequence $layername$ { \\
a_$layername$_straight_up a_$layername$_straight_up a_$layername$_straight_up \\
a_$layername$_up_right a_$layername$_up_center a_$layername$_up_left \\
a_$layername$_mid_right a_$layername$_mid_center a_$layername$_mid_left \\
blendref a_$layername$_neutral \\
blendcenter a_$layername$_mid_center \\
blendwidth 3 calcblend aim_yaw "anim_attachment_RH" ZR calcblend aim_pitch "anim_attachment_RH" YR \\
delta \\
iklock rfoot 1 0 iklock lfoot 1 0 \\
hidden \\
} \\
$continue $layername$