Campbell Barton
798e684c7c
Math lib: simplify size_to_mat4 and use in b_bone_spline_setup
2014-02-02 02:24:47 +11:00
Campbell Barton
99d050f88b
Text3d: selection in editmode now follows rotated text along path
2014-01-05 22:20:33 +11:00
Campbell Barton
07ceb99213
Code Cleanup: use strict flags for math lib, add inline declarations
2013-12-06 03:57:17 +11:00
Campbell Barton
f3d13bec6d
Code Cleanup: correct fabsf/fabs/abs use
2013-12-04 09:24:38 +11:00
Campbell Barton
a304b5a988
correct typo
2013-10-25 22:12:05 +00:00
Sergey Sharybin
e9d5e9813c
Code cleanup: added generic function copt_m3_m3d
2013-10-20 12:08:51 +00:00
Sergey Sharybin
fc8b0ed5e5
Move utility functions from mball to mathutils
2013-10-18 23:38:51 +00:00
Sergey Sharybin
9b09af0dca
Fix #36701 : Mask pivioting doesnt honor parenting
...
Made mask transformation aware of parent matrix.
2013-09-11 10:06:54 +00:00
Sergey Sharybin
8d6e5606d8
Add assert to mul_v3_m3v3 and mul_v2_m3v3,
...
So they're not likely to be called with bad arguments.
2013-08-06 02:37:02 +00:00
Campbell Barton
76e989d7b1
function renaming for own recently added BLI_math functions, suggested by Brecht.
2013-07-30 10:58:36 +00:00
Campbell Barton
5dc3cfc983
fix [ #36282 ] Spin error with non uniform scale
...
add support for passing object matrix to bmesh transform operators.
2013-07-26 11:15:22 +00:00
Campbell Barton
29df776b89
optimization: call one bmesh operator for rotate (not 3).
...
added pivot_m4() utility function since rotating about an arbitrary point is handy.
2013-07-26 06:12:49 +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
7430701600
correct own incorrect check bmesh edgerin subdivide, also add missing break in orthogonalize_m3 though this one wouldn't effect release builds.
2013-07-16 11:39:48 +00:00
Campbell Barton
d522a995cf
fix for orthogonalize_m3,4, missing break statements in switch.
2013-07-13 06:54:44 +00:00
Campbell Barton
3d13f22e89
no need to copy mat4x4 -> 3x3 in mat4_to_scale
2013-07-10 12:12:58 +00:00
Campbell Barton
ec8d277c64
BLI_math rename functions:
...
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4
these temporary names were used to avoid problems when argument order was switched.
2013-05-26 18:36:25 +00:00
Brecht Van Lommel
877e0e1184
Fix #35319 : python 2x2 matrix inverse and adjugate were wrong.
2013-05-12 09:26:02 +00:00
Campbell Barton
89c8de1f48
add matrix multiply for projection that outputs 2d values.
2013-05-08 12:55:36 +00:00
Campbell Barton
4a7feafa49
Support object scale for mesh display options. (currently only uniform scale for thickness test)
2013-04-17 23:30:19 +00:00
Ton Roosendaal
ae58968e0a
Blender Internal Render in viewport
...
Because of our release soon, feature has been added behind the Debug Menu.
CTRL+ALT+D and set it to -1. Or commandline --debug-value -1.
When debug set to -1, you can put the viewport to 'render' mode, just like
for Cycles. Notes for testers: (and please no bugs in tracker for this :)
- It renders without AA, MBlur, Panorama, Sequence, Composite
- Only active render layer gets rendered. Select another layer will re-render.
- But yes: it works for FreeStyle renders!
- Also does great for local view.
- BI is not well suited for incremental renders on view changes. This only
works for non-raytrace scenes, or zoom in ortho or camera mode, or for
Material changes. In most cases a full re-render is being done.
- ESC works to stop the preview render.
- Borders render as well. (CTRL+B)
- Force a refresh with arrow key left/right. A lot of settings don't trigger
re-render yet.
Tech notes:
- FreeStyle is adding a lot of temp objects/meshes in the Main database. This
caused DepsGraph to trigger changes (and redraws). I've prepended the names
for these temp objects with char number 27 (ESC), and made these names be
ignored for tag update checking.
- Fixed some bugs that were noticable with such excessive re-renders, like
for opening file window, quit during renders.
2013-04-16 17:39:20 +00:00
Campbell Barton
2433404e4b
add inline function mul_project_m4_v3_zfac() to get the z-depth value from a vector & mat4x4
2013-03-09 15:39:24 +00:00
Campbell Barton
7961147a59
code cleanup: was using var named 'in' for output.
2013-03-09 11:55:12 +00:00
Campbell Barton
abd1748e48
code cleanup: move runtime var zfac out of RegionView3D. rename initgrabz() -> ED_view3d_calc_zfac() and have it return the zfac to use.
2013-03-09 11:40:42 +00:00
Campbell Barton
533f359c0d
code cleanup: some style edits, also allow mul_v2_m2v2() to have the same value as in-out, since this is a convention for existing matrix functions.
2013-02-12 00:35:31 +00:00
Antony Riakiotakis
fcbd9c3a33
Old bug fix: Uv smart stitch failed to detect angle if islands were
...
rotated close to 180 degrees and there were edges both below and above
the 180 degree threshhold. Separating and averaging the negative and
positive angles seems to solve the issue making the tool a bit more
robust ;)
2013-02-11 22:52:13 +00:00
Campbell Barton
2eab18dc32
code cleanup: use const for matrix functions vector args.
2013-02-09 07:14:42 +00:00
Campbell Barton
f02f491ed0
correction to r54188, also don't attempt to triangulate triangles.
2013-01-29 20:49:40 +00:00
Campbell Barton
2b875a947f
skip calculating the normal for each face when triangulating, all callers make sure its valid. also remove some commented code (more then one generation of bmesh old).
2013-01-29 15:05:23 +00:00
Brecht Van Lommel
8f863ec625
Fix normalize_m4_m4 not working correct by not copying the entire matrix,
...
caused issue in blender internal with recent fix.
2013-01-23 14:37:12 +00:00
Sergej Reich
e83e3b0cf7
math: Add functions to decompose transformation matrices
...
mat4_decompose() is similar to mat4_to_loc_rot_size() but returns
rotation as quaternion.
mat4_to_loc_quat() just returns location and rotation without size.
2013-01-23 05:56:05 +00:00
Campbell Barton
c93e127e7a
code cleanup: style and replace (float)sin, (float)cos with sinf, cosf
2013-01-12 14:28:23 +00:00
Campbell Barton
cb70c5ba0f
fix for bug where weight paint would draw hidden faces but not draw then with the backbuffer (depth selection).
2012-12-23 08:20:44 +00:00
Campbell Barton
cc32540c48
style cleanup: stop the style checker script from complaining about '!*ptr'
2012-12-15 02:48:25 +00:00
Brecht Van Lommel
071a43f754
Fix #33497 : seting object scale to 0 on one axis made moving verts in edit mode
...
impossible. In this case matrix inversion failed and didn't give a useful result.
Now it falls back to a pseudoinverse in that case, so that moving along the
other axes still works.
There may be other places that can benefit from this, but this is a place where
it has no significant performance impact, doing this in general for e.g. bone
matrices could be quite slow.
2012-12-14 21:41:22 +00:00
Campbell Barton
566af58e1c
add assert if both args to invert_m4_m4 are the same.
2012-12-14 00:49:55 +00:00
Campbell Barton
7c699a217a
define the size of matrix args for both rows/cols.
2012-12-11 14:29:01 +00:00
Campbell Barton
f727448e10
fix [ #33106 ] Decimate modifier/collapse give bad result
...
FLT_EPSILON was too small to use when checking if the edge collapse result is an error.
add invert_m3_m3_ex(), invert_m3_ex() functiosn which take an epsilon to check the determinant, saves calculating it twice per edge collapse.
2012-11-07 09:28:59 +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
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
f70d2c65d8
rename api functions...
...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
Campbell Barton
c56a911cd9
style cleanup: comments
2012-10-20 20:20:02 +00:00
Bastien Montagne
e5d0dcb8d8
Few cleanup in matrix mathutils (make mul_m3_m3m4 and mul_m4_m3m4 consistant with other similar funcs, mainly copy-safe [i.e. you can use the same matrix as operand and result, saves lines in some already over-complicated code!]).
2012-09-16 15:25:28 +00:00
Campbell Barton
8f32070e9d
fix incorrect assert for mask face checking, also correct own bad spelling
2012-07-18 11:01:23 +00:00
Campbell Barton
84bf3e48c0
style cleanup: use c style comments in C code
2012-07-06 23:56:59 +00:00
Sergey Sharybin
6527f42b6b
Fix #31193 : Normals don't have any Z component
...
Issue was caused by heavily non-uniform scale applied on object.
Run scale correction on face and vertex normals draw if there's non-uniform scale.
2012-05-01 11:01:24 +00:00
Campbell Barton
e701f9b670
style cleanup: whitespace / commas
2012-04-29 15:47:02 +00:00
Sergey Sharybin
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
Campbell Barton
3f56ee3da7
style cleanup: issues missed last commit
2012-03-25 15:56:17 +00:00
Campbell Barton
53d32a0bd2
style cleanup: conform to style guide - mostly operator whitespace changes
2012-03-25 12:41:58 +00:00