-
Notifications
You must be signed in to change notification settings - Fork 13
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
Vector animation implementation needs finishing #81
Comments
on nightly i get: import vcs, cdms2, MV2
import cdat_info ; f = cdms2.open(cdat_info.get_sampledata_path()+"/clt.nc")
u = f("u")
v = f("v")
gm = vcs.createvector()
x = vcs.init()
x.plot(u,v,gm)
x.interact() Then click [configure]->[Open Animation]->[Run] ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/1TB/git/vcs/vcs/configurator.py in animate(self, obj, event)
702 self.canvas.animate.number_of_frames(),
703 render_offscreen=False,
--> 704 allow_static=False)
705
706 def start_animating(self):
/1TB/git/vcs/vcs/VTKAnimate.py in draw_frame(self, frame_num, render_offscreen, allow_static, main_window_png)
315 self._number_of_dims_used_for_plot,
316 frame_num,
--> 317 update=False)
318
319 self.vcs_self.backend.renWin.Render()
/1TB/git/vcs/vcs/VTKAnimate.py in update_input(canvas, dimensions, frame_num, update)
42 slabs[1](
43 *args),
---> 44 update=update)
45
46
/1TB/git/vcs/vcs/VTKPlots.py in update_input(self, vtkobjects, array1, array2, update)
1759 vcs2vtk.setArray(vg, array1.filled(0).flat, "scalar",
1760 isCellData=vg.GetCellData().GetScalars(),
-> 1761 isScalars=True)
1762
1763 if "vtk_backend_filter" in vtkobjects:
/1TB/git/vcs/vcs/vcs2vtk.py in setArray(grid, array, arrayName, isCellData, isScalars)
214 if (pedigreeId):
215 vtkarray = attributes.GetArray(arrayName)
--> 216 for i in range(0, vtkarray.GetNumberOfTuples()):
217 vtkarray.SetValue(i, array[pedigreeId.GetValue(i)])
218 else:
AttributeError: 'NoneType' object has no attribute 'GetNumberOfTuples' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#1450 removes the VTK pipeline rebuilding code from VTKPlots.py, and with it goes a partial implementation for vector plots. I've ported this bit into unmerged commit 1ffc97a6e029d3988be8b26df3b4713ffa083181 (branch https://github.com/UV-CDAT/uvcdat/tree/update_input_vector), made sure a complete pipeline would persist through the animation steps, and added a test.
Migrated from: CDAT/cdat#1451
The text was updated successfully, but these errors were encountered: