Campbell Barton
763c205e72
add support for mempool/linklist functions.
2013-08-16 05:50:00 +00:00
Campbell Barton
5ba898d868
utility functions to reverse and wrap arrays.
2013-08-13 23:43:44 +00:00
Campbell Barton
98c574e41a
use 'greater/less then or equal to' operators rather then adding 1.
2013-08-11 05:40:35 +00:00
Campbell Barton
f97a4bd254
code cleanup: more zero as NULL pointers.
2013-08-07 03:36:05 +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
2497084744
mempool api cleanup: differentiate mempool functions that allocate a pointer lookup table from allocating the data as a contiguous array,
...
call these functions BLI_mempool_as_table(), BLI_mempool_as_array(), the N prefixed versions of these functions return newly allocated arrays.
2013-08-04 19:40:50 +00:00
Campbell Barton
bd89bd9e1c
avoid using MEM_reallocN_id directly, add utility macro for freeing.
2013-08-04 03:00:04 +00:00
Campbell Barton
c212503437
minor changes to BLI_heap, save some CPU cycles.
...
added an assert for incorrect use of BLI_heap_remove
2013-08-03 22:04:47 +00:00
Sv. Lockal
66a4077927
fix for [ #36260 ] 2,300 Objects Makes Blender Unresponsive
...
- performance of outliner was low because of unoptimal data structures.
- now it uses BLI_mempool instead of custom mempool and GHash to make searches for duplicates faster.
- also fix undesired behaviour of BLI_mempool_as_arrayN
thanks to Campbell Barton and Lukas Tönne for helping me get a better fix put together.
2013-08-03 11:35:09 +00:00
Campbell Barton
e03b1668e0
code cleanup: remove unused functions
...
- IsectLLPt2Df
- isect_point_quad_uv_v2
- isect_point_face_uv_v2
These are obsoleted by resolve_tri_uv, resolve_quad_uv
also add attributes for unused function results for some math functions.
2013-08-01 17:15:11 +00:00
Campbell Barton
22dae3e600
fix for BLI_ghash_clear from Sv. Lockal (lockal)
2013-07-31 20:50:55 +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
c754eaa0f9
add inline functions getting a single axis from mul_m3_v3()
2013-07-28 19:46:33 +00:00
Campbell Barton
c4a50e9aeb
remove unneeded NULL checks, add one for give_matarar() return value.
2013-07-28 06:37:58 +00:00
Campbell Barton
0cb9a83113
code cleanup: remove unused code
2013-07-27 18:17:19 +00:00
Campbell Barton
6aa001f48d
code cleanup: remove redundant NULL checks and avoid writing to the source string.
...
also rename BLI_replacestr() -> BLI_replacestrN() since it returns an allocated buffer.
2013-07-27 14:05:59 +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
ec3fce8e27
add api function BLI_path_append to add to a path (and ensure a seperator), replaces BLI_join_dirfile when the dir and the destimation were the same.
2013-07-24 21:25:06 +00:00
Campbell Barton
e1928790ae
use binary prefix for file sizes (old todo).
2013-07-23 15:01:59 +00:00
Campbell Barton
3ff3d1bc0f
replace use of strcat() where the string offset is known.
...
also correct bad logic with converting a textblock to 3d-text, bytes-vs-number of chars wasn't handled right.
2013-07-23 12:49:30 +00:00
Campbell Barton
8bf5ec4f8a
code cleanup: de-duplicate BLI_ghashIterator_new/init and disable unused text undo print function.
2013-07-21 17:05:41 +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
49c61e169b
misc edits
...
- fix for missing None check with recent 'Hidden Wire' draw option.
- avoid int overflow with mesh selection.
- remove ';' outside of functions.
2013-07-20 15:07:57 +00:00
Campbell Barton
4b0f50597f
revert r58419. caller should do NULL check here.
2013-07-20 00:15:01 +00:00
Daniel Stokes
869d654ccc
BGE fix [ #36223 ] Strange page fault of "Game" actuator
...
Adding a NULL check to BLI_ghash_lookup
2013-07-19 22:04:06 +00:00
Campbell Barton
a2492e0603
style cleanup: braces/indentation
2013-07-19 16:44:17 +00:00
Campbell Barton
397da50002
style cleanup: switch statements, include break statements within braces & indent.
...
also indent case's within the switch (we already did both of these almost everywhere)
2013-07-19 15:23:42 +00:00
Campbell Barton
dc06041049
code cleanup: use __linux__ define over linux
2013-07-19 10:41:04 +00:00
Campbell Barton
bc5ecbc393
optimization: avoid extra loop in BLI_mempool_destroy(). free the list inline.
2013-07-19 10:40:57 +00:00
Campbell Barton
40c2f52dbf
code cleanup: simplify BLI_parent_dir using BLI_join_dirfile
2013-07-19 10:39:49 +00:00
Campbell Barton
33e0bc6b48
code cleanup: avoid sqrt in isect_seg_seg_v2_point
2013-07-19 10:39:37 +00:00
Campbell Barton
925c5010e8
fix for checking char arrays against NULL, instead check their first character. also remove some dead code (return directly after return).
2013-07-16 11:42:07 +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
60e64bcfa7
revert part of own commit r58254, utf8 isnt stepping by 1 always so use less-than comparison.
2013-07-15 21:34:48 +00:00
Campbell Barton
76ccf2403a
correct placement of debug memset() for DEBUG_STRSIZE
2013-07-15 09:10:51 +00:00
Campbell Barton
2b6f35d686
fix for error in string copy
...
- BLI_strncpy_wchar_from_utf8 wasn't NULL terminating the destination string, caused uninitialized memory use in BPY_python_start().
- BLI_strncpy_wchar_as_utf8 could write one byte past the buffer bounds.
2013-07-15 05:09:06 +00:00
Campbell Barton
02f5b0fc08
debug option (off by default), for BLI_string to help find incorrect sizes being passed in (enable in source files only)
2013-07-15 03:54:57 +00:00
Campbell Barton
d4ab6f3a9e
fix [ #36107 ] Moving origin of instanced objects doesn't work properly
...
now use the active object first if its selected, this means when multiple instances are selected, using the active object gives a predictable outcome.
2013-07-15 01:34:59 +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
55c79821b9
optimize interp_weights_poly_v2(), well tested, was calculating the area twice as much as was needed.
2013-07-12 00:18:27 +00:00
Campbell Barton
a3a4386991
fix [ #36105 ] Bevel UV Flicker
...
interp_weights_poly_v2/3 functions used much too small an epsilon value, caused flickering.
2013-07-11 15:57:22 +00:00
Campbell Barton
e6b22d287f
utility function for printing arbitrary sizes vectors.
2013-07-11 15:32:26 +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
d4ff53b760
fix [ #36066 ] crash when Tab out text object
...
the way Curve.len is used at the moment is really stupid, calculate string size on save for now, but should really store the length in bytes and total number of characters.
2013-07-09 06:21:45 +00:00
Brecht Van Lommel
3ce280e825
Fix #35960 , #36044 : blender internal viewport rendering crash while editing data.
...
Now the viewport rendering thread will lock the main thread while it is exporting
objects to render data. This is not ideal if you have big scenes that might block
the UI, but Cycles does the same, and it's fairly quick because the same evaluated
mesh can be used as for viewport drawing. It's the only way to get things stable
until the thread safe dependency graph is here.
This adds a mechanism to the job system for jobs to lock the main thread, using a
new 'ticket mutex lock' which is a mutex lock that gives priority to the first
thread that tries to lock the mutex.
Still to solve: undo/redo crashes.
2013-07-08 17:56:51 +00:00
Campbell Barton
a02d256f5e
fix [ #35987 ] bevel gives nan vertices
...
The line intersection function bevel uses could give nan intersections.
2013-07-05 00:30:00 +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
eba9b4f6c1
fix for out of bounds read in BLI_path_rel
2013-06-27 20:47:59 +00:00
Campbell Barton
bb42703ea3
- remove edge collapse loop operator (now replaced by dissolve).
...
- fix missing null pointer check from own recent changes.
- add asserts if BLI path functions are given wrong id's
2013-06-27 01:10:19 +00:00