Campbell Barton
b32bf2c462
code cleanup: use min_/max_ math functions, add minmax_v2_v2v2.
2012-10-25 22:47:54 +00:00
Campbell Barton
95ddd19d13
fix for build error in own commit with non gcc compilers. (and remove invalid comment)
2012-10-25 07:53:11 +00:00
Campbell Barton
9e6d27bbf0
add BLI_STATIC_ASSERT macro.
2012-10-25 04:44:46 +00:00
Campbell Barton
0cba4e6d6f
use smaller type for kdopbvh - this change was made as a size optimization, and I moved back to ints since there were many int comparisons.
...
now define axis_t and an unsugned char.
2012-10-24 08:16:49 +00:00
Campbell Barton
879d92062a
code cleanup: move doxy comments into the C files.
2012-10-24 06:08:28 +00:00
Campbell Barton
90f4ed3a0e
use int's for kdopbvh start/stop axis since there were loops comparing with other ints.
2012-10-24 05:08:33 +00:00
Campbell Barton
81eafc49e6
use min_ii/max_ii over MIN2 MAX2
2012-10-24 05:06:40 +00:00
Campbell Barton
2da6039e63
rename axis_primary_v3() to max_axis_v3() to avoid confusion with axis_dominant_v3(). also add min_axis_v3().
2012-10-24 02:25:00 +00:00
Campbell Barton
e038a1c613
reduce float comparisons for keying operation and despill.
2012-10-23 16:32:39 +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
Brecht Van Lommel
b131359834
Fix #32867 : normal map baking issue with flat shaded faces since bmesh. Also
...
removed the old unused normal map tangent computation code.
2012-10-23 14:57:49 +00:00
Campbell Barton
101660c809
code cleanup: give rng functions BLI prefix.
2012-10-23 13:50:44 +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
1767b65846
style cleanup: also rename bmesh_decimate.c --> bmesh_decimate_collapse.c
2012-10-23 03:38:26 +00:00
Sergey Sharybin
6e62491c5a
Fix #32522 : Object's diffuse color not showing in Sculpt Mode
...
Added option to display object's diffuse color multiplied by sculpting
mask. This option could be found in Options panel of toolshelf when in
sculpting mode.
Thanks to Nicholas and Brecht for reviewing the patch!
2012-10-22 17:33:53 +00:00
Campbell Barton
436bbdfd24
style cleanup: use more const's in BLI_heap & dpx/cineon style cleanup
2012-10-22 13:00:02 +00:00
Campbell Barton
ddc2dbc2a4
style cleanup
2012-10-22 08:15:51 +00:00
Campbell Barton
30fd258a0b
fix for own error in BLI_heap_new_ex() when zero size is passed.
2012-10-22 07:57:21 +00:00
Campbell Barton
a4b2783169
small optimization for BLI_heap(), give some speedup in decimeter.
...
- use unsigned ints only (where mixing signed/unsigned)
- turn heap_swap into an inline function, add SWAP_TVAL macro to swap values using a temp value as storage.
- added type checking SHIFT3/4 macros
also style cleanup for CTR_Map
2012-10-22 03:25:53 +00:00
Campbell Barton
248b2fc6d6
bmesh-decimator update
...
- update face normals when triangulating.
- avoid divide by zero when interpolating customdata on a zero length edge.
- replace zero float comparisons with fabsf() < FLT_EPSILON to avoid numeric error.
also renamed BLI_heap_empty() --> BLI_heap_is_empty() so its obviously readonly function.
2012-10-21 15:20:53 +00:00
Bastien Montagne
26d0492653
A final bunch of UI messages fixes and tweaks, and some BKE_report()<->BKE_reportf() fixes.
2012-10-21 14:02:30 +00:00
Campbell Barton
d599b643b7
style cleanup: bge, switch statements mostly.
...
also left bmesh decimator on in previous commit.
2012-10-21 07:58:38 +00:00
Campbell Barton
f3ece5a108
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
2012-10-21 05:46:41 +00:00
Campbell Barton
7deb8d8a26
code cleanup: spelling
2012-10-20 20:36:51 +00:00
Campbell Barton
c56a911cd9
style cleanup: comments
2012-10-20 20:20:02 +00:00
Campbell Barton
bc8f602601
style cleanup
2012-10-20 18:46:57 +00:00
Campbell Barton
1820d3529c
add TIMEIT_VALUE_PRINT() macro for printing timing between start/end macros.
2012-10-20 10:37:15 +00:00
Campbell Barton
9f8070d047
code cleanup:
...
- define array sizes for functions that take vectors.
- quiet some -Wshadow warnings.
- some copy/paste error in readfile.c made it set the same particle recalc flag twice.
2012-10-20 08:02:18 +00:00
Campbell Barton
e527ce552e
add option to initialize heap with a known number of elements, since this may be known in advance - it avoids re-allocing too much.
2012-10-19 10:40:32 +00:00
Campbell Barton
78f7518bf3
small quadric library ported from Laurence Bourn's LOD_decimator LOD_Quadric class. not used just yet.
2012-10-19 07:20:37 +00:00
Campbell Barton
92862f96dc
code cleanup: use float sizes for function args.
2012-10-15 23:11:59 +00:00
Campbell Barton
4d4664d98f
code cleanup: check for msvc directly when using warning pragma's.
2012-10-15 02:15:07 +00:00
Campbell Barton
27e54f4d37
code cleanup: remove redundant casts. quiet some qualifier warnings.
2012-10-14 07:40:16 +00:00
Campbell Barton
68d68e13b6
fix for error compiling on some platforms: use ll suffix for 64bit ints in BLI_endian_switch_int64()
2012-10-14 04:11:34 +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
Daniel Genrich
cb634b9100
Google Summer of Code project: "Smoke Simulator Improvements & Fire".
...
Documentation & Test blend files:
------------------
http://wiki.blender.org/index.php/User:MiikaH/GSoC-2012-Smoke-Simulator-Improvements
Credits:
------------------
Miika Hamalainen (MiikaH): Student / Main programmer
Daniel Genrich (Genscher): Mentor / Programmer of merged patches from Smoke2 branch
Google: For Google Summer of Code 2012
2012-10-10 13:18:07 +00:00
Campbell Barton
7dc19e0bc7
use __restrict for string functions args so the compiler can assume they dont overlap.
...
also avoid comparing int/size_t in for loops.
2012-10-10 04:47:53 +00:00
Campbell Barton
c3ca19800c
refactor screen foreach functions to accept float[2] arguments rather then int pairs.
...
overall means less converting between float and int (and short in some cases).
2012-10-10 01:22:19 +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
2e81400b77
minor edit to type checking macro to avoid clangs static checker tagging the var as possibly NULL.
2012-10-07 23:58:57 +00:00
Sv. Lockal
c80c4c896a
Fix file descriptor leak in BLI_file_ungzip_to_mem and small memleak in wm_window_title.
2012-10-07 15:39:47 +00:00
Campbell Barton
e8872a8ea2
style cleanup: if();
2012-10-07 09:48:59 +00:00
Campbell Barton
1a9f930514
add type checking for more error prone macros.
2012-10-07 07:27:09 +00:00
Campbell Barton
c530661db2
patch [ #32556 ] Stupid endian conversion in avi format
...
from Andreas Schwab (schwab)
modified to use code from BLI_endian_switch.
2012-10-07 06:06:28 +00:00
Campbell Barton
a17e39476c
Optimization for endian switching, but shifting is a lot faster then using a temp char (approx 18x speedup on my system).
2012-10-07 04:21:37 +00:00
Campbell Barton
4cc29110aa
fix writing past array bounds in imagewraposa().
...
also correct array sizes in othere areas.
2012-10-06 12:04:09 +00:00
Sergey Sharybin
c001bd81a7
Color Management: fixed loading configuration from non-ascii paths
...
Used the same hack as BLI gzip is using -- calculate short path and
send it to OCIO library.
2012-10-06 07:03:03 +00:00
Campbell Barton
db70bfc206
code cleanup: use functions to initialize selection user data structs, use radius-squared for circle select comparisons.
...
edge_fully_inside_rect() & edge_inside_rect() args were shorts when all callers were passing ints.
2012-10-05 15:44:11 +00:00
Campbell Barton
0d647f68a3
fix: path looper was checking the path of old tessface external data rather then loop data. (missed with bmesh upgrade)
2012-10-02 00:28:01 +00:00
Campbell Barton
df298490b8
mask data is no longer automatically added when sculpting (except when there is a multi-res modifier).
2012-10-01 05:19:57 +00:00