I'm trying to make a driver which gets a property value not in current frame, but frame+2 for example. How I can do that?
You can evaluate fcurves for a property from python. Let's say you animated object Cube's location and want to get the Z value at frame 15:
# little utility function for searching fcurves def find_fcurve(id_data, path, index=0): anim_data = id_data.animation_data for fcurve in anim_data.action.fcurves: if fcurve.data_path == path and fcurve.array_index == index: return fcurve # index=2 for the Z curve. Just omit for single value properties. fcurve = find_fcurve(bpy.data.objects["Cube"], "location", 2) # Get the value at frame 15 print(fcurve.evaluate(15))
Note that evaluating fcurves may not be accurate in all circumstances, e.g. when you have additional constraints, physics simulation, etc. In that case the only real option may be to actually move to that frame, store the value and go back to the original frame.