Record camera movements done with mouse and keyboard?


Is it possible to record the camera movements that I do using the mouse and keyboard? let’s say, If I get the position of the camera and target once every 1/3 seconds, and then use the points to create a curve for the camera path animation?


Probabily you can use a timer with 333ms and then a data recorderer to store the locations points.

To make it very easy to use I was already thinking to do a Python script.

ok, i cooked it by myself. :smiley:

#records camera movements into camera_path and camera_target curves
#to be used to Set up path animation in Animation Settings
#camera path color is set to red

import scriptcontext
import rhinoscriptsyntax as rs
import time

view = rs.CurrentView()

point_camera =[]
point_target = []

print "Recording camera movements. Long press ESC to stop."

while True:
    CameraTarget = rs.ViewCameraTarget(view)
    #check for esc press
    if scriptcontext.escape_test(False):
        print "ESC pressed "
        break      #get out of the loop

camera_path = rs.AddCurve(point_camera)
camera_target = rs.AddCurve(point_target)

rs.ObjectName(camera_path, name="camera_path")
rs.ObjectColor(camera_path, color=(255,0,0))
rs.ObjectName(camera_target, name="camera_target")
1 Like