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

Conversation

chaosphere2112
Copy link
Contributor

Big improvements to the animation controls during interaction; play works a lot better, can step a frame forward or backward, and added the ability to save out the animation and choose the framerate. Had to tweak a few things in the animation classes to make sure they worked with the changes, but I don't think I broke anything by doing so.

@doutriaux1
Copy link
Contributor

hum.. just tried it from command line ubuntu (with merged master in)
configure button are now behind plots, so hard to get to
clicking (behind plot) on run, gen a lot of blinking.
pressing Q won't work anymore...
eventually (when pngs are done i think) flickering goes away , buttons stay on top, but pressing stop button does not work
Don't see a slider either.
Am i using a bad version?

@chaosphere2112
Copy link
Contributor Author

Nope, looks like it's doing that on mine as well. I'll keep working on this.

Turns out, making a new repeating timer on every tick of the repeating timer is a bad idea. Who knew?
@chaosphere2112
Copy link
Contributor Author

So, I guess you shouldn't just keep spawning repeating timers in your timer event listener. Whatever. That would be why the Q key and the Stop Animation button didn't work– I was flooding the event loop.

Still have the UI flashing; it's because of the png generation. I'll keep working on that.

@chaosphere2112
Copy link
Contributor Author

@doutriaux1 I can't think of any great way to not flash the UI during animation, given that we want to generate the PNGs. I guess we could leave the UI in, and then when you save, rebuild the PNGs and strip out the UI for those? Dunno, let's chat on Monday about it.

Conflicts:
	Packages/vcs/Lib/animate_helper.py
@doutriaux1
Copy link
Contributor

I don't remember it flashing that way before. Before I was not using pngs until they were all ready so there was not flashing on first pass at all, second pass was super fast. Why do you need pngs on first pass? I think the issue is that before widgets come in it was barely noticeable and now the redraw time gets a bit longer and it is noticeable.

@chaosphere2112
Copy link
Contributor Author

chaosphere2112 commented Mar 6, 2015 via email

@chaosphere2112
Copy link
Contributor Author

@doutriaux1 Also, I think I've got an idea for how to get around this issue. I'm going to experiment to see if it works, and we can discuss if it seems like a good idea or not. Are you in this afternoon, or are you out today?

@doutriaux1
Copy link
Contributor

I'm in but from home. Want to setup a gotomeeting at some point?

@chaosphere2112
Copy link
Contributor Author

chaosphere2112 commented Mar 6, 2015 via email

@chaosphere2112
Copy link
Contributor Author

@doutriaux1 Alright, I got offscreen rendering working for animation. I had to add some logic so run() would do it straight in the main window; rendering offscreen on a non-main thread was making the objective-c runtime throw a hissy fit. Mind giving this branch a shot?

@doutriaux1
Copy link
Contributor

almost there! Works like a charm from command line. BUT (theres always a but) in GUI I can't get the widget to show up (even clicking on edit pen). Am I missing something?

@chaosphere2112
Copy link
Contributor Author

@doutriaux1 I haven't done the configure pen integration yet; I wrote the code to handle enabling and disabling the UI at the canvas level in another branch, but had not yet tied in with the configure pen in VisTrails. I'll have no problem knocking that out Monday morning. Presumably this should be easy to fix then as well.

@doutriaux1
Copy link
Contributor

Should I merge that and you start a new branch? Or you keep working on this one?

@chaosphere2112
Copy link
Contributor Author

I'll just do it in this one. I'll get that going right now.

@chaosphere2112
Copy link
Contributor Author

OK, I fixed the UI not showing up in the GUI. Some of the buttons are still showing up behind the text. I made it so my stuff only happens while the configure menu is open, though you'll have to use this branch:

https://github.com/chaosphere2112/VisTrails/tree/configure_button_2d_interactions

I'll submit a PR to VisTrails when we have that UI nailed down.

@chaosphere2112
Copy link
Contributor Author

I'm getting a segfault while resizing UV-CDAT with the configure menu open; working on sorting that out now.

@doutriaux1
Copy link
Contributor

might be related to issue sI'm seeing on: #1135

@doutriaux1
Copy link
Contributor

