Commit Graph

311 Commits

Author SHA1 Message Date
Sybren A. Stüvel
7530c54c3c Merge branch 'master' into blender2.8 2017-10-29 15:14:04 +01:00
Campbell Barton
1d409defbf Docs: clarify return value for BVH API 2017-10-27 16:14:24 +11:00
Campbell Barton
c45b8a65b4 Merge branch 'master' into blender2.8 2017-10-20 14:14:44 +11:00
Campbell Barton
959a58da9e Cleanup: redundant casts 2017-10-20 14:03:22 +11:00
Sergey Sharybin
128c7c3ba1 Merge branch 'master' into blender2.8 2017-09-22 13:26:49 +05:00
Campbell Barton
0c82a6fec8 Cleanup: unused define 2017-09-22 07:23:03 +10:00
Campbell Barton
7d7741d25f Merge branch 'master' into blender2.8 2017-09-11 16:52:53 +10:00
Campbell Barton
3c3d0898b0 PyAPI: Fix mathutils freeze allowing owned data 2017-09-09 11:08:38 +10:00
Campbell Barton
30d8829780 Docs: mathutils docstrings 2017-09-09 11:02:26 +10:00
Campbell Barton
90eb93791f Cleanup: mathutils vector comments
Use doxy markup & correct outdated info.
2017-09-09 10:50:40 +10:00
Campbell Barton
3930e46e37 Correct last commit 2017-09-09 10:15:16 +10:00
Campbell Barton
002cc6aef3 Cleanup: Simplify SWIZZLE macro
- Use indices instead of character args.
- Use numbered macros instead of variadic args.

