Animating Weapons for Counter-Strike Source/Idle Animation

=Setting Up=
 * Open css-lr300-idle.exp

Finding the Length of the Animation

 * Find your default folder, which contains the decompiled default sg552.
 * Open idle.smd in a text editor.


 * Scroll to the bottom of the file.
 * Now scroll up and find the nearest line that reads time #.
 * Subtract one from this number. The frame range for this animation is 0-15.

Changing the Length of the Animation in XSI

 * Locate the timeline in XSI. It is near the bottom of the screen and has many numbers running across it.
 * Look to the left of the timeline. There are two text boxes. Change them both to zero if they are not zero already.
 * Look to the right of the timeline. There are two text boxes Change both of them to 15.

Finding out the Frame Rate of the Animation

 * Locate the default folder and open mdldecompiler.qc in a text editor.
 * Locate the line that beings by reading "$sequence idle".
 * Look at the end of the line. It should read fps 30.00.
 * The frame rate of this animation is 30 frames per second.

Changing the Frame Rate of the Animation in XSI

 * Look at the bottom-middle of the XSI screen. There should be a darkened gray button that reads Playback. Click this button.
 * Click Playback Options.
 * Under Precision, change Format to Custom framerate.
 * Change Frame Rate to 30.
 * Close the playback options window.

Navigating in the Schematic View

 * Open the schematic view.
 * Press s to pan around the view.
 * After pressing s click and drag with the middle mouse button to zoom in and out.
 * Press a while the cursor is in the schematic view to frame the whole scene within the window. This also works in the viewports so if you ever get lost you can just press a.
 * To zoom in on a specific object, hold onto SHIFT+Z and click and drag a rectangle upon the area you wish to magnify.
 * Press CONTROL+R to refresh the view. This is useful when changing the hierarchy of objects.
 * The schematic view is handy for selecting objects.

=Posing=

The idle animation is usually just a still position, but you can put a little animation in there if you want. For this tutorial we will make the idle animation a still position.

Setting a Key

 * Move the red frame marker to 0.
 * Select a null, such as Bip01_L_Forearm, and, and move it near the grip of the LR-300.
 * Press K. This sets a key for the frame 0. To remove a key, press SHIFT+K.


 * Now you are on your own for creating the pose.

Aligning to the Camera View

 * Change one viewport to Camera and one to User.
 * Move the null ValveBiped.ValveBiped so it aligns with the camera well.

Setting All Keys

 * Change the selection filter to Null.
 * Press CTRL+A.
 * Press VKCK to set all keys.

Exporting

 * Go to ValveSource>Export SMD.
 * Check the first checkbox.
 * Change the drop down list to "Skeletal Animation (.SMD)".
 * Save the file as idle.smd in your tocompile folder.