@chaosphere2112 on my mac 10.9 command line and interact work fine.
GUI though doesn't quite work. First of all it instantly bring up the widgets, did we not decide to do it only after we click the "pencil" buttons?
Then when I run the animation the ticks are all weirded out.

I'm using this branch for vcs, vtk: uvcdat-master with your timer fix, vistrails: your branch on pr

Am i missing sometihng?

@chaosphere2112
Copy link
Contributor Author

@jbeezley Sorry, I ran into that bug as well. I have a fix for it, I'll push that up momentarily. To get at the controls in the GUI, you have to click the Configure pencil in the toolbar above the plot.

@doutriaux1 It's working on my machine... Are you sure you've got the latest of all of those?

@chaosphere2112
Copy link
Contributor Author

@jbeezley OK, you can cancel a save now, and should be able to save multiple times without breaking things.

@doutriaux1 You still having issues? Are you in at all today?

@jbeezley
Copy link
Contributor

Okay, I understand now. Looks to be working for me.

@doutriaux1
Copy link
Contributor

@chaosphere2112 yes I'm sure I got latest of all. But will do a build from scratch just to be sure. And yes I'm in (from home) but turned off email so I can get things done.

@chaosphere2112
Copy link
Contributor Author

chaosphere2112 commented Mar 20, 2015 via email

@doutriaux1
Copy link
Contributor

@chaosphere2112 interesting. When I click the pen and close the configure panel that makes the widgets disappear. Then clicking on the pen makes them reappear.

@chaosphere2112
Copy link
Contributor Author

chaosphere2112 commented Mar 20, 2015 via email

@doutriaux1
Copy link
Contributor

yep. Wonder why it pops up with first plot.

@chaosphere2112
Copy link
Contributor Author

chaosphere2112 commented Mar 20, 2015 via email

@doutriaux1
Copy link
Contributor

@chaosphere2112 does this helps:

 ~~~~~~~~~~~~~~~~~~ create plot functions:  [('graphicsMethodName', ['a_boxfill']), ('plotOrder', ['1']), ('boxfill_type', ['linear']), ('color_1', [16]), ('color_2', [239]), ('datawc_calendar', [135441]), ('datawc_timeunits', ['days since 2000']), ('datawc_x1', [1e+20]), ('datawc_x2', [1e+20]), ('datawc_y1', [1e+20]), ('datawc_y2', [1e+20]), ('levels', [[1e+20, 1e+20]]), ('ext_1', ['n']), ('ext_2', [False]), ('fillareacolors', [None]), ('fillareaindices', [None]), ('fillareastyle', ['solid']), ('legend', [None]), ('level_1', [1e+20]), ('level_2', [1e+20]), ('missing', [1]), ('projection', ['linear']), ('xaxisconvert', ['linear']), ('xmtics1', ['']), ('xmtics2', ['']), ('xticlabels1', ['*']), ('xticlabels2', ['*']), ('yaxisconvert', ['linear']), ('ymtics1', ['']), ('ymtics2', ['']), ('yticlabels1', ['*']), ('yticlabels2', ['*'])]
/lgm/uvcdat/2015-03-20/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py:3512: UserWarning: Unrecognized vcs plot keyword: cdmsfile, assuming backend (vtk) keyword
  warnings.warn('Unrecognized vcs plot keyword: %s, assuming backend (%s) keyword'%(keyarg,self.backend.type))
