So, I'm working on the animations for a character model that has a gun. The gun doesn't appear at all times, such as when the character is at the town hub. I'm wondering how I make the gun appear in the shooting animation, and only in that animation.
For this, you need to animate the visibility of the gun. There are plenty of things you can animate in Blender, and visibility is one of them.
The easiest way to control this is in the outliner. This is the workflow:
- Go to the outliner and find the gun. If you have many objects, you can select it in the viewport and then hit Num period.
NOTE: in your case you might expand the rig until the gun's parent bone to find it.
- You want the gun only appearing in one animation, so turn off the eye icon.
- Go to frame #1, hover over the icon and press I to add a keyframe.
- Go now to the first frame where you want your gun visible, turn on the visibility and add a keyframe
- If you have a later animation where you don't want the gun visible, go to that animation's first frame, turn it off and add a keyframe again.
IMPORTANT NOTE: If you want to render the animation, you need to do the above with the render icon too, the one that's a camera.
Related: How can I animate the Restrict Visibility property of an object?