Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
was using TypeError for mat*vec and ValueError for vec*mat.
|
|
|
|
and add makefile target `check_spelling`
|
|
It was possible to allocate an array of size<2 which would then raise an error on vector creation without freeing.
Fix to ensure the behaviour of Vector.Range was the same as for builtin range() function. When specifying 3 arguments, the step argument wasn't being used to correctly calculate the vector size.
Minor formatting edits for error messages.
|
|
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
|
|
|
|
https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/blender/python/generic/noise_py_api.c@r42248 \
https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/blender/python/mathutils/mathutils_noise.c
|
|
|
|
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.
|
|
|
|
rather than inverting inplace.
|
|
- docstring edits
- normalize ignores W axis as its supposed to.
|
|
a, b = mat.col[0:2]
and...
for a in mat.col: ...
|
|
named, but its more clear to use len().
mat.col_size --> len(mat.row)
mat.row_size --> len(mat.col)
|
|
|
|
matrix size increased, future access too the vector would write past the allocated bounds. now raise an exception.
|
|
functional changes.
|
|
|
|
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.
|
|
|
|
functional changes)
|
|
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
|
|
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)
|
|
* 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)
|
|
|
|
breaking matrix*vector.
|
|
Commit 42752
from Andrew Hale
|
|
Matrix.contigPtr --> matrix
Matrix.row_size --> num_col
Matrix.col_size --> num_row
|
|
|
|
Shows Columns as Columns
from Andrew Hale
converted from python string formatting to using BLI_dynstr
|
|
|
|
row/col individually.
- creating a new non-square matrix would use uninitialized memory.
|
|
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.
|
|
|
|
patch http://codereview.appspot.com/5482043
from Andrew Hale
* Text from the submission *
This patch adds the ability to use arbitrary sized vectors from mathutils.
Currently vectors are only of size 2, 3 or 4 since they are generally restricted
to geometric applications. However, we can use arbitrary sized vectors for
efficient calculations and data manipulation.
|
|
(in keeping with most of blenders code)
also split some long lines in own code.
|
|
|
|
|
|
|
|
from Andrew Hale (trumanblending)
Tracker description
*******************
The current python noise module included with Blender has yet to be updated to the new Py API. This patch does so, with the following major points:
- The noise module has now been moved to a submodule of mathutils, it can be accessed by mathutils.noise. It was moved from it's own module as it will now return mathutils types and also have greater visibility to the user.
- All functions which return vectors will now return mathutils.Vector types to be consistent with the rest of the API. Previously (x, y, z) tuples were returned.
- A different implementation of random_unit_vector is now used, this allows 2D, 3D and 4D vectors to be returned. Previously only 3D was possible.
- Some function names have been changed to remove ambiguities and make naming consistent within the module. noise.vector is now noise.noise_vector and noise.vl_vector is now noise.variable_lacunarity
- Doc strings have been updated to be compatible with auto docs.
- Code style and internal naming has been changed to match the conventions in other mathutils code.
Thanks,
Andrew
|
|
|
|
functional changes)
|
|
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
|
|
- isect_plane_plane_v3 uses better method
- minor refactor - arg name changes & some args as const.
|
|
|
|
|