< Previous | Contents | Manuals Home | Boris FX | Next >
Changing a Tracked Camera to a Moving Object Shot
It's fairly common for users to track for a while, then realize that they should have set up the shot as a moving-object shot. There's even a tutorial on converting to a a camera to an object track.
The following is a python script to quickly do that for us. (Again, reference SyPy3 below when using Python 3):
# ; Quick convert camera-track to object-track import SyPy
hlev = SyPy.SyLevel() hlev.OpenExisting()
# Go to the solver panel and reset the camera hlev.SetRoom("Solver")
bid = hlev.ActionID("Solve/Clear")
hlev.Main().ByID(bid).ClickAndWait() # it's on the Summary panel # Start our undo block for low-level changes
hlev.Begin()
# Make a new moving object on the active camera mob = hlev.CreateNew("OBJ")
# Move all the trackers to the new object
cam = hlev.Active().cam # active cam for sure for t in cam.Trackers():
t.obj = mob
# Make the camera disabled, and the new object active cam.mode = "Disabled"
hlev.SetActive(mob) hlev.ReloadAll()
hlev.Accept("Convert to moving object")
# All done... could re-solve here if desired.
This script can be run directly, using Script/Run Script, or if it is placed in the system or user script directory, it can be run from the Script menu as "Script/Quick convert camera-track to object-track"
©2023 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.