Commit Graph

2409 Commits

Author SHA1 Message Date
94d4b31323 Math Lib: mat3_to_eulo2 & mat3_to_eul2 mixed float/double differently
replace sqrt with hypotf to avoid precision loss instead
2014-06-14 17:10:46 +10:00
746f0ad257 Polyfill2d: use kd-tree
Simple search for intersections became slow for larger concave ngons (100+)
Tested to work with ngons up to 75k sides, performance is approx ~6x faster then scanfill.

This is a 2D version of BLI_kdtree with modifications:
- nodes can be removed
- an index -> node map is stored (especially for tessellation)
2014-06-14 08:27:19 +10:00
19b1da2b7b Polyfill2d: avoid calculating polygon winding (its known in all cases) 2014-06-14 08:21:52 +10:00
7529e36f49 Polyfill2d: Switch directions on concave triangles
Better topology and minor speedup
2014-06-14 08:21:51 +10:00
f0f45eea2e Polyfill2d: replace array with linklist, faster resizing
approx 4.0x speedup
2014-06-14 08:21:51 +10:00
341fd67fbf Add string escaping support for BLI_str_quoted_substrN 2014-06-14 00:47:12 +10:00
365ff66987 GSet, GHash: Add BLI_gset_add, since its common to add members to a set
also rename BLI_edgeset_reinsert -> BLI_edgeset_add, in this case its the same.
2014-06-14 00:47:12 +10:00
0e085c637e BLI_kdtree: use UNLIKELY 2014-06-14 00:47:11 +10:00
b707b07c5b Fix mempool bottleneck alloc & freeing a single item
Would continuously reinitialize the first chunk of the mempool,
now check for at least 2 blocks.
2014-06-08 23:09:30 +10:00
09b0eadadd Add debug define for timing polyfill 2014-05-31 21:37:51 +10:00
b2cad79500 Math lib: add negate_m3, negate_m4 2014-05-30 00:26:32 +10:00
73452ae588 BLI_dynstr: add assert to check curlen is correct 2014-05-29 20:39:51 +10:00
973f95fa9d Fix T40157: Loading movies larger than 4GB in size fails
Issue was caused by _wstat returning EOVERFLOW error because
of file size didn't fit into stat structure which was using
long datatype.

The idea of this patch is to use _wstat64 and _stat64 structure
which is capable storing 64bit file sizes.

Made it a typedef for stat structure used by BLI_stat function
in order to make code easier to follow and avoid ifdefs all
over the place.

Additionally solved issue with BLI_exists which was wrongly
returning False in cases destination file is larger then 4GB.
2014-05-28 23:21:39 +06:00
4893780d9f PIL_time is no longer used in BLI_random.
The last remnant of using the system time for random seed was removed
in rBafb4b65, now seeds are always explicit for BLI_random.
2014-05-27 08:29:55 +02:00
c6a34e047c Correct ortho_v2_v2 arg size 2014-05-27 14:42:22 +10:00
6b7bee6cd7 Fix for BLI_delete failing on files containing quotes 2014-05-26 10:23:05 +10:00
Dalai Felinto
7f089afc8b Bake-API: relaxing in the check for scale uniformity
It still warns the user that there may be an error, but the baking goes
on. Also using the new is_uniform_scaled_m4() instead of float comparison.

Reported and fix suggested by Campbell Barton as a concern over 2bfc3deb
2014-05-22 21:35:58 -03:00
2191590711 Polyfill: simply re-ordering checks gives ~%15 speedup 2014-05-20 17:21:57 +10:00
193e77cc67 Fix T40201: Keyframe edits fail to update the viewport 2014-05-19 00:24:45 +10:00
e8630bdccf Comment unused BLI_rebase_path 2014-05-19 00:00:59 +10:00
a089a86edd Fix BLI_cleanup_path: '.' at the start of a path
On windows "." was replaced with the root directory.
On other systems any path starting with a '.' would be replaced with "/"

This was added for the file selector only,
so better handle this in the file selector (though it looks not to be needed).
2014-05-18 19:03:15 +10:00
48881ad1e0 Code cleanup: doxy comments 2014-05-14 15:00:47 +10:00
33df6aa12e Fix T39196, Dynamic Topology Undo Applied to Wrong Mesh
Undoing nodes that do not belong to the current object will cause the
saved bmesh log entry to be reverted instead. This entry can belong to
another object though.
This is easy to fix by enforcing name matching (this was borrowed by
edit mode but can definitely be improved) between current object name
and undo node name and deleting older entries.

However there are complications. Deleting dyntopo entries in this way
can leave a brush stroke as first dyntopo log entry. This can present
issues if we attempt to delete that entry since it's deleted mesh
elements may now have had their ids (which would still be valid at the
time) cleaned up. This can result in crashing if we attempt to resculpt
on the mesh. To fix this I have disabled releasing the deleted entries.

This entanglement between bm_log and undo is quite volatile but I hope
the system works better now.

Also minor cleanup, fix unneeded check warning
2014-05-13 22:05:23 +03:00
5db81a0695 Fix T40144: Font rendering problems 2014-05-12 09:08:02 +10:00
b78bb98cc9 VFont: de-duplicate checks for next/prev handles 2014-05-12 09:02:14 +10:00
4dcdb4b15e VFont: avoid allocating an array for storing total contours. 2014-05-12 08:47:49 +10:00
65d54f34b1 Code cleanup: spelling/indentation 2014-05-08 04:53:05 +10:00
35380cdcad Fix for uninitialized unit_use_radians variable with inset and bevel 2014-05-06 19:20:03 +10:00
Dalai Felinto
56d8affe42 BLI_path_suffix() - new path util functon to add a suffix to a filepath (before the extension)
Revision: D465
Reviewd by Campbell Barton
2014-05-02 20:56:16 -03:00
95b93b5d46 Add BLI_compiler_compat.h to help with portability 2014-05-02 01:14:15 +10:00
af86b008b2 Include removal gave problems with windows, ifdef some back in for windows only 2014-05-01 07:21:08 +10:00
cb48c0ceea Revert "Fix msvc 2013 compiler errors after the ingenious cleanup in 4ca67869cc7a."
This reverts commit a47a4ef82f.
2014-05-01 07:20:46 +10:00
a47a4ef82f Fix msvc 2013 compiler errors after the ingenious cleanup in 4ca67869cc. 2014-04-30 23:16:12 +02:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
409fb4da0c Code cleanup: remove redundant matrix initialization 2014-04-29 18:13:20 +10:00
7712d86512 Error in last commit, need to take duration into account 2014-04-29 06:05:54 +10:00
6600fe0de5 Correction to last commit 2014-04-29 05:48:25 +10:00
89b3dcaf82 f-curve easing: Adjustments to Robert Penner elastic easing
Compensate for the clamped amplitude by blending the elastic effect.

Allows for a subtle elastic effect which wasn't possible before.
2014-04-29 05:40:46 +10:00
e158fbf934 f-curve easing: make ease in/out expressions consistent 2014-04-29 03:21:32 +10:00
b5feb1940d f-curve easing: make ease-out symmetrical to ease-in 2014-04-29 03:20:11 +10:00
1b63a5d815 Fix for f-curve elastic ease in/out discontinuity 2014-04-29 02:55:59 +10:00
28322c1496 Convex Hull 2D: avoid calling qsort twice 2014-04-29 00:35:32 +10:00
835765926f Final overlooked cleanup for last commit 2014-04-27 18:44:23 +02:00
f3798fa45e Revert the testing sculpt openmp thread control and limit for OSX to physical threads as in 2.70a tag 2014-04-27 18:39:03 +02:00
d7d2e71a03 Correct some errors in auto-cleanup 2014-04-27 22:02:59 +10:00
b6e967be63 Code cleanup: const args and arrays 2014-04-27 08:56:54 +10:00
483d8da9bc Code cleanup: use 'const' for arrays (blenlib) 2014-04-27 00:25:15 +10:00
1e3904677c Avoid integer overflow in build_implicit_tree_helper 2014-04-26 06:55:36 +10:00
dd86773969 BoxPack: replace macros with functions
also correct error merging vertices
2014-04-26 00:25:49 +10:00
fe52e64f6b Revert previous change after discussion with Campbell
Let's just be really verbose and it some compiler gives
issues tell him NOT to do this.

We shouldn't really workaround compiles' idiocy..
2014-04-25 17:16:06 +06:00