1. 08 Feb, 2016 1 commit
  2. 08 Jan, 2016 1 commit
    • Boris Nagaev's avatar
      Fix CMake error if in directory with ++ in name. · a8495801
      Boris Nagaev authored and David Gobbi's avatar David Gobbi committed
      If ${VTK_SOURCE_DIR} contains "++", the following error
      is produced by CMake:
      > RegularExpression::compile(): Nested *?+.
      > RegularExpression::compile(): Error in compile.
      Use STREQUAL instead of MATCHES to compare strings.
  3. 07 Jan, 2016 1 commit
  4. 08 Dec, 2015 2 commits
    • Brad King's avatar
      Drop support for compilers without `long long` · 3b89e771
      Brad King authored
      VTK no longer supports any compilers that do not provide this type.
      Therefore all code conditional on VTK_TYPE_USE_LONG_LONG can be made
      unconditional.  Leave the macro defined to tell dependent projects that
      APIs using the type are available in case they still support versions of
      VTK that make it conditional.
    • Brad King's avatar
      Drop support for compilers with `__int64` as the only 64-bit int · 36bb09a7
      Brad King authored
      VTK no longer supports any compilers that have `__int64` but not a
      `long` or `long long` that is 64-bit.  Therefore all code that is
      conditional on VTK_TYPE_USE___INT64 is never used and can be dropped.
  5. 30 Oct, 2015 1 commit
  6. 08 Oct, 2015 1 commit
    • David Gobbi's avatar
      Relative import is required for installed VTK. · 25d44596
      David Gobbi authored
      The Python vtk module was failing to import the installed extension
      modules with Python 3, because relative imports now require a leading
      ".".   This problem did not show up on the dashboard, because the
      dash builds run their tests on the build directory (where the vtkpython
      executable has a baked-in PYTHONPATH) but not on the installed programs
      and modules.
      The try/except used in this patch is not an ideal solution, and I would
      rather that the extension modules were placed in Wrapping/Python/vtk/
      during the build, but the required Build/Debug subdirs for Visual Studio
      make that impossible.
  7. 04 Oct, 2015 1 commit
    • David Gobbi's avatar
      Fix for Python 3.5 compilation on Linux, Win32. · 8ef76e45
      David Gobbi authored
      In Python 3.5, they finally created a public function to convert
      strings from local encoding to wchar_t unicode.  The old internal
      function _Py_char2wchar() has been replaced by Py_DecodeLocale(),
      which also handles UTF-16 surrogates for OS X.
  8. 12 Sep, 2015 2 commits
  9. 11 Sep, 2015 1 commit
  10. 10 Sep, 2015 3 commits
  11. 05 Sep, 2015 3 commits
  12. 30 Aug, 2015 1 commit
  13. 24 Aug, 2015 1 commit
  14. 23 Aug, 2015 1 commit
  15. 11 Aug, 2015 2 commits
    • David Gobbi's avatar
      Fix remaining py3k issues with vtk.tk module. · aa4e0d02
      David Gobbi authored
      Two major changes: 1) the vtkLoadPythonTkWidgets utility module is now
      imported explicitly as a relative module, necessitating absolute_import.
      The alternative is to import it as vtk.tk.vtkLoadPythonTkWidgets, which
      makes the tk module less mobile, in case someone wanted to incorporate it
      or the vtk module itself into a larger package (e.g. what paraview does).
      2) I've explicitly added an "if" check for python3 before importing the
      tkinter module.  This is done to ensure that an appropriate error is
      reported if the module fails to load (i.e. so that it won't complain
      about trying to import "tkinter" on Python 2, just because it had a
      fallthrough on an attemp to import "Tkinter".
    • Andrew Maclean's avatar
      Fixing tests for Python3. · ae48313c
      Andrew Maclean authored and David Gobbi's avatar David Gobbi committed
  16. 10 Aug, 2015 1 commit
    • David Gobbi's avatar
      Add a python function to check buffer equivalence. · 8320da24
      David Gobbi authored
      The python "buffer" and "memoryview" objects do not expose the pointer
      to the underlying memory, they only expose the contents of the memory.
      Likewise, if you check (buffer1 == buffer2) within python, then python
      will iterate through both buffers to see if they have the same contents!
      After all, for python, that's how equality is defined for sequence types.
      This commit adds a method called buffer_shared(ob1, ob2) that checks to
      see if two objects (e.g. arrays) expose the same block of memory via
      their buffer interface.  It assumes that the "buf" pointer is the lowest
      address of the buffer (i.e. the strides must be non-negative).
      It also adds two changes to dataset_adapter.py:
      1) The adapter now uses buffer_shared() instead of using "==" to compare
      buffers, because as stated above "==" does the wrong thing.
      2) It repairs an infinite recursion where __getattr__ called hasattr().
      The infinite recursion was caught silently by hasattr() itself in python2,
      but is exposed as a RuntimeError in python3.
  17. 07 Aug, 2015 3 commits
  18. 06 Aug, 2015 3 commits
    • David Gobbi's avatar
      Patch CommonCore python tests for py3k. · b7308b03
      David Gobbi authored
      This change modifies the python code for the tests so that they are
      cross-compatible between python 2 and python 3.  The new code will not
      run on Python 2.5 or earlier, because only python 2.6 and 2.7 allow
      py3k-friendly syntax.
      The numpy_interface does not fully support python 3 yet, due to changes
      in the way numeric operators work and the way type coercion is done.
    • David Gobbi's avatar
      Python API compatibility for py3k. · d3eb4043
      David Gobbi authored
      This is a large change that adds conditional compilation to support
      both python 2 and python 3.  The header vtkPythonCompatibility.h
      does a lot of the necessary work:
      1) PyInt is redefined to PyLong for py3k
      2) PyString is redefied to PyUnicode for py3k
      3) PyBytes is redefined to PyString for python 2
    • David Gobbi's avatar
      Make vtk/__init__.py compatible with py3k. · c96458b9
      David Gobbi authored
  19. 02 Jul, 2015 1 commit
  20. 09 Apr, 2015 1 commit
  21. 11 Mar, 2015 1 commit
    • Scott Wittenburg's avatar
      Fix how we import our argparse fallback implementation. · 566dc51f
      Scott Wittenburg authored
      In environments where Python 2.6 is still in use, there is no
      argparse module included by default.  For these situations, we
      have included our own copy, called _argparse.py, which we usually
      import in the except block in case the default is not present.  At
      some point, the vtk.web package included this file, but at some
      point it was removed and because few sites still use Python 2.6,
      it was not caught.
      This fix puts the _argparse.py in a single location (except for
      where it is needed at build time).  This location is vtk.util,
      and everything now looks there in the fallback case.
      Change-Id: Id64241ffbe4e3cec7e96dae386da1a6385c5f6ed
  22. 10 Mar, 2015 1 commit
  23. 09 Mar, 2015 1 commit
    • Ben Boeckel's avatar
      windows: compile the vtkpython.rc file separately · a701e9c0
      Ben Boeckel authored
      On Windows, if a build tree has a long path, the command line length
      limit can be exceeded. This is normally handled by using response files
      to store the command line arguments rather than passing them directly.
      Unfortunately, CMake does not support this for RC files. To address
      this, compile the rc file separately.
      Change-Id: Ie91e9578c6cf41f7386b914e408c6369c733117f
  24. 09 Feb, 2015 1 commit
  25. 05 Feb, 2015 1 commit
  26. 09 Jan, 2015 1 commit
  27. 28 Dec, 2014 1 commit
    • Dan Lipsa's avatar
      BUG: Account for gradient G + mean(G,0) · ed860dc2
      Dan Lipsa authored
      If G is a gradient array G.shape = (n,3) we have that
      mean(G,0).shape = (3,). Appending 1s to the second array
      would result in a broadcast error, so we do not do it in
      this case.
      Change-Id: I7c46e1c0c4159c40511a221797487b27438cb079
  28. 24 Dec, 2014 1 commit
    • Dan Lipsa's avatar
      Reshape VTKArrays so that they can be combined through operators. · 193be6ad
      Dan Lipsa authored
      An array G of shape (n,3) resulted from computing the
      gradient on a scalar array S of shape (n,) cannot be added together without
      G + expand_dims(S,1) works,
      G + S gives an error:
      ValueError: operands could not be broadcast together with shapes (n,3) (n,)
      This commit performs this reshape operation automatically by appending 1s
      to the dimensions of the array with fewer dimensions.
      Change-Id: I0a0eaeecf5063fac1c8b71b9d32472bbc41d42c8
  29. 18 Dec, 2014 1 commit