dbb40e805d
py api: add mathutils.Matrix adjugate(d) methods, also add adjoint_m2_m2() to BLI_math_matrix
2012-10-29 03:36:55 +00:00
9fc95bd7ee
use min/max inline functions where MIN2/MAX2 were doing type conversion.
2012-10-27 11:18:54 +00:00
fec81d9b56
use min_ max_ functions in more places.
...
also fix minor error in MOD decimate when the modifier did nothing the reported face count would be wrong.
2012-10-23 16:21:55 +00:00
c56a911cd9
style cleanup: comments
2012-10-20 20:20:02 +00:00
aa49ca25d5
incorrect spelling in comments
2012-09-26 20:05:38 +00:00
71d1b09708
minor code cleanup
2012-08-25 12:55:14 +00:00
32cf7fcdb1
code cleanup: spelling
2012-07-16 23:23:33 +00:00
84bf3e48c0
style cleanup: use c style comments in C code
2012-07-06 23:56:59 +00:00
81a509fa40
fix error in node template and quiet warning.
2012-07-03 21:03:39 +00:00
112162e09e
code cleanup: header cleanup
2012-04-30 14:24:11 +00:00
6520aa97a9
add 'idprop' module so we can document idprop.types.*, currently doc generator has no access to ID Property types.
2012-04-15 14:54:15 +00:00
b07f9446c7
Hopefully last change to matrix orthogonal check, touches Py API only
...
- is_orthogonal now checks matrix in the same way as it's defined
by linear algebra, meaning that it'll use is_orhonormal C check
- Added is_orthogonal_axis_vectors to check if vectors which defines
axises are orthogonal
2012-04-02 12:36:00 +00:00
26b0255049
Fix for is_orthogonal check which in fact was checking for orthonormal matrix.
...
Separated it into two functions so now it'll be clear if check happens for
orthonormal or just orthogonal.
2012-04-01 00:14:41 +00:00
89b83f0060
patch to add __deepcopy__ to mathutils types, this is no different to __copy__, except some py utilities expect __deepcopy__ to exist, so better have them.
2012-03-30 11:35:58 +00:00
11d12d945e
style cleanup: python api
2012-03-26 06:55:09 +00:00
05612c0419
code cleanup: not all mathutils callback creation functions tool unsigned char for type & subtype args.
2012-03-17 22:31:57 +00:00
02f707e9da
minor mathutils code cleanup - use mathutils callbacks as unsigned chars everywhere.
2012-03-17 10:46:02 +00:00
70d3d1aca6
style cleanup: py/capi
2012-03-16 21:39:56 +00:00
2fbb5ce833
bmesh py api: more comprehensive intro page, also fix some spelling errors.
2012-03-13 06:22:43 +00:00
3590076193
style cleanup - comment formatting
2012-03-03 20:36:09 +00:00
1fbd91b8a1
typo cleanup, no functional changes.
2012-02-24 06:44:04 +00:00
5a42ff381c
correct 2 sphinx warnings.
2012-02-08 16:36:04 +00:00
40f1686f47
Fixes to Python matrices str function.
...
1) The width of columns was incorrectly determined on windows, fixed by increasing the size of the dummy buf.
2) Added additional brackets to string for consistent formatting
2012-02-01 01:42:36 +00:00
e634cb2607
Add the .Identity() classmethod to mathutils matrices. This allows the user
...
to create an identity matrix of a specific size without having to specify
all the values in the matrix and then use the .identity() method.
2012-01-24 01:56:44 +00:00
3123ad12a3
middle mouse jump scrolling for text window.
2012-01-16 10:48:52 +00:00
3cad3521a9
Change function for nb_invert so that ~matrix returns the inverted matrix rather than inverting inplace.
2012-01-16 09:01:11 +00:00
9a37e2682d
slice and iterator access for matrix.col/row so you can do...
...
a, b = mat.col[0:2]
and...
for a in mat.col: ...
2012-01-02 09:04:37 +00:00
5c8c1a7358
PyAPI - remove Matrix.row_size / col_size. these were rather awkwardly named, but its more clear to use len().
...
mat.col_size --> len(mat.row)
mat.row_size --> len(mat.col)
2011-12-30 06:43:17 +00:00
f48fb385ea
formatting edits & minor corrections
2011-12-26 00:42:35 +00:00
986e62f3b6
fix for a bug in mathutils when a vector was accessing a matrix and the matrix size increased, future access too the vector would write past the allocated bounds. now raise an exception.
2011-12-26 00:05:41 +00:00
67effc8aef
use docstrings for mathutils getset's, also some formatting edits, no functional changes.
2011-12-25 11:36:26 +00:00
f3ac865cc0
picky formatting of mathutils
2011-12-24 13:26:30 +00:00
2a80368005
mathtils, convenience attributes added 'row' and 'col', this makes the row/col swap a lot easier to deal with, since
...
now you can still use column access
previously...
mat[2] = 1, 2, 3
needed to be converted into...
mat[0][2] = 1
mat[1][2] = 2
mat[2][2] = 3
but with column access you can do...
mat.col[2] = 1, 2, 3
Having 'row' attribute is a bit redundant since direct indexing on a matrix uses row but included for completeness.
2011-12-24 07:03:19 +00:00
28a5549ecf
fix for error with matrix access and negative indices with recent row/col swap.
2011-12-24 06:13:58 +00:00
b42497b460
mathutils get/set function rename + minor changes to matrix functions (no functional changes)
2011-12-24 04:58:01 +00:00
89db50a712
patch [ #29534 ] Change Matrix Representation and Access in Python to Conform with Standard Notation
...
from Andrew Hale
Scripts which access matrix row/columns directly and scripts that create new matrices with elements defined will need updating.
For more info see...
* Guide for updating scripts
http://wiki.blender.org/index.php/User:TrumanBlending/Matrix_Indexing
* Discussion thread
http://markmail.org/message/4bpqpxkcvq4wjyfu
2011-12-22 01:05:03 +00:00
26f69488ca
Matrix.translation wrapper vector, continent accessing to matrix[3][0:3].
...
this is a part of patch 29534, being applied separately
from patch [#29534 ] Change Matrix Representation and Access in Python to Conform with Standard Notation
by Andrew Hale (trumanblending)
2011-12-21 23:12:16 +00:00
840dfcd56d
cleanup and some fixes to mathutils by Andrew Hale
...
* 1. Resize 4x4, code was ridiculously complex (cleanup only)
* 2. matrix * matrix checking for compatibility wasn't working right (bug in last release)
* 3. fix for result size for matrix * vector if matrix is 4x4 and vector size 3 (bug in recent patch)
* 4. fix for result size vector * matrix if matrix is 4x4 and vector size 3 (bug in recent patch)
2011-12-21 21:21:27 +00:00
436295026a
patch [ #29662 ] Modifications to Mathutils Vectors for Consistency with Commit 42752
...
from Andrew Hale
2011-12-20 05:48:35 +00:00
a8ed803b66
rename internal matrix struct member vars to avoid confusion
...
Matrix.contigPtr --> matrix
Matrix.row_size --> num_col
Matrix.col_size --> num_row
2011-12-20 04:11:23 +00:00
3d8ee28750
__str__ functions for other mathutils types
2011-12-20 03:37:55 +00:00
553cf289a7
patch [ #29651 ] Add a __str__ Method to Matutils Matrices so print(matrix) Shows Columns as Columns
...
from Andrew Hale
converted from python string formatting to using BLI_dynstr
2011-12-20 02:54:25 +00:00
53f88b231a
corrections to some comments
2011-12-19 05:23:52 +00:00
0bc83a2f35
- mathutils matrix creation - use memcpy rather than copying every matrix row/col individually.
...
- creating a new non-square matrix would use uninitialized memory.
2011-12-19 05:14:09 +00:00
c3675c0e90
remove mathutils internal variable for storing pointers to each matrix row, instead use macros to access row/column's.
...
also add an assert so invalid index access will raise an error in debug mode, without this it was quite easy to access invalid memory without meaning to.
no functional change.
2011-12-19 03:12:10 +00:00
9c9099a805
formatting edits in py api, no functional changes
2011-12-18 08:50:06 +00:00
083297fbf1
formatting edits (120 width max) and remove some redundant casts
2011-11-29 20:22:35 +00:00
6e28ac2d7b
pep8 edits and avoid naming conflicts with python builtins
2011-11-24 19:36:12 +00:00
3b9b6051d9
rename mathutils constructors to match other parts of the bpy/api (no functional changes)
2011-11-24 04:45:36 +00:00
c62d33c540
patch: [ #29382 ] Arbitrary Length Array Function Additions and Modifications
...
from Andrew Hale (trumanblending), with some edits to use these in mathutils.Vector added.
Added Functions:
- dot_vn_vn - Dot product of two arrays
- normalize_vn_vn - Normalize an array and store the result in a second array
- normalize_vn - Normalize an array inplace
Renamed Functions:
Some functions have been renamed to make them consistent with the naming conventions used by fixed length array functions.
- fill_vni to fill_vn_i
- fill_vn to fill_vn_fl
2011-11-24 04:12:16 +00:00