Commit Graph

49 Commits

Author SHA1 Message Date
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
3c11379e26 code cleanup: move bmesh inline funcs to headers (avoids compiling the C files). 2012-03-24 01:24:58 +00:00
6f104aad3a code cleanup: bmesh api - make arg order consistent - htype before hflag or oflag. 2012-03-19 08:36:27 +00:00
d1937de1d2 fix for own error in edge-rotate keeping edge customdata - this was crashing when rotating multiple edges.
Now create the rotate edge in advance and copy its customdata (before joining the faces).

This commit also fixes an annoyance where tryangulating faces could create duplicate edges.
2012-03-06 19:29:05 +00:00
522b73a635 bmesh api:
* name bmesh operator func's BMO_slot_buffer_* rather then BMO_slot_* since it wasnt obvious some only dealt with buffer, some both.
* more typechecks and asserts of BMO_ functions (I lost some time calling a map with a buffer function that failed silently).
* small speedup for extrude check - test if the edge is wire _before_ doign a hash lookup.
2012-03-01 17:38:04 +00:00
216f74880e style cleanup: bmesh - have continue on new line, also avoid unneeded loop in bmo_extrude_face_region_exec() in some cases. 2012-03-01 13:13:08 +00:00
b0a09bfab3 code cleanup:
use bmo_* prefix for operator defs, was confusing with bmesh_* api functions.
2012-02-28 09:48:00 +00:00
b366813e37 bugfix
* ntreeCompositExecTree accessed 'ntree' before NULL check.
* BM_face_triangulate accessed 'f' before NULL check.

also quiet warning in BKE_text_to_curve() and add a check for BMesh bridge loops so it knows quicker if it can copy loop data or not.
2012-02-25 09:06:17 +00:00
fbd6d4488e bmesh bridge - copy UVs and face data whem available. 2012-02-24 17:47:51 +00:00
afc56a0b10 copying bmesh dir on its own from bmesh branch 2012-02-19 18:31:04 +00:00