Commit Graph

2138 Commits

Author SHA1 Message Date
3c05662f5e fix error where BKE_mesh_cd_validate layer renaming would use invalid index values. from r60260
also correct some comments.
2013-09-25 11:11:41 +00:00
eaf354e222 Fix related to #36319: restore SDL_VIDEODRIVER=dummy environment variable, it
seems that somehow not having this is causing keyboard events to be caught by
SDL. This was removed because it broke addons that could use SDL, now set the
environment variable only temporary during SDL initialization.

This may have been causing issues with keyboard events getting missed in the
game engine, but I couldn't confirm the issue here.
2013-09-23 14:48:28 +00:00
1576565932 minor changes needed for building standalone mathutils. 2013-09-14 00:30:56 +00:00
8beb565c59 code cleanup: headers - doxy comments. 2013-09-12 03:02:50 +00:00
9b09af0dca Fix #36701: Mask pivioting doesnt honor parenting
Made mask transformation aware of parent matrix.
2013-09-11 10:06:54 +00:00
d2d1025e4a add mathutils.geometry.box_fit_2d() to wrap BLI_convexhull_aabb_fit_points_2d() 2013-09-11 06:56:51 +00:00
44ec0b0aab uv-pack operator: option to rotate uv islands to fit in the optimal rectangle when packing. 2013-09-10 23:11:58 +00:00
ab8d88ac18 add angle_to_mat2 utility function. 2013-09-10 20:45:47 +00:00
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
561e82e927 * Compile fix for r59990. 2013-09-10 09:06:24 +00:00
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
65fcc29d0c missing NULL check in recent commit, also skip some calculations in mean_value_half_tan functions for degenerate cases. 2013-09-07 06:56:27 +00:00
6439ae9d51 fix for barycentric_weights_v2_quad() divide by zero when the location we're checking the weight of touches one of the weighting coords exactly. 2013-09-06 05:44:18 +00:00
7a38fe97fd sorting utility functions for simple cases - sorting pointers by float for example. 2013-09-05 22:24:12 +00:00
3b72f1824c rename positive_mod to mod_i, make it work with nagative numbers (matching pythons modulo), and use in a few more places.
allow mesh-checker-deselect to have a negative offset.
2013-09-05 20:54:32 +00:00
2e0422b17f add function for rotating linked list so at item is last. 2013-09-05 11:40:38 +00:00
96c668b1dd add positive_mod() utility function. 2013-09-05 10:12:00 +00:00
cdabc891e2 remove error return value from BLI_bvhtree_insert, no callers were using.
in the case of an error - assert, rather then fail silently since it wont be working as expected anyway.
2013-09-04 20:33:50 +00:00
4d61e4a428 use strict flags for kdopbvh, also assert when invalid treetype is passed, rather then failing silently. 2013-09-04 20:03:33 +00:00
2dc988df8c reorder BLI_strict_flags.h include so its not conflicting with stdio.h on apple. 2013-09-03 04:39:12 +00:00
1ea9f88ff9 warning cleanup: correct some odd returns and quiet strict flag warnings on some systems. 2013-09-02 17:59:04 +00:00
26bfda6fad Some function didn't match their declaration 2013-09-02 11:19:21 +00:00
d59b4752e4 add hash iterator functions to access the pointer to the value. 2013-09-02 02:58:53 +00:00
36065ee4f4 use strict flags for kdtree, and replace ints with unsigned ints where possible.
also replace callocs with mallocs since zeroing memory can be avoided.
2013-09-01 20:17:56 +00:00
77e86dce2a Fix [#36479] Particle instance Modifier random position snaps objects to 0 position
Most work (tracking bug) done by Anthony Edlin, many thanks!

Great example of why having duplicate code is never a good idea... ;)
2013-09-01 15:31:09 +00:00
fe427f0561 kd-tree,
- replace numbers with defines for allocation increments and default array size.
- move array reallocation into a static function (deduplicate 2x).

also fix own mistake with uninitialized slop-space var in memory printing statistics.
2013-09-01 08:58:46 +00:00
9d04a61f36 use strict flags for lasso, boxpack, gsqueue and quadric's.
for lasso also use unsigned ints rather then shorts for the path length.
2013-09-01 03:43:10 +00:00
098cf90956 use strict flags for scanfill, also replace shorts with unsigned shorts and ints/bools in some cases. 2013-09-01 03:37:45 +00:00
2924a02a35 move strict compiler checks into a header so its easier to manage in one place (pragmas were copied around).
also enable more strict warnings for BLF (which had some incorrect casts).
2013-09-01 00:46:04 +00:00
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
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
f477c0e535 remove unnecessary check in BLI_mempool_iterstep and add doxygen comments to mempool. 2013-08-30 22:04:37 +00:00
b8547074e1 mempool internal change, use unsigned ints where possible (less overhead),
also quiet compiler warning for BLI_LINKSTACK_FREE macro.
2013-08-30 21:32:57 +00:00
86f8470a5d Some knife fixes. Avoids duplicating verts; better handling of cut-through ortho.
Now cut lines detect vertices that they pass (almost) exactly over
and snap to them, to avoid making verts vert close to other ones.

Added radius arg to BKE_bmbvh_ray_cast so that can detect an obscuring
face when the ray might otherwise go exactly between two triangles.
Needed an isect_line_tri_epsilon function for similar reason.

Fixes last part of bug #35002. Other knife bugs still present but
getting this commit in now before continuing bug fixing.
2013-08-30 16:34:44 +00:00
bd2f6c5907 default blend file name setting (untitled.blend) length check wasn't correct, move to generic function BLI_ensure_filename(). 2013-08-29 05:34:58 +00:00
260d6cd6b5 micro-optimization, avoid checking is_power_of_2_i once in power_of_2_max_i
also whitespace edit.
2013-08-28 23:49:22 +00:00
9e561a641e remove callback BLI_localErrorCallBack from scanfill, was here for years and only ever wrapped printf. 2013-08-28 02:14:24 +00:00
27df6a3b54 scanfill curves, ngons, masks had their own memarena code and would allocate a new one for every fill.
now use BLI_memarena and support passing the arena into the fill function, so the arena is re-used, when scanfill is called in a loop.
2013-08-28 02:07:54 +00:00
8bdb1f6155 Get rid of madness about fnmatch: BLI_fnmatch did not do the OS checks, they had to be done in every file using fnmatch (autoexec.c did not, wonder how it could work under unix???).
Thanks to Brecht for noting this!
2013-08-27 18:29:30 +00:00
8ef934c73f ghash/bli-listbase edits, rename BLI_ghash_pop -> BLI_ghash_popkey (since it takes a key as an arg and isnt popping any element from the hash as you might expect).
add BLI_pophead/tail, since getting the first element from a list and removing it is a common task.
2013-08-26 23:37:08 +00:00
1dba986505 internal changes to ghash/edgehash, reorganize to split out resizing the hash from insertion. 2013-08-26 13:41:13 +00:00
762e7da976 add some safety checks in debug mode to ensure sets/hashes aren't confused. 2013-08-26 09:37:15 +00:00
3b414b9859 minor changes to edgehassh/ghash
- no need to zero vars when freeing ghash
- de duplicate ghash remove code.
- edgehash clear now works more like ghash.
2013-08-25 21:02:31 +00:00
bbce51d116 replace hashes with sets where possible. 2013-08-25 20:03:45 +00:00
1d5eff36f5 BKI_gset and EdgeSet api, use when hash values aren't used (reuses ghash internally without allocating space for the value). 2013-08-25 20:00:19 +00:00
df01ad250e move doxy docs out of the ghash header into the C file. 2013-08-25 16:28:48 +00:00
e2bd3a4644 clearing the mempool can now keep more then a single element reserved. 2013-08-25 16:16:38 +00:00
28243b2e5f fix leak in BLI_ghash_clear(). was never freeing entries, add BLI_mempool_clear utility function. 2013-08-25 14:58:26 +00:00
e4d278668f code cleanup for mempool, refactor chunk initialization into a static function. 2013-08-25 14:50:40 +00:00
a476459c5e merge mempool allocs per chunk, include the data in the BLI_mempool_chunk alloc. 2013-08-25 13:15:22 +00:00