Animating Weapons
This page describes how to setup world models (in Maya) so that they can animate. Animating view model weapons is a much simpler case, described elsewhere. By getting your world model weapons to animate, you can create weapons which are more dynamic and not just glued to the character's hand.
3rd person weapon animation requirements
For when a weapon that is attached as a separate object (by code) needs rotation or translation in the animation.
Weapon
Skin the weapon with the necessary bones need for the particular type of animation you require. Save this an individual entity and export as your weapon reference.
Character for animation
Import the weapon you have created which is skinned and position and parent it to the relevant bone in which it will be attached by code. This will make the rig ready for animation and you can animate the weapon as a separate entity within the scene. As the weapon is skinned then the bone information that is attached will be exported through the animation smd. Save your file as something different from your reference.
Note:
Delete the prefix on the imported geometry and bones so they match that of the weapon exported for attachment by code.
Character for Reference
Take the character file just created with the weapon attached. If you exported the character now as is then the weapons geometry will be exported along with the character. As it is attached via code you should then delete all polygons apart from one, so the mesh is almost completely gone apart from the few faces which carry the skin information which allow the bones to be exported and in turn allow the animation to drive the attached weapon if thee is any animation applied.
Basic rules
All bones need skin applied to be read by the exporter (as far as I know) All names should match up from the character reference through to animation and weapon reference.