/lgm/uvcdat/2015-03-20/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py:3512: UserWarning: Unrecognized vcs plot keyword: cell_coordinates, assuming backend (vtk) keyword
  warnings.warn('Unrecognized vcs plot keyword: %s, assuming backend (%s) keyword'%(keyarg,self.backend.type))
  File "/lgm/uvcdat/2015-03-20/vistrails/vistrails/uvcdat.py", line 131, in <module>
    v = app.exec_()
  File "/lgm/uvcdat/2015-03-20/vistrails/vistrails/packages/spreadsheet/spreadsheet_tab.py", line 961, in dropEvent
    sheetName, row, col))
  File "/lgm/uvcdat/2015-03-20/vistrails/vistrails/packages/spreadsheet/spreadsheet_tabcontroller.py", line 1064, in plotDropped
    self.emit(QtCore.SIGNAL("dropped_plot"), info)
  File "/lgm/uvcdat/2015-03-20/vistrails/vistrails/gui/uvcdat/project_controller.py", line 776, in plot_was_dropped
    self.check_update_cell(sheetName,row,col, update)
  File "/lgm/uvcdat/2015-03-20/vistrails/vistrails/gui/uvcdat/project_controller.py", line 910, in check_update_cell
    self.update_cell(sheetName, row, col, reuse_workflow)
  File "/lgm/uvcdat/2015-03-20/vistrails/vistrails/gui/uvcdat/project_controller.py", line 992, in update_cell
    reuse_workflow)
  File "/lgm/uvcdat/2015-03-20/vistrails/vistrails/gui/uvcdat/project_controller.py", line 1039, in update_workflow
    self.update_plot_configure(sheetName, row, column)
  File "/lgm/uvcdat/2015-03-20/vistrails/vistrails/gui/uvcdat/project_controller.py", line 847, in update_plot_configure
    plot_prop.set_controller(self)
  File "/lgm/uvcdat/2015-03-20/vistrails/vistrails/gui/uvcdat/plot.py", line 30, in set_controller
    self.updateProperties(None)
  File "/lgm/uvcdat/2015-03-20/vistrails/vistrails/gui/uvcdat/plot.py", line 58, in updateProperties
    canvas.configure()
  File "/lgm/uvcdat/2015-03-20/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 981, in configure
    traceback.print_stack()

@chaosphere2112
Copy link
Contributor Author

@doutriaux1 Yeah; can you do a git pull in vistrails? I forgot to push a commit.

@doutriaux1
Copy link
Contributor

@chaosphere2112 ok widgets now work, but I still get a weird ticks behaviour when runnig anim see attached png

ticks_off

@doutriaux1
Copy link
Contributor

oh and closing edit then clicking on pen again and clicking run anim again leads to this:

Traceback (most recent call last):
  File "/lgm/uvcdat/2015-03-20/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/VTKAnimate.py", line 139, in modified
    shutil.rmtree(os.path.dirname(self.animation_files[0]))
  File "/lgm/uvcdat/2015-03-20/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 239, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "/lgm/uvcdat/2015-03-20/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 237, in rmtree
    names = os.listdir(path)
OSError: [Errno 2] No such file or directory: '/Users/doutriaux1/.uvcdat/bbd027a9bafe410f3900b5f1a700c7a780d1d03a'

@chaosphere2112
Copy link
Contributor Author

Hmm... I'm not having exactly those issues, but definitely similar ones. I think there are some resizing quirks to work out on Monday.

@chaosphere2112
Copy link
Contributor Author

@doutriaux1 Latest commit should fix issue where animation starts off with ticks in wrong places, and will speed up resizing the window while animating; since resizing the background render window doesn't work well, I'm just rendering pngs at double the original resolution, and letting them get scaled appropriately for now. When we get #1148 fixed, I'll update it to work more like it ought to. I'm still working on the exception after closing the animation.

@chaosphere2112
Copy link
Contributor Author

@doutriaux1 Fixed the exception, helps to actually put the plot renderers back on the screen when configuration ends.

@doutriaux1
Copy link
Contributor

@chaosphere2112 ticks are fixed but resize doesn't resize while animating any longer.

@doutriaux1
Copy link
Contributor

@chaosphere2112 of course works, user error, sorry about the noise. @dlonie @jbeezley @aashish24 it's ready to go in as soon as we have your blessing.

@alliepiper
Copy link
Contributor

Still segfaults for me, but @aashish24 said he'll take a look on his Ubuntu.

@aashish24
Copy link
Contributor

I am thinking now that we can merge it and see if we can reproduce the crash on other systems. I will try it tomorrow.

@aashish24
Copy link
Contributor

Lets wait if @williams13 has any suggestions.

@chaosphere2112
Copy link
Contributor Author

@doutriaux1 mentioned yesterday that he was just about ready to merge this so we can get as many people testing it as possible to work out the last few kinks.

@doutriaux1
Copy link
Contributor

@chaosphere2112 merging now.

doutriaux1 added a commit that referenced this pull request Mar 24, 2015
@doutriaux1 doutriaux1 merged commit f084cab into CDAT:master Mar 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants