It is very useful and powerful to use grasshopper to control camera view & path as well as change the content you want to show.
Here is a grasshopper description demonstrating how to make animations using horster(a plug-in in grasshopper)
Below is the code contained in the python component that can change visibility of layers in rhino:
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
if run and m < 9:
if animate == 100 : animate = 0
animate = animate + 2
if animate == 50 :
sc.doc = Rhino.RhinoDoc.ActiveDoc
rs.LayerVisible("%s" % m, False)
if m < 8:
rs.LayerVisible("%s" % (m+1), True)
m = m + 1
sc.doc = ghdoc
if animate % 2 == 0 :
FileName = "C:\Users\chen\Desktop\images\Image%s.jpg" % k
rs.Command("_-ViewCaptureToFile " + chr(34) + FileName + chr(34) + " _-Enter", 0)
k += 1
else :
animate = 0
m = 0
k = 0
a = animate/100