Skip to content
Snippets Groups Projects
Commit 43284320 authored by Olivier Bertrand's avatar Olivier Bertrand
Browse files

Merge branch 'develop' of gitlab.ub.uni-bielefeld.de:olivier.bertrand/navipy into develop

parents b7f634d2 c284e610
No related branches found
No related tags found
No related merge requests found
...@@ -133,7 +133,7 @@ class DataBase(): ...@@ -133,7 +133,7 @@ class DataBase():
for col in self.normalisation_columns: for col in self.normalisation_columns:
self.tablecolumns['normalisation'][col] = 'real' self.tablecolumns['normalisation'][col] = 'real'
if self.create is False: if (self.create is False) or (os.path.exists(filename)):
self._logger.info('Connect to database') self._logger.info('Connect to database')
if os.path.exists(filename) or filename == ':memory:': if os.path.exists(filename) or filename == ':memory:':
......
...@@ -89,7 +89,8 @@ class AbstractRender(): ...@@ -89,7 +89,8 @@ class AbstractRender():
# Check if posorient is a valid one # Check if posorient is a valid one
# otherwise skip to next position # otherwise skip to next position
if np.any(np.isnan(posorient)): if np.any(np.isnan(posorient)):
# Skip because we can not render when night # Skip because we can not render when nans
self._logger.info('Skip nan frame_i : {}'.format(frame_i))
continue continue
# Avoid rerendering by checking if data already # Avoid rerendering by checking if data already
# exist # exist
...@@ -110,6 +111,7 @@ class AbstractRender(): ...@@ -110,6 +111,7 @@ class AbstractRender():
# The position-orientatios is valid (none nan) # The position-orientatios is valid (none nan)
# and the cmaxminrange has not already been assigned # and the cmaxminrange has not already been assigned
# so the image need to be rendered # so the image need to be rendered
self._logger.info('Update frame_i : {}'.format(frame_i))
scene = self.scene(posorient) scene = self.scene(posorient)
check_scene(scene) check_scene(scene)
scene = scene[..., 0] scene = scene[..., 0]
...@@ -552,6 +554,13 @@ class BlenderRender(AbstractRender): ...@@ -552,6 +554,13 @@ class BlenderRender(AbstractRender):
:type posorient: pandas Series with multi-index :type posorient: pandas Series with multi-index
""" """
if isinstance(posorient, pd.Series): if isinstance(posorient, pd.Series):
# set frame
cframe = int(posorient.name)
if cframe > bpy.context.scene.frame_end:
bpy.context.scene.frame_end = cframe
if cframe < bpy.context.scene.frame_start:
bpy.context.scene.frame_start = cframe
bpy.context.scene.frame_current = cframe
# set roation mode # set roation mode
conv_found = False conv_found = False
index = posorient.index index = posorient.index
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment