Skip to content

Commit

Permalink
Merge pull request #2028 from UV-CDAT/issue_1845_animation_cmap_not_p…
Browse files Browse the repository at this point in the history
…reserved

we used to have two path for rendering a frame
  • Loading branch information
doutriaux1 authored Jun 22, 2016
2 parents 218a6c8 + 08fbba2 commit 9369abf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Packages/vcs/vcs/VTKAnimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ def reclaim_renderers(self):
be.showGUI()
be.renWin.Render()

def draw_frame(self, frame_num=None, render_offscreen=True,
allow_static=True, main_window_png=False):
def draw_frame(self, frame_num=None, render_offscreen=False,
allow_static=False, main_window_png=True):
"""
Draws a frame on the canvas
frame_num: Which frame to draw- defaults to self.frame_num
Expand All @@ -295,8 +295,7 @@ def draw_frame(self, frame_num=None, render_offscreen=True,
else:
self.frame_num = frame_num

if render_offscreen or (
allow_static and len(self.animation_files) == self.number_of_frames()):
if len(self.animation_files) == self.number_of_frames():
# Attempt to extract the renderers and place them onto the create
# thread
self.extract_renderers()
Expand All @@ -318,7 +317,7 @@ def draw_frame(self, frame_num=None, render_offscreen=True,

self.vcs_self.backend.renWin.Render()

if main_window_png:
if main_window_png or self.playback_params.zoom_factor != 1:
png_name = self.create_thread.get_frame_name(self.frame_num)
self.vcs_self.png(png_name)
self.animation_files = sorted(
Expand Down Expand Up @@ -346,4 +345,5 @@ def frame(self, frame):
self.draw_frame(
frame_num=frame,
allow_static=False,
render_offscreen=False)
render_offscreen=False,
main_window_png=False)

0 comments on commit 9369abf

Please sign in to comment.