Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. import bpy
  2.  
  3. sliceAmount = 10
  4.  
  5. border_min_x = 0.5 - (0.5 / sliceAmount)
  6. border_max_x = 0.5 + (0.5 / sliceAmount)
  7.  
  8. bpy.context.scene.render.border_min_x = border_min_x
  9. bpy.context.scene.render.border_max_x = border_max_x
  10.  
  11. target = bpy.data.cameras["Camerasliced"]
  12.  
  13. bpy.context.user_preferences.edit.keyframe_new_interpolation_type = "LINEAR"
  14. bpy.context.user_preferences.edit.keyframe_new_handle_type = "VECTOR"
  15.  
  16. target.animation_data_create()
  17. target.animation_data.action = bpy.data.actions.new("Cam_Action")
  18. fcurve = target.animation_data.action.fcurves.new("shift_x")
  19.  
  20. keyframe = fcurve.keyframe_points.insert(frame = 1, value = -0.450)
  21. keyframe.interpolation = "LINEAR"
  22. keyframe = fcurve.keyframe_points.insert(frame = sliceAmount, value = 0.450)
  23. keyframe.interpolation = "LINEAR"
  24. bpy.context.active_object.animation_data.action.fcurves[0].modifiers.new('CYCLES')
  25.  
  26. actiondata = target.animation_data.action
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement