Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCS2D Animation while Interacting #1113

Merged
merged 59 commits into from
Mar 24, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3919cc5
Added function to configurator to provide save path
Mar 3, 2015
03aa219
Updated animation controls, fixed playing animation
Mar 4, 2015
58b71f5
Made step forward and step back wrap around the animation
Mar 4, 2015
8d96f8b
Made animation work better in interaction mode
Mar 4, 2015
34382cb
Removed qt saver dialog– was causing issues
Mar 5, 2015
bd92758
Made save use better names for animations
Mar 5, 2015
7309ae6
Animation runs are a bit better
Mar 6, 2015
e9cc9a1
Optimized UI latency during png generation a bit
Mar 6, 2015
095387c
Merge branch 'master' into vcs2d_animation_interaction
Mar 6, 2015
654230e
Made interact() animations work, getting memory leak errors in script…
Mar 6, 2015
5dfeb12
Fixed threading/offscreen render issue for animate
Mar 6, 2015
b84c976
Fix bug where UI doesn't show up in GUI
Mar 9, 2015
106a184
Moved configurator init logic into function for GUI/interact() to call
Mar 9, 2015
f829e1a
Added guards to prevent extra configurators
Mar 9, 2015
0e26985
Fix clicking from one creator to the other
Mar 9, 2015
516fdb5
Trying to fix button placement
Mar 9, 2015
2892b26
Optimizing configureEvent, skipping extra renders
Mar 9, 2015
7fd34fc
Merged master
chaosphere2112 Mar 10, 2015
ebbe6ba
Tweaked button, removed useless renderer argument
chaosphere2112 Mar 10, 2015
b3609fb
Added place() to slider
chaosphere2112 Mar 10, 2015
dbceea6
Made widget manager place widgets on window resize
chaosphere2112 Mar 10, 2015
9cf0a3b
Added new fromtemplate keyword to canvas plot keywords
Mar 10, 2015
e5fba6b
Labels will only hide/show when showing/hidden
Mar 10, 2015
f564f06
Made manager work a bit better in vistrails
Mar 10, 2015
67beb4c
Removed some unneccessary renders
Mar 10, 2015
55bbede
Cleaned up some extra rendering in the leftButtonPressEvent
Mar 10, 2015
4d930af
Made some optimizations of the configureEvent function
Mar 10, 2015
f432d79
UI will stay on top now
Mar 10, 2015
dbc513b
Fixed slider placement
Mar 10, 2015
d94fd76
Added documentation to new functions in VTKAnimate
Mar 11, 2015
eabd245
Removed unnecessary mapper updating logic, and vcs import
Mar 11, 2015
90bfa60
Changed hidden_window and references to background window to offscree…
Mar 11, 2015
2d0048e
Fixed flash on animation start
Mar 11, 2015
34ed7f9
Fix running animation after stopped from console/script
Mar 11, 2015
c7b6697
Fixes for handling zoom/horizontal/vertical in animation
Mar 11, 2015
fb57ba7
Documented the draw_frame method
Mar 11, 2015
9218230
Changed over to using BG plots via vcs instead of bg vtkwindow
Mar 12, 2015
bb3aa2b
Fixed bug where step forward/backward and stopping animation would re…
Mar 12, 2015
155ad10
Will now eliminate frames that have been changed in configure mode
Mar 12, 2015
2841029
Fixed bug where you can't save after saving once
Mar 12, 2015
3e7e7ff
Configurator will handle timer id of 0
Mar 13, 2015
f6192fd
Animation_files is reset
Mar 13, 2015
04c5f38
Removed click to stop animation
Mar 13, 2015
9227d99
Made frame slider use cached images and change over to finalized on r…
Mar 13, 2015
d321b64
Fix issue where endconfigure() followed by configure() would error
Mar 13, 2015
46d38be
Fix saving leaving a PNG on screen
Mar 13, 2015
123f7e6
Fix for resizing window while animating
Mar 13, 2015
3359128
Merged master
Mar 13, 2015
0715556
Fixed 3D/2D UI issues
Mar 13, 2015
455692b
Fix docstring and minimum layer of 0
Mar 17, 2015
f06c105
Fix multiwindow renwin bug in ubuntu
Mar 17, 2015
d894672
Fix for segfault on offscreen window cleanup
Mar 18, 2015
84f3ebf
Removed renderer/actor update code from update_input
Mar 18, 2015
5d966e4
Added some guards against plotting while animating
Mar 19, 2015
e5b413c
Fix button label alignment regression
Mar 19, 2015
8ec90dd
Fix for not being able to save multiple animations in one session
Mar 20, 2015
9615770
Made save cancel-able from the UI
Mar 20, 2015
d0e00cf
Sort-of fix for resizing animations
Mar 23, 2015
3012236
Fix exception after stopping configure and starting again
Mar 23, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Moved configurator init logic into function for GUI/interact() to call
  • Loading branch information
Sam Fries committed Mar 9, 2015
commit 106a184afcd4a626a0d1d9aabd47105d320a70c2
19 changes: 13 additions & 6 deletions Packages/vcs/Lib/Canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,7 @@ def start(self,*args,**kargs):
self.interact(*args,**kargs)

def interact(self,*args,**kargs):
if self.configurator is not None:
self.configurator.show()
self.configure()
self.backend.interact(*args,**kargs)

def _datawc_tv(self, tv, arglist):
Expand Down Expand Up @@ -941,7 +940,7 @@ def __init__(self, gui = 0, mode = 1, pause_time=0, call_from_gui=0, size=None,

self._animate = self.backend.Animate( self )

self.configurator = configurator.Configurator(self, show_on_update=(backend != "vtk") )
self.configurator = None

## Initial.attributes is being called in main.c, so it is not needed here!
## Actually it is for taylordiagram graphic methods....
Expand All @@ -966,12 +965,21 @@ def __init__(self, gui = 0, mode = 1, pause_time=0, call_from_gui=0, size=None,
else:
shutil.copy2(os.path.join(*pth),user_init)

called_initial_attributes_flg = 1
called_initial_attributes_flg = 1
self.canvas_template_editor=None
self.ratio=0
self._user_actions_names=['Clear Canvas','Close Canvas','Show arguments passsed to user action']
self._user_actions = [self.clear, self.close, self.dummy_user_action]

def configure(self):
self.configurator = configurator.Configurator(self)
self.configurator.update()
self.configurator.show()

def endconfigure(self):
self.configurator.detach()
self.configurator = None

def processParameterChange( self, args ):
self.ParameterChanged( args )

Expand Down Expand Up @@ -3732,8 +3740,7 @@ def set_convert_labels(copy_mthd,test=0):
if dn is not None:
self.display_names.append(result.name)
if result.g_type in ("3d_scalar", "3d_vector") and self.configurator is not None:
self.configurator.detach()
self.configurator = None
self.endconfigure()
if self.backend.bg == False and self.configurator is not None:
self.configurator.update()

Expand Down
8 changes: 2 additions & 6 deletions Packages/vcs/Lib/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,9 @@ def array_strings(template, array):
return strings

class Configurator(object):
def __init__(self, canvas, show_on_update=False):
def __init__(self, canvas):
self.canvas = canvas
self.backend = canvas.backend
self.show_on_update = show_on_update
self.interactor = None
self.display_strings = {}
self.displays = []
Expand Down Expand Up @@ -260,10 +259,6 @@ def update(self):
# This is an attribute used internally; might break
display._template_origin = new_template.name

if self.show_on_update:
self.show()
self.show_on_update = False

def detach(self):
if self.toolbar is not None:
self.toolbar.detach()
Expand Down Expand Up @@ -363,6 +358,7 @@ def click(self, object, event):
def show(self):
if len(self.displays) == 0:
return
self.place()
self.toolbar.show()
self.marker_button.show()
self.text_button.show()
Expand Down