Skip to main content
deleted 134 characters in body
Source Link

Following code worked for me:

import bpy

ob = bpy.context.object
curve_ob = bpy.data.objects["Plane"]

frame_start = 1
length = 100

con = ob.constraints.new('FOLLOW_PATH')
con.target = curve_ob

curve_ob.data.use_path = True
anim = curve_ob.data.animation_data_create()
anim.action = bpy.data.actions.new("%sAction" % curve_ob.data.name)

fcu = anim.action.fcurves.new("eval_time")
mod = fcu.modifiers.new('GENERATOR')
mod.use_restricted_range = True 
#mod.coefficients = (-frame_start / length * 100, frame_start / length / frame_start * 100)
mod.frame_start = 1
mod.frame_end = 100

Following code worked for me:

import bpy

ob = bpy.context.object
curve_ob = bpy.data.objects["Plane"]

frame_start = 1
length = 100

con = ob.constraints.new('FOLLOW_PATH')
con.target = curve_ob

curve_ob.data.use_path = True
anim = curve_ob.data.animation_data_create()
anim.action = bpy.data.actions.new("%sAction" % curve_ob.data.name)

fcu = anim.action.fcurves.new("eval_time")
mod = fcu.modifiers.new('GENERATOR')
mod.use_restricted_range = True 
#mod.coefficients = (-frame_start / length * 100, frame_start / length / frame_start * 100)
mod.frame_start = 1
mod.frame_end = 100

Following code worked for me:

import bpy

ob = bpy.context.object
curve_ob = bpy.data.objects["Plane"]


con = ob.constraints.new('FOLLOW_PATH')
con.target = curve_ob

curve_ob.data.use_path = True
anim = curve_ob.data.animation_data_create()
anim.action = bpy.data.actions.new("%sAction" % curve_ob.data.name)

fcu = anim.action.fcurves.new("eval_time")
mod = fcu.modifiers.new('GENERATOR')
mod.use_restricted_range = True 

mod.frame_start = 1
mod.frame_end = 100
removed thanks (https://blender.meta.stackexchange.com/questions/2463/why-is-saying-thanks-forbidden-here)
Source Link
brockmann
  • 12.8k
  • 4
  • 51
  • 94

ThisFollowing code worked for me. Thankyou batFINGER:

import bpy

ob = bpy.context.object
curve_ob = bpy.data.objects["Plane"]

frame_start = 1
length = 100

con = ob.constraints.new('FOLLOW_PATH')
con.target = curve_ob

curve_ob.data.use_path = True
anim = curve_ob.data.animation_data_create()
anim.action = bpy.data.actions.new("%sAction" % curve_ob.data.name)

fcu = anim.action.fcurves.new("eval_time")
mod = fcu.modifiers.new('GENERATOR')
mod.use_restricted_range = True 
#mod.coefficients = (-frame_start / length * 100, frame_start / length / frame_start * 100)
mod.frame_start = 1
mod.frame_end = 100
```

This worked for me. Thankyou batFINGER

import bpy

ob = bpy.context.object
curve_ob = bpy.data.objects["Plane"]

frame_start = 1
length = 100

con = ob.constraints.new('FOLLOW_PATH')
con.target = curve_ob

curve_ob.data.use_path = True
anim = curve_ob.data.animation_data_create()
anim.action = bpy.data.actions.new("%sAction" % curve_ob.data.name)

fcu = anim.action.fcurves.new("eval_time")
mod = fcu.modifiers.new('GENERATOR')
mod.use_restricted_range = True 
#mod.coefficients = (-frame_start / length * 100, frame_start / length / frame_start * 100)
mod.frame_start = 1
mod.frame_end = 100
```

Following code worked for me:

import bpy

ob = bpy.context.object
curve_ob = bpy.data.objects["Plane"]

frame_start = 1
length = 100

con = ob.constraints.new('FOLLOW_PATH')
con.target = curve_ob

curve_ob.data.use_path = True
anim = curve_ob.data.animation_data_create()
anim.action = bpy.data.actions.new("%sAction" % curve_ob.data.name)

fcu = anim.action.fcurves.new("eval_time")
mod = fcu.modifiers.new('GENERATOR')
mod.use_restricted_range = True 
#mod.coefficients = (-frame_start / length * 100, frame_start / length / frame_start * 100)
mod.frame_start = 1
mod.frame_end = 100
Source Link

This worked for me. Thankyou batFINGER

import bpy

ob = bpy.context.object
curve_ob = bpy.data.objects["Plane"]

frame_start = 1
length = 100

con = ob.constraints.new('FOLLOW_PATH')
con.target = curve_ob

curve_ob.data.use_path = True
anim = curve_ob.data.animation_data_create()
anim.action = bpy.data.actions.new("%sAction" % curve_ob.data.name)

fcu = anim.action.fcurves.new("eval_time")
mod = fcu.modifiers.new('GENERATOR')
mod.use_restricted_range = True 
#mod.coefficients = (-frame_start / length * 100, frame_start / length / frame_start * 100)
mod.frame_start = 1
mod.frame_end = 100
```