Commit Graph

59 Commits

Author SHA1 Message Date
f32079d4b9 BLI_stackdefines
Bounds check the stack while debugging, also add STACK_PEEK
2014-06-29 05:57:48 +10:00
c5ccbacdaa move STACK_* macros into BLI_stackdefines.h 2014-06-25 00:01:33 +10:00
a217db0d63 Fix T40297: Crash while ripping an edge when autosmooth is activated.
Turned out there was still quite a few cases were indices were set dirty,
but elem_index_dirty was not tagged accordingly (mostly for BM_LOOP,
but a few others as well). So probably this crash was not the only one
hidden here.

Hopefully all possible cases were catched this time!
2014-05-21 22:37:50 +02:00
b12bf2216f Correct last commit, check not to split along edges already used 2014-05-13 18:41:04 +10:00
dd8a9eee3b Fix T40162: Vert connect creates extra face cutting across concave NGon.
We need to support cutting degenerate ngons, see: T39418
This commit disallows cuts across faces where the same vertices can create better cuts on different faces.
2014-05-13 17:56:26 +10:00
46bd759964 Code cleanup: rename BM_face_legal_splits -> BM_face_splits_check_legal 2014-05-13 17:48:25 +10: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
5256a5d66c BMesh: let vert-connect make degenerate faces when only 2 verts selected 2014-03-27 12:52:34 +11:00
ca6d76a915 Code cleanup: double/float 2014-03-19 07:19:43 +11:00
3d031d1f3a BMesh: minor changes for BM_face_split use 2014-03-13 18:41:45 +11:00
04a902965e BMesh optimize face splitting by taking loops rather then verts
- add BM_vert_pair_share_face
- add BM_loop_is_adjacent
- remove BM_verts_connect
2013-12-24 11:13:58 +11:00
590f58d455 code cleanup: redundant includes and add minor comments. 2013-10-08 20:18:38 +00:00
d7cc2be2b7 add linklist stack macros, use where over allocating an array was previously done. 2013-08-17 05:33:55 +00:00
4982f200fa move alloca define into its own header since its not related to BLI_array 2013-07-28 10:38:25 +00:00
5fac3d9db5 remove bmesh arg from BM_face_legal_splits(), don't use a bmesh iterator. 2013-06-26 20:15:02 +00:00
e4bb913510 Extend existing editmesh connect tool so it can connect across multiple faces.
only use this when 2 vertices are selected, otherwise use the same behavior as before.

This works a little like a fast knife tool, but it only cuts straight lines and doesnt depend on the view-port.

Examples:
- http://www.graphicall.org/ftp/ideasman42/mesh_connect_pair.png
- http://www.graphicall.org/ftp/ideasman42/mesh_connect_pair_curve.png
2013-06-22 17:25:02 +00:00
1014dbaea1 bmesh: replace BLI_array reallocs with alloca, also don't check all faces for connecting verts. 2013-05-25 23:34:25 +00:00
55f929ab3d - add generic edge-loop utility functions for bmesh.
- rewrite bridge tool to use the new functions (using edge & vertex arrays was quite cumbersome).
2013-05-11 14:40:03 +00:00
3d95873cf6 fix [#35257] Brige > Merge sometimes flips result 2013-05-08 23:14:27 +00:00
b1f4e2b4db code comments: bmesh operator doxy header descriptions. 2013-03-30 08:54:50 +00:00
7ec47aa864 code cleanup: shadowing 2013-03-16 14:33:32 +00:00
347e2b6cb0 code cleanup: make bmesh var names more consistent 2013-03-09 17:12:24 +00:00
06b3d4f7bb code cleanup:
- use BM_ITER_* macros in more places.
- avoid sign int conversion when calling EDBM_backbuf_check()
2013-03-09 16:19:07 +00:00
2f53741cfe bridge tool could make bow-tie quads when given 2 isolated edges. 2013-01-30 03:12:19 +00:00
b27854bd47 use booleans for bmesh api. 2013-01-14 16:42:43 +00:00
17c2621fd1 bridge tool - simple optimization, break early if edge loop length comparisons are worse then existing best loop test. 2012-12-03 05:02:32 +00:00
a490f4f7c4 fix [#33391] Bridge two Edgeloops fails in simple case 2012-12-03 04:53:30 +00:00
90666d3436 code cleanup: bmesh operator comments, readying for doc-generation. 2012-11-27 06:53:26 +00:00
dbdc76c9d0 code cleanup: make bmesh operator names more consistant since python has access to these as input arguments and return values.
all output values currently have ".out" suffix, this may go in the future, but for now it makes it clear in C code what are inputs and outputs.
2012-11-20 05:50:19 +00:00
48639af5f8 use input and output slots for bmesh operators, needed for the python api to get return values. 2012-11-19 14:58:31 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
c9c76a9a68 add compiler hints that failing to create a bmesh face is unlikely. 2012-10-01 11:12:49 +00:00
dbeddcdbce style cleanup: also correct incorrect doxy heading 2012-09-26 20:26:31 +00:00
319831d7b8 code cleanup: use an enum for uiBut->pointype (more useful debug display of members),
and rename COL -> COLOR --- less confusing since the layout engine has row/col's.
2012-09-11 23:10:23 +00:00
36797a64a5 code cleanup: use *(*var)[2] for pairs in bmesh code rather then a 1d array stepping by 2. 2012-09-05 23:17:19 +00:00
3da7e0f3bf mesh bridge tool now leaves bridge faces selected. 2012-08-24 17:58:49 +00:00
d3a566457b fix for merged bridge crashing on closed loops (own bug in recent commit) 2012-08-24 16:55:25 +00:00
6e90903baf - add BM_data_interp_from_edges() function (matches BM_data_interp_from_verts).
- bridge-merged now merges edge customdata and flags for verts and edges.
2012-08-23 05:19:40 +00:00
c0c575751d bmesh tool: support for merged-bridge (like bridge, collapsing), with a
factor to blend between loops.
2012-08-23 04:55:59 +00:00
d3f1222d38 Fix #32262: mesh bridge between edge loops failed to find a good edge matching
in some cases, in particular when the the edge loops were not planar.

Now rather than finding the shortest distance between two vertices, one from
each edge loop and using that as a starting point, it now finds the smallest
sum of distances between all vertex pairs that would be connected.
2012-08-22 14:27:06 +00:00
69a7e0af02 rename bmesh ops since they are exposed in an api now. 2012-06-30 15:27:13 +00:00
032d83ecc4 style cleanup: defines with braces 2012-05-27 20:13:59 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
475ecbb0ce remove BM_ITER, BM_ITER_INDEX macros, use ELEM or MESH variants only (the maceros had unused args in both cases). 2012-04-19 13:47:58 +00:00
75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
4fc6ef1cf5 style cleanup: pep8 some C/style 2012-04-08 08:09:37 +00:00
58064bdfc4 code cleanup: add doxygen headers to bmesh operator files, also add own include so definitions dont get out of sync. 2012-04-06 09:21:19 +00:00
c7aed8b2af For BMesh functions that test flags, add enabled/disabled variants. 2012-03-30 17:30:49 +00:00
337be23cea Fix bug #30673, "Crash: Bridge a pair of edges."
Fix edge case for clamp_index() with any negative 'x' that is a
multiple of 'len', was returning 'len' which is invalid index.

Maybe the expression can be simplified back to a one-liner?
2012-03-25 18:19:40 +00:00