Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-12-17Reverting to 2_2x BPYMartin Poirier
I was careful in selectively rolling back revisions, but if you've committed changes unrelated to BPY mixed with BPY changes, I might have reverted those too, so please double check.
2007-08-06Fix minor typo in error messages for Mathutils.DotVecs(), reported on python ML.Ken Hughes
2007-06-16Python PyMethodDef supports single argument methods (METH_O) but was using ↵Campbell Barton
METH_VARARGS everywhere and getting the single args from the tuple. Use METH_O where applicable.
2007-05-29passing None to Blender.Mathutils.Quaternion would segfaultCampbell Barton
2007-05-26More memory leaks fixed - in IDProp, Bone.head, tail, matrix, ob.DupObjects ↵Campbell Barton
(my fault) and in Effect module as well as a few others. Also stopped using Py_BuildValue for strings, ints and floats.
2007-04-04moved source and text to american spellingCampbell Barton
* colour -> color * centre -> center * normalise -> normalize * modelling -> modeling
2007-03-31Python APIKen Hughes
---------- Change deprecation printfs to print warning once instead of everytime the deprecated method is called. Also commented out deprecation warnings for code which will eventually be replaced by experimental Blender.Main/bpy module.
2007-03-16type initialization updates, and refcount fix for lamp, reverted some ↵Campbell Barton
changes to NMesh
2006-10-03moved vector objects to getseters,Campbell Barton
added in place operations. Vector_iadd vec1+=vec2 Vector_isub vec1-=vec2 Vector_imul vec1*=float or vec1*=mat Vector_idiv vec1/=float length is now writable vec.length= float
2006-08-08Made RotationMatrix accept values outside 360,Campbell Barton
added object.type to be used instead of .getType()
2006-07-26===Python API===Ken Hughes
Multiplication of 3D vectors by 4x4 matrices converts the vector to 4D but did not make the vector homogenous. Fixing that so the translation part of the matrix will also be applied.
2006-07-02finish adding Geometry module, removed polyfill from mathutils, updated ↵Campbell Barton
epydoc links and updated BPyMesh NGon function
2006-07-02wasnt decref'ing items I got from PySequence_GetItem for PolyFill or ↵Campbell Barton
ob.join() fixed and tested, memory dosent increse when used in a large loop.
2006-07-01Added a scanfill wraper to Mathutils, allows you to fill polylines without ↵Campbell Barton
using Meshes .fill() function. Takes a list of polylines and returns a list of face index triplets. Added this so using mesh.fill() could be avoided since it requires making an object, linking to the scene and cycling editmode for every NGon imported. Since this is so close to release, It might be good if ken, willian or stivs takes a look at the function to make sure its ok. - Ran 100's of times for importing lightwave models but would be good to doublecheck.
2005-11-16- point constructorJoseph Gilbert
* added a constructor for the point class to mathutils
2005-10-28Fixed gcc warnings for unused var and unitialiazed vars.Ton Roosendaal
NOTE: I had to fix NMesh.c, Mesh_fromNMesh(), that is a real bad function... it was returning a Py object as a Mesh (on error). This is still not really solved (NULL return is not handled).
2005-10-10-Another fix for mathutils.anglebetweenvecs()Joseph Gilbert
* test dot before clamping
2005-10-10-mathutils fixJoseph Gilbert
* cos takes -1 to +1
2005-10-10Patch for mathutilsJoseph Gilbert
* fixed another issue with anglebetweenvecs
2005-10-07-fix for AngleBetweenVecsJoseph Gilbert
* correctly finds zero length vectors now
2005-09-27-fix for angleBetweenVecsJoseph Gilbert
* adds a test to check for zero-length vectors
2005-09-27Refcount fixesJoseph Gilbert
* fixes posible reference count issues with mathutils * mathutils classes should no longer memory leak
2005-09-26Theeth's mathutils patchJoseph Gilbert
- adds intersections for lines - triangle area - tracking quaternion from vector - some helpful normal calculators
2005-07-23_new point class and update_Joseph Gilbert
- adds a new point class * point/ vector math (p + v = p, p - p = v, etc.) * points can be transformed by matrices/quats * wraps 'place vector' type vectors that have no magnitude - wrapped toXXX() methods work correctly * toXXX() will NOT wrap data (this is due to the fact that wrapped data cannot be converted) * added a 'wrapped' attribute to mathutils classes to determine wether the object is accessing python or blender data - added the ability to negate vectors/points with "-vec" * deprecated vector.negate() - added the ability to shorhand inverse matrices with "~mat" (tilde) - conversion between vector/point with toXXX() methods
2005-07-18Header file clean up and warning fixesJoseph Gilbert
- Mostly this cleans up the #includes and header files in the python project. - Warning fixes are mostly casting issues and misc fixes. General warning clean up. - #include Python.h MUST come as the first include to avoid the POSIX redefine warning in the unix makefiles - fno-strict-aliasing flag added to makefile to fix a unavoidable type punning warning in types.c
2005-07-14 - use cos not cosfDaniel Dunbar
2005-07-14Mathutils updateJoseph Gilbert
- also included is some fixes for preprocessor inclues and some clean up of the previous commit -rewrite and bugfixes ---------------------------------- Here's my changelog: -fixed Rand() so that it doesn't seed everytime and should generate better random numbers - changed a few error return types to something more appropriate - clean up of uninitialized variables & removal of unneccessary objects - NMesh returns wrapped vectors now - World returns wrapped matrices now - Object.getEuler() and Object.getBoundingBox() return Wrapped data when data is present - Object.getMatrix() returns wrapped data if it's worldspace, 'localspace' returns a new matrix - Vector, Euler, Mat, Quat, call all now internally wrap object without destroying internal datablocks - Removed memory allocation (unneeded) from all methods - Vector's resize methods are only applicable to new vectors not wrapped data. - Matrix(), Quat(), Euler(), Vector() now accepts ANY sequence list, including tuples, list, or a self object to copy - matrices accept multiple sequences - Fixed Slerp() so that it now works correctly values are clamped between 0 and 1 - Euler.rotate does internal rotation now - Slice assignment now works better for all types - Vector * Vector and Quat * Quat are defined and return the DOT product - Mat * Vec and Vec * Mat are defined now - Moved #includes to .c file from headers. Also fixed prototypes in mathutils - Added new helper functions for incref'ing to genutils - Major cleanup of header files includes - include Mathutils.h for access to math types - matrix.toQuat() and .toEuler() now fixed take appropriate matrix sizes - Matrix() with no parameters now returns an identity matrix by default not a zero matrix - printf() now prints with 6 digits instead of 4 - printf() now prints output with object descriptor - Matrices now support [x][y] assignment (e.g. matrix[x][y] = 5.4) - Matrix[index] = value now expectes a sequence not an integer. This will now set a ROW of the matrix through a sequence. index cannot go above the row size of the matrix. - slice operations on matrices work with sequences now (rows of the matrix) example: mymatrix[0:2] returns a list of 2 wrapped vectors with access to the matrix data. - slice assignment will no longer modify the data if the assignment operation fails - fixed error in matrix * scalar multiplication - euler.toMatrix(), toQuat() no longer causes "creep" from repeated use - Wrapped data will generate wrapped objects when toEuler(), toQuat(), toMatrix() is used - Quats can be created with angle/axis, axis/angle - 4x4 matrices can be multiplied by 3D vectors (by popular demand :)) - vec *quat / quat * vec is now defined - vec.magnitude alias for vec.length - all self, internal methods return a pointer to self now so you can do print vector.internalmethod() or vector.internalmethod().nextmethod() (no more print matrix.inverse() returning 'none') - these methods have been deprecated (still functioning but suggested to use the corrected functionality): * CopyVec() - replaced by Vector() functionality * CopyMat() - replaced by Matrix() functionality * CopyQuat() - replace by Quaternion() functionality * CopyEuler() - replaced by Euler() functionality * RotateEuler() - replaced by Euler.rotate() funtionality * MatMultVec() - replaced by matrix * vector * VecMultMat() - replaced by vector * matrix - New struct containers references to python object data or internally allocated blender data for wrapping * Explaination here: math structs now function as a 'simple wrapper' or a 'py_object' - data that is created on the fly will now be a 'py_object' with its memory managed by python * otherwise if the data is returned by blender's G.main then the math object is a 'simple wrapper' and data can be accessed directly from the struct just like other python objects.
2005-05-25BPython bug fixes:Willian Padovani Germano
- Patch #2491: Mathutils.AngleBetweenVecs BUGFIX http://projects.blender.org/tracker/?func=detail&aid=2491&group_id=9&atid=127 - #2607: Python String button can segfault if the allowable length is greater than 400 http://projects.blender.org/tracker/?func=detail&atid=125&aid=2607&group_id=9 - #2490: Vector == None gives warning http://projects.blender.org/tracker/?func=detail&aid=2490&group_id=9&atid=125 - #2476: Image.Draw() http://projects.blender.org/tracker/?func=detail&aid=2476&group_id=9&atid=125 All reported by Campbell, who also wrote the #2491 patch. Ken Hughes provided patches for #2490 and #2476. Thanks guys.
2005-05-22Roll back changes from Big Mathutils Commit on 2005/05/20.Stephen Swaney
2005-05-20-rewrite and bugfixesJoseph Gilbert
---------------------------------- Here's my changelog: -fixed Rand() so that it doesn't seed everytime and should generate better random numbers - changed a few error return types to something more appropriate - clean up of uninitialized variables & removal of unneccessary objects - NMesh returns wrapped vectors now - World returns wrapped matrices now - Object.getEuler() and Object.getBoundingBox() return Wrapped data when data is present - Object.getMatrix() returns wrapped data if it's worldspace, 'localspace' returns a new matrix - Vector, Euler, Mat, Quat, call all now internally wrap object without destroying internal datablocks - Removed memory allocation (unneeded) from all methods - Vector's resize methods are only applicable to new vectors not wrapped data. - Matrix(), Quat(), Euler(), Vector() now accepts ANY sequence list, including tuples, list, or a self object to copy - matrices accept multiple sequences - Fixed Slerp() so that it now works correctly values are clamped between 0 and 1 - Euler.rotate does internal rotation now - Slice assignment now works better for all types - Vector * Vector and Quat * Quat are defined and return the DOT product - Mat * Vec and Vec * Mat are defined now - Moved #includes to .c file from headers. Also fixed prototypes in mathutils - Added new helper functions for incref'ing to genutils - Major cleanup of header files includes - include Mathutils.h for access to math types - matrix.toQuat() and .toEuler() now fixed take appropriate matrix sizes - Matrix() with no parameters now returns an identity matrix by default not a zero matrix - printf() now prints with 6 digits instead of 4 - printf() now prints output with object descriptor - Matrices now support [x][y] assignment (e.g. matrix[x][y] = 5.4) - Matrix[index] = value now expectes a sequence not an integer. This will now set a ROW of the matrix through a sequence. index cannot go above the row size of the matrix. - slice operations on matrices work with sequences now (rows of the matrix) example: mymatrix[0:2] returns a list of 2 wrapped vectors with access to the matrix data. - slice assignment will no longer modify the data if the assignment operation fails - fixed error in matrix * scalar multiplication - euler.toMatrix(), toQuat() no longer causes "creep" from repeated use - Wrapped data will generate wrapped objects when toEuler(), toQuat(), toMatrix() is used - Quats can be created with angle/axis, axis/angle - 4x4 matrices can be multiplied by 3D vectors (by popular demand :)) - vec *quat / quat * vec is now defined - vec.magnitude alias for vec.length - all self, internal methods return a pointer to self now so you can do print vector.internalmethod() or vector.internalmethod().nextmethod() (no more print matrix.inverse() returning 'none') - these methods have been deprecated (still functioning but suggested to use the corrected functionality): * CopyVec() - replaced by Vector() functionality * CopyMat() - replaced by Matrix() functionality * CopyQuat() - replace by Quaternion() functionality * CopyEuler() - replaced by Euler() functionality * RotateEuler() - replaced by Euler.rotate() funtionality * MatMultVec() - replaced by matrix * vector * VecMultMat() - replaced by vector * matrix - New struct containers references to python object data or internally allocated blender data for wrapping * Explaination here: math structs now function as a 'simple wrapper' or a 'py_object' - data that is created on the fly will now be a 'py_object' with its memory managed by python * otherwise if the data is returned by blender's G.main then the math object is a 'simple wrapper' and data can be accessed directly from the struct just like other python objects.
2005-02-21-AngleBetweenVecs() was returning only 8-digit precision. This changes the ↵Joseph Gilbert
precision to 16-digits and should fix some problems regarding spurious numbers being returned by python after running this function.
2005-01-23Separated some variable declarations from the code, for wider compiler support.Yann Vernier
2005-01-23Changes Mathutils.Vector() to be less picky about its argument(s).Yann Vernier
2004-10-13fix numerous memory leaks in the math types.Stephen Swaney
fixed bug: #1633 Memory leak in M_Mathutils_Vector The math types ( matrix, vector, quad ) now make copies of data passed to them rather than holding a pointer to memory that cannot be freed, or that may go away unexpectedly. This also clarifies the problem of who is responsible for freeing memory allocations. Pre-checkin files are tagged mem_leak-1 in case this breaks something.
2004-10-07Another step in the Big Bpy Cleanup.Stephen Swaney
- move static declarations and data definitions out of headers. the BGL module still need cleaning. - move declarations out of modules.h and into appropriate .h files. modules.h still exists as a container for the few modules that need to #include almost everything. - all files now have a $Id tag and have been formatted by indent there are no changes to executable code. pre-commit versions are tagged with bpy-cleanup-pre-20041007 for the sake of paranoia.
2004-09-26Another round in the Great BPy Cleanup:Stephen Swaney
Run everything thru indent to cleanup spaces vs tabs. Clean up some of the comments by hand. BGL.c was not touched due to all that macro wackyness. There are no functional changes to the code. Pre-indent versions of source are tagged with tag bpy-cleanup-20040925 , just in case.
2004-09-18One small part of the Great Bpy Code Cleanup.Stephen Swaney
Add cvs $Id tag to files
2004-02-29Mathutils library for the python APIJoseph Gilbert
- support for quaternions, euler, vector, matrix operations. - euler supports unique rotation calculation - new matrix memory construction and internal functions - quaternion slerp and diff calculation - 2d, 3d, 4d vector construction and handling - full conversion support between types - update to object/window to reflect to matrix type - update to types/blender/module to reflect new module