Commit d5e8848f authored by Nicolas Vuaille's avatar Nicolas Vuaille

Write camera metadata for each timestep

  * cinemareader.py expects one camera metadata per timestep (cf line 353)
  * exporting with catalyst does not provide it as the animation scene
   has no timestepValues. So manually duplicate camera metadata.
parent 1dc8dd91
......@@ -820,11 +820,14 @@ def explore(cs, proxies, iSave=True, currentTime=None, userDefined={},
if not times:
eye, at, up = track_source(tracked_source, eye, at, up)
eye_values.append([x for x in eye])
at_values.append([x for x in at])
up_values.append([x for x in up])
nearfar_values.append([x for x in cam.GetClippingRange()])
viewangle_values.append(cam.GetViewAngle())
tprop = cs.get_parameter('time')
tvalues = tprop['values']
for i in range(len(tvalues)):
eye_values.append([x for x in eye])
at_values.append([x for x in at])
up_values.append([x for x in up])
nearfar_values.append([x for x in cam.GetClippingRange()])
viewangle_values.append(cam.GetViewAngle())
cs.add_metadata({'camera_eye': eye_values})
cs.add_metadata({'camera_at': at_values})
cs.add_metadata({'camera_up': up_values})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment