Commit Graph

3120 Commits

Author SHA1 Message Date
Campbell Barton c9233bfd82 Code cleanup: style 2014-02-19 08:02:59 +11:00
Campbell Barton 4c512fb642 Compile Attrs: add ATTR_RETURNS_NONNULL 2014-02-17 23:32:00 +11:00
Campbell Barton 05235d86ef Fix for issue in mask overlap with no splines in the mask. 2014-02-17 18:55:03 +11:00
Campbell Barton 4134bdc75c Fix for rare crash in recent mask option to check overlaps 2014-02-17 15:15:49 +11:00
Campbell Barton 78bd029bbe MSVC: add errors for BLI_strict_flags.h 2014-02-16 14:50:15 +11:00
Thomas Dinges aa517ab3a4 Compile fix for 004decc1d940... 2014-02-15 14:38:49 +01:00
Campbell Barton 004decc1d9 Code cleanup: warnings 2014-02-15 18:21:07 +11:00
Campbell Barton 80e21f6fc5 Code clearnup: warnings 2014-02-14 22:03:09 +11:00
Campbell Barton dd1e02432e workaround for building with mingw32 2014-02-14 15:15:20 +11:00
Sergey Sharybin 83617d24d5 Rework carve integration into boolean modifier
Goal of this commit is to support NGons for boolean modifier
(currently mesh is being tessellated before performing boolean
operation) and also solve the limitation of loosing edge custom
data layers after boolean operation is performed.

Main idea is to make it so boolean modifier uses Carve library
directly via it's C-API, avoiding BSP intermediate level which
was doubling amount of memory needed for the operation and which
also used quite reasonable amount of overhead time.

Perhaps memory usage and CPU usage are the same after all the
features are implemented but we've got support now:

- ORIGINDEX for all the geometry
- Interpolation of edge custom data (seams, crease)
- NGons support

Triangulation rule is changed now as well, so now non-flat
polygons are not being merged back after Carve work. This is
so because it's not so trivial to support for NGons and
having different behavior for quads and NGons is even more
creepy.

Reviewers: lukastoenne, campbellbarton

Differential Revision: https://developer.blender.org/D274
2014-02-13 17:16:53 +06:00
Campbell Barton ae8327dbf3 Mask: add option to detect self intersections 2014-02-13 19:12:28 +11:00
Campbell Barton c85e66e7fe Scanfill: add user-flags for edges and verts, useful elsewhere. 2014-02-13 16:46:51 +11:00
Campbell Barton fcb06097a5 Scanfill: name flags better and comment unused SF_EDGE_BOUNDARY flag. 2014-02-13 14:13:42 +11:00
Campbell Barton 3fe036ad5f ListBase: add attributes to api functions 2014-02-13 13:21:16 +11:00
Campbell Barton f27acb5b56 ListBase: add BLI_sortlist_r api function, remove check for NULL callback 2014-02-13 13:21:16 +11:00
Campbell Barton 108ad34429 Mask: option not to treat overlapping curves as holes 2014-02-13 11:48:46 +11:00
Campbell Barton e2089e1406 NDOF: fix for negative colors and flickering hue when picking with HSVCUBE 2014-02-12 21:05:24 +11:00
Campbell Barton 2f01be2b2f UI: panel tabs, use simple color interpolation that ignores alpha 2014-02-10 17:06:56 +11:00
jens verwiebe a84bcea070 OSX/scons: allow for compiling with clang-openmp-3.4
See: http://clang-omp.github.io
+ fix a longstanding bad include in darwin-config
2014-02-09 18:03:13 +01:00
Campbell Barton f54e3589a4 some systems didnt define NULL 2014-02-08 08:09:49 +11:00
Campbell Barton b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
Campbell Barton 6110a5bdef Scanfill: use poly_nr as an index rather then index + 1 2014-02-06 02:12:46 +11:00
Campbell Barton 6213d88c85 Scanfill: avoid converting int<>intptr_t for displist indices 2014-02-06 01:07:18 +11:00
Campbell Barton 41d23116aa Scanfill: malloc arrays and zero init members 2014-02-06 01:03:02 +11:00
Campbell Barton d598dcd461 Code cleanup: remove scdata from ScanFillContext 2014-02-05 05:39:28 +11:00
Campbell Barton 6c17d2141b Scanfill: optimize filling curves, text, masks - skip calculating holes
Support for tagging polygon numbers when adding scanfill data,
saves having to calculate connectivity afterwards (which can take approx half overall scanfill time for complex curves).
2014-02-05 05:27:01 +11:00
Campbell Barton db74968402 Scanfill: minor optimization, comment unused code, avoid vert loop 2014-02-05 05:27:01 +11:00
Andrea Weikert eaafa58c2b Code cleanup: removed unnecessary #defines causing re-definition warnings
Fixing warnings in own recent commit
2014-02-03 21:27:11 +01:00
Campbell Barton 76543574bc Code cleanup: declarations for removed functions 2014-02-04 07:20:19 +11:00
Campbell Barton 8b1731e13d Scanfill: skip checks for loose edges when they can't occur
Only editmesh needs this, text, curves, masks - can all skip this check
2014-02-04 02:57:27 +11:00
Campbell Barton 0d7586739a Code cleanup: replace while -> for loops 2014-02-04 02:23:34 +11:00
Campbell Barton 15f449c529 Add include for FreeBSD and clang 2014-02-03 22:04:56 +11:00
Campbell Barton d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
Campbell Barton fed1b8b16d Code cleanup: suffix vars to make obvious they are squared 2014-02-03 02:46:45 +11:00
Andrea Weikert dda63375b2 Fix: Compile error due to missing #define for MSVC9 (VisualC++ 2008)
Added some relevant #defines copied from extern\libmv\third_party\msinttypes to BLI_sys_types.h so they can be used in blenlib. Made smallhash.c use the BLI_sys_types.h include rather than including <stdint.h> directly
2014-02-02 14:40:52 +01:00
Campbell Barton 41cc86a666 Add include needed for clang, quiet warning 2014-02-02 21:33:52 +11:00
Campbell Barton c4345a808c Smallhash: add reserve option to avoid resizing when size is known 2014-02-02 17:08:26 +11:00
Campbell Barton dcd90d67c8 Smallhash: fixes/improvements
- use magic numbers based on uintptr max, not uint max, to avoid possible collisions with real pointer values on 64bit systems.
- comment BLI_smallhash_remove for now, its not used.
- added smallhash_val_is_used replacing ELEM() checks
- updated docs
2014-02-02 16:24:33 +11:00
Campbell Barton 7c9b106589 Smallhash: optimizations
- remove static array used only for copying (use alloca on resize)
- set SMSTACKSIZE to one of the values in 'hashsizes' since the full available size was never used.
- ensure ~1.5x as many buckets as entries, was 3x which caused malloc's quite early on.
2014-02-02 02:24:48 +11:00
Campbell Barton a1a0ebbf49 Code cleanup: use length squared where possible 2014-02-02 02:24:48 +11:00
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 5fce3457b7 Math lib: add axis_angle_normalized_to_quat, use when length is known 2014-02-02 02:24:47 +11:00
Campbell Barton 34a0532584 Code cleanup: comments and warnings 2014-02-01 02:01:00 +11:00
Campbell Barton 0e1c1b6196 Code cleanup: remove BLI_has_parent 2014-01-31 03:30:05 +11:00
Campbell Barton 3c86a1932f Code cleanup: add BLI_testextensie_n, replacing multuple calls to BLI_testextensie
also use attributes for BLI path functions
2014-01-31 03:30:05 +11:00
Campbell Barton 1f64371ec0 Smallhash: refactor and fixes
- BLI_smallhash_remove didnt decrement total entries.
- rename vars to match closer to ghash.
- smallhash_lookup returns NULL when no entry found.
- using a zero value key wasn't supported.
- no need to memset or calloc bucket arrays
- add asserts for unsupported conditions.
- added BLI_smallhash_lookup_p
2014-01-30 21:10:55 +11:00
Campbell Barton 39eb314cb9 UI: Refactor timecode functions into BLI_timecode
- deduplicate timecode_simple_string from image.c
- replace V2D_UNIT_SECONDSSEQ with V2D_UNIT_SECONDS
- avoid possible buffer overflow bugs (sprintf -> BLI_snprintf)
- remove option not to use timecode and split into 2 functions

Patch D227 by Andrew Buttery with own refactoring.
2014-01-29 20:44:01 +11:00
Campbell Barton c2da706a36 Code cleanup: remove references to svn and code style 2014-01-28 23:01:22 +11:00
Bastien Montagne d292d6ad74 Cleanup of BLI_smallhash
Factorized a bit the code here, think it's more readable now... No performance enhancement though.

Reviewed by: campbellbarton

Differential Revision: https://developer.blender.org/D259
2014-01-26 15:18:02 +01:00
Campbell Barton 4ae7ae6f2e Code Cleanup: use bool for return values and correct comments
also remove CDDM_Check, theres no need for it.
2014-01-22 02:53:48 +11:00