For example:
bpy.data.textures["mouth shapes"].image_user.frame_offset = bpy.data.objects["rigMeenuTeen"].pose.bones["eyes"].location
Can this kind of expression be a driver?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityIf the property doesn't allow for drivers, it cannot be driven with a driver.
It can be driven through app.handlers though:
import bpy
def my_handler(scene):
# this code will be run on every frame change
loc = bpy.data.objects["rigMeenuTeen"].pose.bones["eyes"].location
bpy.data.textures["mouth shapes"].image_user.frame_offset = int(loc.x)
bpy.app.handlers.frame_change_pre.append(my_handler)