not sure to understand…
… hmmmmm … so I can have an object leap to another object’s posision every 20 frames with drivers? I dabble in drivers a fair bit but I’m not sure how I’d do that.That sounds like what I want to do… I can handle getting the animation to loop no problem.
I’m guessing the driver line would read
xpos if ( #frame % 20 ) = 0 else …
but somehow that … has to mean don’t move…
let’s do it in python…
import bpy
import random
# you can change the name object here or name your object plane
# if there is no object named "plane" it'll create one
if not 'Plane' in bpy.data.objects:
bpy.ops.mesh.primitive_plane_add()
# every frame change, this function is called.
def my_handler(scene):
frame = scene.frame_current
# here is the step looking for multiple of 25
if frame % 25 == 0:
x = random.randrange(-10,10) #the range in blender Unit the object ll move
y = random.randrange(-10,10)
z = 0.0
ob = bpy.data.objects.get("Plane") #creating a brand new name for the object
ob.location = (x, y, z) #positioning the object
bpy.app.handlers.frame_change_pre.append(my_handler)
By driver expression:
lazy copy/paste:
(2*noise.random()-1)*2 if (frame % 20 == 0) else var
ps: the (2*noise.random()-1) is multiplied by two to change the distance range to 2 Blender units
