Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- sliceAmount = 10
- border_min_x = 0.5 - (0.5 / sliceAmount)
- border_max_x = 0.5 + (0.5 / sliceAmount)
- bpy.context.scene.render.border_min_x = border_min_x
- bpy.context.scene.render.border_max_x = border_max_x
- target = bpy.data.cameras["Camerasliced"]
- bpy.context.user_preferences.edit.keyframe_new_interpolation_type = "LINEAR"
- bpy.context.user_preferences.edit.keyframe_new_handle_type = "VECTOR"
- target.animation_data_create()
- target.animation_data.action = bpy.data.actions.new("Cam_Action")
- fcurve = target.animation_data.action.fcurves.new("shift_x")
- keyframe = fcurve.keyframe_points.insert(frame = 1, value = -0.450)
- keyframe.interpolation = "LINEAR"
- keyframe = fcurve.keyframe_points.insert(frame = sliceAmount, value = 0.450)
- keyframe.interpolation = "LINEAR"
- bpy.context.active_object.animation_data.action.fcurves[0].modifiers.new('CYCLES')
- actiondata = target.animation_data.action
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement