I am using a driver to change the Z location of object A (a cube) based on the Z location of object B (a sphere).
If I animate object B’s Z location between frames 1 to 20, object A correctly follows it up and down as it should.
However, if I then set the “Restrict Frame Range” box (in object A’s driver properties) to Start: 5, End: 15, the driver graph shows a step change at frames at 5 and 15, as it should. However, object A still follows object B during frames 1 to 5 and 16 to 20! Sample .blend attached
Am I misunderstanding what this is supposed to be doing?
Could someone confirm that Restrict Frame Range is indeed not working before I send a bug report to the devs?
I know you are misunderstanding how the graph editor works for drivers, but I am unsure if the restrict frame range is supposed to work on drivers, I’m assuming it isn’t. You could file a bug report to make the devs aware of it, but it might be rejected as not intended behavior. Really, I think if the restrict frame range settings aren’t supposed to work for drivers, then they should be visible/accessible.
When you are working the the graph editor with drivers, frames have no meaning at all. You can’t really turn a driver on at frame 5 and turn it off at frame 15, that’s not really how the graph editor works for drivers. That is how it works for animation curves and if you were using that modifier on the z-location of the cube the restrict frame range would work.
So here’s how the graph editor works for drivers. The x-axis (left to right) isn’t frames, but it’s the input value to the driver, and it’s in blender units. The y-axis (up n down) is the output of the driver, it’s the value that will be used to where ever the driver is added, in your case it’s the z-loc of the cube. If you want to read up on it, see here:
That’s the blog of the dev working on the animation system, so if you really want to understand this stuff, read that. At the end of that, he explains that if there isn’t a driver curve, the default is a 1:1 curve. That’s what your file exhibits, for every z-loc movement of the sphere, the cube moves an equal amount.
In your file, if you want the cube to remain still until the sphere reaches it’s location at frame 5, you’d make a custom curve to control it. Delete the generator modifier. Find the z-location of the sphere at frame 5, then in the graph editor, ctrl-left click to make a point at x = location of sphere, y = 0 (the rest position). Find the z-location of the sphere at frame 15, then again plot another control point in the graph editor at x = loc of sphere, y = the final position of the cube.
Thanks for the interesting link and your detailed reply. If Restrict Frame Range is not intended for drivers, then I’m at a loss to understand why it’s there on the Drivers Properties panel (right at the bottom), fully enabled for use. I understand that the drivers graph is showing only the mathematical relationship between the driving object and the driven object. And when I set Start and End values in the Restrict Frame Range boxes, the default 1:1 graph (y=mx+c, where x=1) flattens to zero outside the frame range to indicate the 1:1 relationship is not occurring. This surely indicates that Restrict Frame Range is supposed to be “turning off” the driver outside the defined frame range? If it’s not, then the implementation and naming of the function is very confusing.
Since posting my question and your reply I raised it as a bug, which has been confirmed by Dalai Felinto and assigned to Joshua (aligorith). I hope that it can be fixed as I have an animation waiting for this functionality!
I was assuming that it shouldn’t be there at all, or disabled, but it should be there and working when the graph editor is an f-curve editor. To be honest, I hardly ever use generated driver curves, creating your own curves gives you so much more freedom over what you can do.
Since posting my question and your reply I raised it as a bug, which has been confirmed by Dalai Felinto and assigned to Joshua (aligorith). I hope that it can be fixed as I have an animation waiting for this functionality!
Then hopefully it will be fixed, or it’ll be disabled when working with drivers, then you’d have to create your own curves. Which is no big deal once you learn your way around the graph editor.
Also meant to post this in the last post but forgot, a few more tips on the graph editor: