Commit 53206fd6 authored by David E. DeMarle's avatar David E. DeMarle Committed by Kitware Robot

Merge topic 'fixTimestepsValues'

d5e8848f Write camera metadata for each timestep
1dc8dd91 Fix timesteps values reading
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !119
parents 1d760de4 d5e8848f
Pipeline #119651 failed with stage
in 0 seconds
......@@ -89,11 +89,12 @@ class FileStoreAPI(object):
"""returns control paramater names for the given object"""
return []
def get_control_values(self, controlparametername):
def get_control_values(self, controlparametername, sort=True):
"""returns sorted list of available values for a control parameter"""
info = self.fs.get_parameter(controlparametername)
values = info["values"]
values.sort()
if sort:
values.sort()
return values
def get_control_values_as_strings(self, controlparametername):
......@@ -328,7 +329,7 @@ class FileStoreSpecB(FileStoreAPI):
def get_timesteps(self):
"""returns a list of timesteps available in the store"""
if "time" in self.fs.parameter_list:
return list(self.get_control_values("time"))
return list(self.get_control_values("time", False))
return []
def get_cameras(self, ts):
......
......@@ -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