Campbell Barton
3e49787b01
Python API: give a better error message when creating a Matrix fails
2013-11-29 09:48:42 +11:00
Campbell Barton
4da651c8f0
Fix T37472: crash when packing UV islands.
2013-11-19 11:20:57 +11:00
Campbell Barton
b6db417ee4
code cleanup: use const's for vector args.
2013-10-12 02:19:37 +00:00
Campbell Barton
1576565932
minor changes needed for building standalone mathutils.
2013-09-14 00:30:56 +00:00
Campbell Barton
2f6c748bb9
fix [ #36020 ] SmartUV Project is messy on a cube
...
was using very simple/stupid check to rotate us islands, replace with box_fit_2d() function.
missed docstring last commit.
2013-09-11 07:10:15 +00:00
Campbell Barton
d2d1025e4a
add mathutils.geometry.box_fit_2d() to wrap BLI_convexhull_aabb_fit_points_2d()
2013-09-11 06:56:51 +00:00
Campbell Barton
ab8d88ac18
add angle_to_mat2 utility function.
2013-09-10 20:45:47 +00:00
Campbell Barton
92d94ccb08
misc minor changes
...
- make cmake osx use of -ftemplate-depth match scons.
- use array size within sizeof(), more compact.
- replace AT with __func__ where the function is unique enough.
- BLI_box_pack_2D -> 2d to match other functions.
- rename new mesh normal calculation to mesh.calc_normals_split()
2013-09-10 19:23:39 +00:00
Campbell Barton
5dbe17cc12
add 2d convex hull utility function, BLI_convexhull_2d(), and python api mathutils.geometry.convex_hull_2d()
...
uses Andrew's monotone chain 2D convex hull algorithm.
2013-09-10 07:52:10 +00:00
Campbell Barton
8e46cf637c
tweak mempool loop comparisons when we know there is no chance for skipping past the last value.
...
also correct typo.
2013-08-31 02:12:31 +00:00
Campbell Barton
11c988ba00
Simplify line/plane intersection, add line_plane_factor_v3().
...
Remove no_flip option for isect_line_plane_v3(), its quite specific and only used for ED_view3d_win_to_3d().
2013-08-31 02:06:23 +00:00
Campbell Barton
09ff49755f
math api edits - replace point-normal form for a plane with dist_to_plane_v3()
...
also correct python mathutils api, was missing vector checks.
2013-08-23 14:37:22 +00:00
Campbell Barton
f3654ce6b6
fix incorrect docs [ #36518 ] Vector.rotate() does not return value as documented
2013-08-20 08:41:34 +00:00
Campbell Barton
7db1d6556d
code cleanup: add break statements in switch ()'s, (even at the last case).
2013-07-21 08:16:37 +00:00
Campbell Barton
418011907c
remove nan copyrights from code added since blender become opensource (copy paste errors), also remove BKE_script.h
2013-07-02 10:14:59 +00:00
Campbell Barton
04a9c0e28a
bump mathutils callback slot size.
2013-05-17 07:10:40 +00:00
Campbell Barton
5018ea5e29
real fix for [ #35097 ], (curve cap flipping).
...
previous commit was incorrect, the face flipping depended on the orientation of the curve.
fix by passing the bevel direction to the fill function so we can have a reliable front/back.
This also gives some speedup for all curve filling since we can avoid calculating the normal since its already known.
2013-04-26 21:04:12 +00:00
Campbell Barton
c667f1ff10
utility function volume_tetrahedron(), for mathutils and BLI math.
2013-04-21 13:24:45 +00:00
Campbell Barton
a120049c3b
use psys->seed for smoke random number generator, increase size of MATHUTILS_TOT_CB and reduce float->double conversions.
2013-04-16 09:04:34 +00:00
Campbell Barton
eb66c45301
correct pyapi function intersect_line_sphere_2d() using 3d vecs when only 2d are needed.
2013-04-14 11:57:35 +00:00
Thomas Dinges
858ff6b696
Fix for [ #34898 ] Typo in error message of mathutils.Vector
...
* Also fixed some more cases of "more then" -> "more than".
2013-04-07 15:09:06 +00:00
Sergey Sharybin
18d2dd7e3a
Merging r55547 through r55594 from trunk into soc-2008-mxcurioni
2013-03-26 09:09:31 +00:00
Campbell Barton
64d161de87
style cleanup:
...
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-26 07:29:01 +00:00
Campbell Barton
0397cc0bab
fix for assert(), were not enough mathutils slots.
2013-03-18 22:53:58 +00:00
Campbell Barton
16b82845ee
code cleanup: add 'const' to headers to quiet msvc warnings, also remove (char *) casts that aren't needed now we're on Python3.3
2013-03-17 18:30:31 +00:00
Campbell Barton
f9f7070336
add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh.
2013-03-10 06:18:03 +00:00
Campbell Barton
f44b7868c5
add mathutils function to intersect 2 circles. Converted to C from a python script by Alex Fraser.
2013-01-28 11:52:17 +00:00
Campbell Barton
b2c66e268f
replace MIN/MAX 3,4 with inline functions
2012-12-21 05:07:26 +00:00
Campbell Barton
dc7a138830
correct bad comment
2012-12-16 10:28:52 +00:00
Campbell Barton
950fb66c38
replace TypeError with Value error for matrix operations where the type is right but it can't succeed because of a property of the instance (normally the wrong col/row size).
2012-12-16 04:10:57 +00:00
Campbell Barton
1886ae38b4
add Matrix.normalized(), handy for transforming normals.
2012-12-16 04:05:16 +00:00
Campbell Barton
adf7bfa8bb
ifdef out dynstr so mathutils can be compiled as an external module again.
2012-12-08 01:16:59 +00:00
Campbell Barton
f7f4148b40
change uiButGetStrInfo() to use a trailing NULL arg rather then passing the number of args as an arg.
2012-12-02 04:51:15 +00:00
Campbell Barton
cf6994b910
code cleanup: spelling,
...
also initialize bmesh-bevel settings struct to zero to avoid possible uninitialized memory later.
2012-11-12 07:33:01 +00:00
Campbell Barton
004f8d78ed
default to Python3.3 on Linux for SCons and CMake, warn when building with python 3.2x or older.
...
also remove casts to keep Python3.2 warning quiet.
2012-11-05 13:48:42 +00:00
Campbell Barton
fae6c35ca7
code cleanup: quiet -Wdouble-promotion, disabled this warnings for a few files since its done throughout the code in some places.
2012-11-04 07:18:29 +00:00
Campbell Barton
e8a70d4b90
fix for crash in python matrix utility functions .inverted/adjugated/transposed if the matrix has a read callback and fails.
...
also replace DM_get_poly_data_layer with dm->getPolyDataArray() since this is the convention in subsurf code and the functions now added.
2012-10-31 03:21:13 +00:00
Campbell Barton
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
Campbell Barton
9fc95bd7ee
use min/max inline functions where MIN2/MAX2 were doing type conversion.
2012-10-27 11:18:54 +00:00
Campbell Barton
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
Campbell Barton
c56a911cd9
style cleanup: comments
2012-10-20 20:20:02 +00:00
Campbell Barton
92862f96dc
code cleanup: use float sizes for function args.
2012-10-15 23:11:59 +00:00
Campbell Barton
40186a8c11
remove BLI_noise from BLI_blenlib.h, not that many files need this.
2012-10-12 00:18:32 +00:00
Campbell Barton
97d4fb4161
code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too.
2012-10-09 13:36:42 +00:00
Campbell Barton
aa49ca25d5
incorrect spelling in comments
2012-09-26 20:05:38 +00:00
Campbell Barton
25c96bc9f3
code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc
2012-09-20 01:02:39 +00:00
Campbell Barton
7aeaeaf378
fix bug in mathutils.geometry.intersect_point_line() where 4D vectors were treated as 2D.
...
also change behavior to return a 2d vector when all args are 2D.
2012-08-28 11:27:46 +00:00
Campbell Barton
77f0be7fec
support unary positive operators for vectors (same as numpy), so you can do 'vector_a = +vector_b', this makes a copy.
2012-08-27 13:40:19 +00:00
Campbell Barton
71d1b09708
minor code cleanup
2012-08-25 12:55:14 +00:00
Campbell Barton
41ee294618
don't pass the same value to axis_angle_to_quat() for axis & quat.
...
-/-This line, and those below, will be ignored--
M mathutils_Quaternion.c
2012-07-25 16:46:46 +00:00