Parsing using rtags used over 11gb of memory. While this should be
resolved upstream (report as #1053), the extra complexity didn't give
any real advantage.
2017-09-09 10:10:05 +10:00
Campbell Barton
bd935b5aed Merge branch 'master' into blender2.8 2017-08-22 18:21:05 +10:00
Campbell Barton
691ed21842 PyAPI: replace PyC_FromArray with typed functions
This was meant to be generic but introduced possible type errors
and unnecessary complication.
Replace with typed PyC_Tuple_PackArray_* functions.

Also add PyC_Tuple_Pack_* macro which replaces some uses of
Py_BuildValue, with the advantage of not having to parse a string.
2017-08-22 18:10:57 +10:00
Campbell Barton
7497488149 Merge branch 'master' into blender2.8 2017-08-20 15:50:15 +10:00
Campbell Barton
46cf33bf01 PyAPI: Make use of PyC_LongAs... API
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.

Some inline exceptions are kept because they show useful details.
2017-08-20 15:49:10 +10:00
Campbell Barton
2332051419 Merge branch 'master' into blender2.8 2017-08-19 21:54:05 +10:00
Campbell Barton
1cc4033df8 PyAPI: expose matrix parsing function 2017-08-19 21:36:50 +10:00
Campbell Barton
a60727080f Merge branch 'master' into blender2.8 2017-08-12 14:06:29 +10:00
Bastien Montagne
c034193821 Cleanup: remove useless DM_ensure_looptri().
That one was doing exactly same thing as `dm->getLoopTriArray()`, no
point in having twice the same code here...
2017-08-11 17:08:41 +02:00
Sergey Sharybin
5605c26fcd Fix function declaration of some modifiers
Those functions did not use evaluation context.

Also fixed lots of unused variables warnings caused by commented out code which
needs to be ported away from DerivedMesh and to evaluation context.
2017-07-21 15:54:42 +02:00
Luca Rood
1c4c288727 Pass EvaluationContext argument everywhere
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
2017-07-21 14:47:26 +02:00
Aaron Carlisle
df7c609fda PYAPI: Fix mathutils doc structure 2017-06-14 16:47:43 -04:00
Brecht Van Lommel
98df7d778f Fix T51287: Matrix.lerp fails w/ shear
Use interp_m4_m4m4 (wraps Eigen),
`MATH_STANDALONE` will need to be updated to support this.
2017-05-26 17:02:27 +10:00
Campbell Barton
81e584ed17 CMake: Use GCC7's -Wimplicit-fallthrough=5
Use to avoid accidental missing break statements,
use ATTR_FALLTHROUGH to suppress.
2017-05-20 14:01:03 +10:00
Sybren A. Stüvel
349cafac52 Matrix.decompose(): changed terminology, "location" → "translation"
Matrix.decompose() should either return "location, orientation, size" or
"translation, rotation, scale". Since there are constructors for the former,
I've replaced "location" in the documentation with "translation".

The code is still the same, I just changed the documentation.
2017-04-21 15:51:35 +02:00
Aaron Carlisle
c7a4f96f88 Pydoc: Change Wikipedia links and grammar in mathutils matrix code 2017-03-22 14:54:22 -04:00
Campbell Barton
3b467b35a8 Fix T50029: BVHTree.FromPolygons memory leak 2016-11-29 19:32:41 +11:00
Aaron Carlisle
cf9a6b416c API: Fix Links
Self-explanatory. to find broken links run `sphinx-build -b linkcheck sphinx-in sphinx-out`

Reviewers: mont29

Tags: #bf_blender, #python, #infrastructure:_websites

Differential Revision: https://developer.blender.org/D2297
2016-10-25 17:34:01 +02:00
Campbell Barton
81f4bc1665 Cleanup: reduce Vector_getseters size using macros 2016-07-31 20:43:52 +10:00
Campbell Barton
cca57bf04c PyAPI: Use module names on initializaton
No need to re-convert from C strings to PyUnicode.
2016-07-14 15:51:56 +10:00
Campbell Barton
3df30c1a6e Cleanup: parenthesize defines 2016-06-01 00:19:01 +10:00
Brecht Van Lommel
21fddf7d1c C99/C++11: replace deprecated finite() by isfinite(). 2016-05-17 21:39:16 +02:00
Campbell Barton
722d586257 Fix T47993: noise_vector ignores random seed
Replace hard coded values with offsets derived from the random seed.
2016-03-30 20:43:43 +11:00
Campbell Barton
26f2fe9528 mathutils.bvhtree: Add find_nearest_range API call
Returns all elements within a radius.
Similar to kdtree.find_range
2016-03-19 18:31:56 +11:00
Campbell Barton
4e500101a7 Cleanup: quiet -Wcomma, cast to void where needed 2016-03-05 09:16:12 +11:00
Campbell Barton
b285394acc PyAPI: correct function name w/ arg parsing 2016-02-29 09:00:21 +11:00
Campbell Barton
9c21015c26 Fix crash in bvhtree.FromPolygons 2016-02-12 19:12:58 +11:00
Campbell Barton
c7608ef359 Fix T47337: BVHTree.find_nearest missing
Method wasn't named as documented.
2016-02-08 08:29:46 +11:00
Mike Erwin
a1d7f67d81 cleanup: spelling / typos
no functional changes
2016-01-28 00:30:50 -05:00
Campbell Barton
4f8b7f4420 Docs: quiet warnings in reference doc syntax 2016-01-25 20:26:39 +11:00
Campbell Barton
de356415ae Correct comments & some explanation from last commit 2016-01-21 11:03:37 +11:00
Campbell Barton
a1164ce271 Remove errors for unsupported math operations 2016-01-21 10:30:17 +11:00
Campbell Barton
f5604af464 Cleanup: use BM_mesh_* prefix for BMesh functions 2016-01-14 13:00:11 +11:00
Campbell Barton
9964eed9ac PyAPI: add optional filter argument to KDTree.find 2015-12-06 21:35:32 +11:00
Campbell Barton
ee719e8816 Cleanup: formatting (PyArg_ParseTuple) 2015-12-06 16:19:45 +11:00
Campbell Barton
aed5347b4c Using term 'origin' for mathutils.bvhtree docs
Matches rna ray-cast API
2015-12-02 19:25:08 +11:00
Brecht Van Lommel
4ff0126e89 C99 is now the C standard for all our C code.
The main new feature is mixed variable declarations and code, which can help
reduce uninitialized variables or accidental variable reuse.

Due to incomplete C99 support in VS 2013, variable length arrays are not
supported, BLI_array_alloca must still be used. The header <tgmath.h> is also
not supported.

Differential Revision: https://developer.blender.org/D1631
2015-11-22 22:31:22 +01:00
Campbell Barton
c5945ebb2c Cleanup: use quat to eul w/ mathutils API 2015-10-24 17:50:20 +11:00
Campbell Barton
fbca69c69a BLI_math: add mat3_normalized_to_* functions
Many uses of matrices for rotation keep them normalized,
so no need to normalize each time.
2015-10-24 07:02:51 +11:00