- 16 Jun, 2010 9 commits
-
-
David Gobbi authored
-
David Gobbi authored
With this change to the python wrappers, special objects like vtkVariant can be automatically constructed in order to resolve method arguments. So vtkVariantArray.InsertNextValue(vtkVariant v) can take int, float, string, etc. and the vtkVariant will be constructed automatically. Only one level of conversion is allowed.
-
David Gobbi authored
-
David Gobbi authored
I've added enum constants for how well an arg matches the arg type required by a particular method signature. The enums are EXACT_MATCH, GOOD_MATCH, NEEDS_CONVERSION, and INCOMPATIBLE. For vtkObjectBase args, the code counts the number of generations between the required arg class and the provided arg class. A difference of one generation is GOOD_MATCH, two generations is GOOD_MATCH+1, etc. getting progressively worse but never as bad as NEEDS_CONVERSION. Lower values signify better matches.
-
David Gobbi authored
-
David Gobbi authored
For overloaded method checks, if "self" was a PyVTKClass, then the code was always assuming the first arg would be a PyVTKObject instance of that PyVTKClass. This assumption was wrong for static methods.
-
David Gobbi authored
The semantics for finding the right overload in the python wrappers should match C++ semantics. That means that array are matched based only on the type, not on the size of the array.
-
David Gobbi authored
The python wrappers used to call each overloaded method in turn until one of them was able to resolve the arguments. A new method has been added to vtkPythonUtil.cxx called PyVTKCallOverloadedMethod() that will carefully check the overloads against the provided arguments. Overloads that have a perfect type-match to the args get first priorty, followed by trivial conversions like "int" to "short" or resolving a VTK subclass, followed finally by more advanced conversions like "float" to "int".
-
David Gobbi authored
-
- 05 Feb, 2010 1 commit
-
-
David Gobbi authored
-
- 21 Sep, 2009 1 commit
-
-
Utkarsh Ayachit authored
of Pat's changes between Jun 22, 2009 and Sept. 8 2009.
-
- 22 Jun, 2009 1 commit
-
-
Pat Marion authored
BUG: When using the Py_NewInterpreter api there was no way to tell vtkPythonCommand which interpreter to use when executing the callback. Added a SetThreadState method so that vtkPythonCommand may call PyThreadState_Swap in order to make the interpreter for the specified threadstate the active interpreter. See vtk-developers email from June 18, 2009 with subject 'Py_NewInterpreter and vtkPythonCallback issue'
-
- 15 Jun, 2009 2 commits
-
-
Utkarsh Ayachit authored
variable. BUG: Fixing python pointer sscanf to use %p so that it works reliably on 64 bit windows machines.
-
Utkarsh Ayachit authored
variable. BUG: Fixing python pointer sscanf to use %p so that it works reliably on 64 bit windows machines.
-
- 28 Apr, 2009 1 commit
-
-
Francois Bertel authored
COMP:Fixed warnings with Python 2.6 about missing initializer for member PyBufferProcs::bf_getbuffer, PyBufferProcs::bf_releasebuffer and _typeobject::tp_version_tag. I have been told it was safe to apply this patch.
-
- 12 Aug, 2008 1 commit
-
-
David Cole authored
ENH: Merge changes from main tree into VTK-5-2 branch. (cvs -q up -j1.87 -j1.90 Common/vtkPythonUtil.cxx)
-
- 06 Aug, 2008 1 commit
-
-
Prabhu Ramachandran authored
the Python interpreter would crash on exit. This has been applied. Thanks Chris! More details here: http://public.kitware.com/pipermail/vtk-developers/2008-August/005418.html
-
- 05 Aug, 2008 1 commit
-
-
Prabhu Ramachandran authored
Kruszynski here: http://public.kitware.com/pipermail/vtk-developers/2008-August/005409.html The problem being that we are DECREFing a Python object after the Python interpreter has been finalized leading to segfaults.
-
- 03 Aug, 2008 1 commit
-
-
Prabhu Ramachandran authored
to be called after the interpreter has been finalized causing a segfault. This patch ensures that the interpreter is alive before calling the callback preventing these problems.
-
- 21 Jul, 2008 1 commit
-
-
David Cole authored
ENH: Merge changes from main tree into VTK-5-2 branch. (cvs -q up -j1.83 -j1.87 Common/vtkPythonUtil.cxx)
-
- 04 Jul, 2008 1 commit
-
-
Francois Bertel authored
-
- 20 Jun, 2008 1 commit
-
-
Francois Bertel authored
COMP:Fixed warning in gcc release mode about dereferencing type-punned pointer will break strict-aliasing rules.
-
- 19 Jun, 2008 1 commit
-
-
Sean McBride authored
-
- 05 Jun, 2008 1 commit
-
-
Brad King authored
- The vtkPythonUtil hash entry owns a reference for each object in it. - Therefore we do not need to Register/UnRegister a reference when the hash entry is created/destroyed. - This reduces all python-held reference counts by 1. - Also remove old delete observer code that is unused. - The observer is not needed because the python object has its own python reference count.
-
- 24 Mar, 2008 1 commit
-
-
Berk Geveci authored
-
- 14 Feb, 2008 2 commits
-
-
Utkarsh Ayachit authored
-
Berk Geveci authored
ENH: Added buffer interface to vtk objects (arrays). This allows passing VTK array pointers to python modules such as numpy
-
- 15 Aug, 2007 1 commit
-
-
David Cole authored
BUG: Fix bug 1953: replace strstream use with stringstream now that kwsys provides stringstream on all platforms. Many thanks to Sean McBride and Mathieu Coursolle from Rogue Research for all their effort developing the patch (and patience in waiting for its commit...!). COMP: Eliminate performance warning in generated Java wrappers regarding jboolean cast to bool. ENH: Exclude Java and Python wrappers (in addition to already excluded Tcl wrappers) from coverage analysis.
-
- 31 Jul, 2007 1 commit
-
-
Alexander Neundorf authored
COMP: configure a value into vtkToolkits.h to determine whether to support multithreading in the python wrappers or not Alex
-
- 25 Jul, 2007 1 commit
-
-
Alexander Neundorf authored
COMP: prepare VTK for crosscompiling -fix some problems if no development packages for tcl or tk are installed -prefer the own cmake modules over the ones provided by cmake -fix build of vtkSocket for systems which don't have SO_REUSEADDR (e.g. BlueGene) -add a RenderWindow which uses OSMesa only, i.e. no X at all -support build on platforms without shared libs -use ADD_SUBDIRECTORY() instead of SUBDIRS() in VTK/CMakeLists.txt, otherwise GET_TARGET_PROPERTY(LOCATION) doesn't work, since the targets haven't been created yet -add FindPythonLibs, FindTCL and FindPackageHandleStandardArgs from current cmake cvs tested with cmake cvs on Linux and BlueGene and cmake 2.4.6 on Linux Alex
-
- 09 Oct, 2006 2 commits
-
-
David Cole authored
ENH: Merge changes from main tree into VTK-5-0 branch. (cvs -q up -j1.76 -j1.77 Common/vtkPythonUtil.cxx)
-
David Cole authored
COMP: Fix compile error when using Python 2.5 (thanks to Scott Harris and Charl Botha on the VTK mailing lists)
-
- 04 Aug, 2005 1 commit
-
-
Charl Botha authored
acquisition API for Python versions >= 2.3. Without this fix, observer callbacks from multiple threads into Python would break. See this thread for more details: http://public.kitware.com/pipermail/vtk-developers/2005-July/003384.html
-
- 09 Jul, 2005 1 commit
-
-
Prabhu Ramachandran authored
all types.
-
- 08 Jul, 2005 1 commit
-
-
Prabhu Ramachandran authored
weakly reference VTK objects. Also cleaned up the VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED macro definitions a bit.
-
- 24 May, 2005 1 commit
-
-
Brad King authored
ENH: Removing need for VTK_ID_TYPE_IS_NOT_BASIC_TYPE. Providing vtkPythonCheckArray overloads for long long and __int64 when they are available. This will cover all cases of vtkIdType. Also adding overload for signed char.
-
- 16 May, 2005 1 commit
-
-
David Gobbi authored
-
- 11 Apr, 2005 1 commit
-
-
Mathieu Malaterre authored
-
- 15 Dec, 2004 1 commit
-
-
Brad King authored
ENH: Removing inclusion of windows.h by top VTK headers. This results in a substantial compile time reduction (~70%) on Windows compilers. It also avoids forcing windows name mangling on user code. Preprocessor work-arounds for this mangling has been added for VTK methods. A new vtkWindows.h has been created for VTK code that really needs the windows API. A vtkOpenGL.h has been created for VTK code that needs GL/gl.h because this header requires windows.h to be included first on some compilers. This addresses bug #836.
-
- 14 Mar, 2004 1 commit
-
-
David Gobbi authored
1) this makes help() work nicely on vtk classes, since __dict__ is used for introspection 2) since __dict__ is a hash, VTK function calls no longer require a linear lookup and should be faster than before The __dict__ is only created for VTK classes that are actually used, so the memory overhead should be small. Note that VTK classes and instances no longer have __members__ or __methods__ special attributes.
-