Although in 2.5 we can animate "everything", in some ways, this is actually turning out to be a bit too much freedom for some. To clarify things, let's define and clarify some terminology, which is necessary since most people seem to completely confuse the two, and end up submitting flawed bug reports ("iiit nooot wurrkeeinngg!!!!!!!!!!!!!! HELP!!!!!!!!!!!!!!!").
"Object Layer Membership"
Previously (pre 2.5), whenever you "animated layers" (i.e. IKEY -> Layer in the 3D-View), you were actually animating an object's layer membership. That is, every time you set a keyframe, you're telling Blender: "from this frame onwards, this object will be on layer 2 (or layer 19)" and then after going forward a few frames and using the Move to Layer (MKEY) and moving the object to layer 1, "now from this frame onwards, this object will be back on layer 1".
To do this back then, you'd need to enable the layer on which you were moving the object to so that you could keyframe it using IKEY in the 3D-View (otherwise, Blender wouldn't pick up that you had an object selected for keyframing).
The only reason that an object would appear and disappear from the scene as you played back the animation is that after setting these keyframes, you would go and turn off the visibility of all layers that contain objects that you don't want visible. For example, as a de-facto convention, all "junk" objects (i.e. rig widgets, deform cages, unused props, temporary chunks of geometry, etc.) are all dumped on layer 20, and then this layer is turned off so that it is not shown (in the 3D-View or in Renders). This leads nicely into the next piece of terminology...
"Scene Layer Visibility"
By and large (* there's a slight catch that we'll get to in a moment), when you go through enabling and disabling that cluster of those 20 toggle-buttons on the 3D-View header, you're toggling whether each of the 20 Scene Layers is visible or not.
To crudely visualise this, imagine that you've got a bank of 20 bird cages, where the birds are free to roam between cages. Now, each cage has a curtain in front of it that can either be pulled back to reveal the contents, or to hide the contents from view. Toggling the visibility of scene layers is like selectively pulling back the curtains. At any point, you can pull back the curtain, and you might see 5 birds there. Pulling open another curtain, you might initially see that there are no birds there, but then a bird sees the light and flies over from the other cage. If the birds represent objects and the cages layers, then hopefully you can see that visibility of scene layers and object-layer membership are two different things which don't affect each other.
The ability to have access to and animate this is new in 2.5, though in most cases, you really SHOULD NOT try to do so. There are parts of Blender (notably the depsgraph) that effectively assume that this does not change over time (i.e. assume that it will not be animated, and that it will only change when the property is changed directly from the UI). Furthermore, I really don't think that most of the case where people have used it so far have necessarily been warranted; that is, most were cases of users confusing "animating layers" from past experience to literally mean animating "scene layer visibility" instead of animating "object layer membership" (which was what they were doing in the past).
(*) "3D-View Layer Visibility"
Hopefully the previous two made sense. Now we're going to describe a little complication. On the 3D-View header beside the layer toggles, there is an additional toggle: the tooltip will be something like "link to scene", and will either have a linked-chain or separated-chain icon depending on its state.
This option often causes confusion, even amongst experienced users, often when we forget that we have it enabled. What this option effectively does is that it makes the layer toggles on the header of a specific 3D-View only affect the layers visible in the 3D-View where this toggle was turned off. By default, this is enabled, so changing the visible layers from the 3D-View header results in the scene's visible layers also changing.
For example, say we had layers 1, 3, 5 enabled before disabling this option. Now, if we disable this option, and change the layers visible in the 3D-View to only be 2 and 4, in that particular 3D-View instance, only layers 2 and 4 would be visible (though in other views, 1,3,5 would still be visible). If we were to start a render in that particular 3D-View, only the layers that you've got enabled will be used.
NOTE: this is particularly a problem if you try use this feature to disable lights and backdrops while animating, and then try to do a quick test render to check that a pose reads properly only to find that you forgot about this. Test renders of this sort are practically essential when doing facial animation, where even slight rendering differences can mean the difference between a pose that reads and one that doesn't.Anyways, if you start a render from anywhere else, or perhaps from the command-line (i.e. via some batch render/renderfarm), you'll notice that that the layers don't match up. You have been warned about this!
Fortunately though, we haven't actually seen any bug reports about this exact case. Perhaps it's just the fact that most of the community seems more "render" focused than anything else. Well, at least seeing some of the feature request lists that occasionally pop up gives that impression ("we want GI" x 10000, "we want caustics", blah blah). However, for some reason, this attitude strangely doesn't seem to carry over to other areas of Blender, which brings us to...
Animation Editors and Layer Visibility
The Animation Editors are ONLY aware of Scene Layer Visibility.
That is, they have no knowledge of what some 3D-View floating around somewhere on the same screen layout may be doing. This is also true of all other editors in fact: they don't have ANY knowledge of what other editors are doing; they only know about the global data and their own state which controls what what they decide to show you from that global data.
You might say: well, there's only one 3D-View on screen now, so it should just be able to find that and do whatever it does. If that is the case though, then the rendering behaviour above should do that too. Furthermore, what happens if I suddenly add a new 3D-View to the screen and have that do something different? Which one should I listen to now? Consistency at times comes with a price, but at least it's not as bad as the alternatives...
Now, moving on to another issue that comes up regarding the Animation Editors and "animating layers". As anyone who's tried animating "object layer membership" will have noticed, as soon as the objects move to scene layers which are not enabled, you will have trouble trying to edit their animation (i.e. the animation data isn't visible to edit!).
To this end, there's a feature built in to the Animation Editor filtering options which solves this problem. Just enable the ghost-icon toggle beside the cursor icon (i.e. "Include channels from objects/bones that aren't visible"). By default this is disabled, as it helps to reduce visual complexity by hiding animation data from objects that aren't visible and are assumed to not be relevant to the task at hand.
Animating Object's Layer Membership in 2.5
So, to finish off, let's recap how you "should" go about animating an Object's layer membership in 2.5.
1. Make the object in question "active"
The easiest way to do this (if you're going to be dealing with various layers being visible or not and at different times) is to use the Outliner. Simply click on the name of whatever object you want to start animating the layer membership of.
If you've managed to make it active, its name should now be white, and an orange circle should appear behind the icon to the left of the name. Otherwise, you may need to make sure it can be selected first (try enabling the cursor toggle in the middle column to the right of the object's name.
2. In the Properties Editor, go to the Object tab and locate the Layers button-cluster under the "Relationships" panel
3. For each keyframe you want to set...
a) Firstly, change the current frame to the frame on which you want to keyframe to be (do this click/dragging the green current-frame indicator line in the Timeline view, which is under the 3D View in the default layout).
b) Enable the toggles (in the cluster of buttons noted in step 2) for the layers you want the Object to be on on this frame, and disable all other layer buttons there.
c) Hovering over this cluster of buttons, simply press the IKEY to insert keyframes for these toggles on the current frame.
d) Repeat step 3 until you've got everything animated as you want.
Here are a few quick exercises to test if you understand this procedure:
1) Animate the default cube so that on frame 1 it belongs on layer 1, on frame 10 it is on layer 20, and on frame 20 it is on layer 1 again. Make sure only layer 1 is Scene-visible throughout. Once you've done this, you should see the cube visible for 10 frames, invisible for 10, then visible from then on until the end frame.
2) Add a UV sphere or Monkey head, move this to layer 10, and make Scene layer 2 visible. Now, repeat what you did in the first exercise, again animating the default cube. Having done that try animating the object you added, firstly adding a keyframe on frame 1 for where it currently is (layer 10), then adding another keyframe on frame 10 to have it on layer 2, and then a final keyframe on frame 20 to have it on layer 20. Playing this back, you should see the cube visible for 10 frames (and the sphere invisible for 10), followed by the sphere visible for 10 frames (while the cube is invisible for 10), and finally only the cube being visible for 10 frames.
3) Come up with your own little experiments, having fun moving things between layers.---
To retime these keyframes, simply enter the DopeSheet/Action or Graph Editors, and start editing the keyframes for these layers around. You'll probably want to enable the "Include hidden channels" option from the header to prevent things jumping around as you edit.
If you want to edit which layer membership of an object animated in this way, the best way would be to simply use the inserting keyframes procedure to add some new keyframes after deleting the old ones using the animation editors.
You could also go in and play with the keyframes in the Graph Editor. When doing this, just remember several things:
- An object's membership to each layer is represented as a separate F-Curve. So layer 1 membership is controlled separately to layer 2 membership for example.
- Layer membership equates to one of two discrete values only: on/yes = 1, and off/no = 0. Use other values at your peril, but there's no gain from setting the value to 5/200/1000/etc. as this is still fundamentally an on/off setting.