e039a631a9
add bpy collection method .find(key), so you can get the index of an item in a collection, -1 if not found.
...
use this to replace bge text ui py function.
2012-01-05 06:05:45 +00:00
f0e3c3c68f
fixes to mathutils from Andew Hale
...
- docstring edits
- normalize ignores W axis as its supposed to.
2012-01-03 14:34:41 +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
4f0b7e8c6a
py - fix for error which made enums not through errors when assigned non string types
2011-12-29 14:46:26 +00:00
85a97f64a7
add UNLIKELY / LIKELY util defines to help optimize iterators that are called a lot, only defined for gcc at the moment.
...
also some cmake formatting edits.
2011-12-29 01:46:58 +00:00
6e94bdd8e4
Scons/FFMPEG:
...
* Fixing compile error, ffmpeg include was missing.
2011-12-28 15:08:58 +00:00
5b88e16306
WIP loading bmesh in trunk, some conversion functions for this purpose.
2011-12-28 13:50:33 +00:00
c5a81536ca
Add FFmpeg libraries versions to system-info.txt
2011-12-28 12:35:58 +00:00
6d878810c6
for bpy.props, when 'name' argument is not initialized, vallback to the attribute name rather than an empty string.
2011-12-28 04:25:46 +00:00
e17fd46c71
formatting edits only to use more consisted style
2011-12-26 12:26:11 +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
33bd38ebc7
minor edits to cycles c/python module
...
- rename 'bcycles' --> '_cycles', since this is the python convention when a py module uses a C module internally.
- use macros for returning None
- make with_osl an attribute rather then a function.
- changes methods METH_VARARGS --> METH_O when single args are used.
2011-12-24 02:47:13 +00:00
b21a0f4fa1
formatting edits 120 line length
2011-12-24 02:37:42 +00:00
b59d8c6ba3
fix for own mistake [ #29031 ] Importing BGL Can Crash the BGE and Blender
...
was adding the Buffer type to the module without increffing
2011-12-23 05:42:06 +00:00
c9f1ca961a
fix for matrix assignment with recent changes which broke for eg:
...
ob.matrix_world = matrix
2011-12-22 08:44:08 +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
96bd647c4f
split some >120 lines, no functional changes
2011-12-21 22:56:06 +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
01de7c2979
fix for mathutils mat*vec for non sqyare matrices by Andrew Hale
2011-12-21 11:36:28 +00:00
ea88a0bec5
recent commit missed swapping args for MATRIX_ITEM in mathutils_Vector.c, breaking matrix*vector.
2011-12-20 11:37:55 +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
414370b8d4
Support for arbitrary sized vectors - (was limited by 2-4 previously)
...
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.
2011-12-18 07:27:11 +00:00
ad96dacbc5
style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
...
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
cad9cb563d
fix own error [ #29631 ] frame is lost from driver namespace after reload
2011-12-16 03:06:56 +00:00
dbebf4ff53
fix [ #29635 ] Attempts to import the site module are met with a TypeError exception.
2011-12-16 00:06:01 +00:00
a7823dda69
fix for py noise doc string (not a show stopper :) )
2011-12-13 22:30:23 +00:00
965c287630
fixes scale on derivative maps
2011-12-09 23:26:06 +00:00
6f7ae034fd
fix for noise module in driver namespace (was infact mathutils).
2011-12-07 00:36:57 +00:00
3167a9a899
add library support for rna collection __contains__, eg
...
("Cube", "//lib.blend") in bpy.data.objects
2011-12-03 06:10:32 +00:00
Dalai Felinto
1936b31cd0
renaming BooleanProperty to BoolProperty (rna structs shouldnt affect scripters)
...
Talked with Brecht and Campbell and they both agreed that bpy.types should match bpy.props
In the ideal world we would rename bpy.props to BooleanProperty. This would break scripts though. So we go for a compromise and at least have some consistency.
2011-12-01 22:08:42 +00:00
4afc0e80a7
fix [ #29462 ] libraries.load can't have link=False when relative=True
...
was doing an unnecessary (and incorrect) library lookup.
2011-11-30 06:15:35 +00:00
6ec3313e2d
Fix: defining properties would fail with argument update=None instead of not
...
specifying the argument.
2011-11-29 22:57:35 +00:00
083297fbf1
formatting edits (120 width max) and remove some redundant casts
2011-11-29 20:22:35 +00:00
9d9fbae7bc
treat 4d vectors as 3d for vector.angle(other)
2011-11-29 19:40:27 +00:00
f62ad8f69b
remove header text:
...
"The Blender Foundation also sells licenses for use in proprietary software under the Blender Licens"
also remove NaN references from files that have been added since blender went opensource.
2011-11-29 10:54:47 +00:00