Commit Graph

827 Commits

Author SHA1 Message Date
Campbell Barton
8565b2042e Fix for BM_mesh_deselect_flush(), allowed faces with deselected edges 2014-02-21 08:16:49 +11:00
Campbell Barton
fcaf144a2a Mask: enable overlap detection by default, more compact buttons 2014-02-17 20:00:11 +11:00
Campbell Barton
cc7cfd6617 Mesh Tool: removes degenerate edges, faces and face ears. 2014-02-17 11:41:19 +11:00
Campbell Barton
191183b304 Fix for bmesh with openmp 2014-02-16 22:40:09 +11:00
Campbell Barton
96d5e05e48 Mesh Inset: following existing edges is now optional 2014-02-15 13:51:54 +11:00
Bastien Montagne
70905a6e02 Fix Editderivedmeshes vertices normals computation.
Those derived meshes (used in Edit mode) were using simple sum of neighbor poly normals to get vertex normals,
while everywhere else in Blender we use weighted sum of such poly normals.

Patch: D311

Reviewed and enhanced by Campbell, thanks!
2014-02-12 20:48:09 +01: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
37026b12ec Code cleanup: use bool for static methods 2014-02-05 22:36:15 +11:00
Campbell Barton
76543574bc Code cleanup: declarations for removed functions 2014-02-04 07:20:19 +11:00
Sergey Sharybin
d484eb8c25 Fix T38421: Vertex Parenting & Triangle Vertex Parenting causes segfaults.
Issue was caused by clearing dirty flags from element table in bmesh before
the data was fully ready.

This confused checks happening from threads and some threads did consider
element table is usable while other thread was still filling it in.
2014-02-03 19:13:25 +06:00
Campbell Barton
fed1b8b16d Code cleanup: suffix vars to make obvious they are squared 2014-02-03 02:46:45 +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
a0f25f2301 Fix own mistake with zealous check for face splitting
Was disallowing adjacent loops to be split which is correct for a single
split across a face, but not fore BM_face_split_n
2014-01-21 12:27:38 +11:00
Campbell Barton
621bf47e91 Docs: doxygen file descriptions for BLF, GPU and WM 2014-01-19 23:15:25 +11:00
Campbell Barton
7df8452d1a BMesh: add bmesh delete functions that dont depend on operator flags 2014-01-17 14:55:06 +11:00
Campbell Barton
52bccd1188 Code Cleanup: remove redundant bmesh functions & make static 2014-01-17 09:42:30 +11:00
Campbell Barton
2883a48b3c BMesh: minor speedup for deleting faces. also remove unused delete-all 2014-01-17 09:35:53 +11:00
Campbell Barton
e7a6efa2a7 Code Cleanup: move delete funcs out of bmesh_construct.c into own file 2014-01-17 09:21:30 +11:00
Campbell Barton
61ff3dfdda Code Cleanup: spelling 2014-01-13 15:31:57 +11:00
Campbell Barton
fc39e895e9 Style Cleanup: whitespace 2014-01-12 22:27:55 +11:00
Campbell Barton
62aa004c25 Style Cleanup: whitespace 2014-01-12 22:05:24 +11:00
Howard Trickey
49aa701645 Add profile control parameter to Bevel.
Parameter controls concavity / convexity.
    <.25 means: concave inward
    .25 means: straight slanted
    >.25 means: concave outward
    .5 means: circular (the default)
    1 means: straight along original sides
For now, there is a hard lower limit of .15
because more work is needed to get decent
results in the range below that.

The profile is actually a superellipse, and the
parameter is 1/4 of the exponent in the implicit equation
for a superellipse, except at the extreme values of 0 and 1.
2014-01-08 07:40:01 -05:00
Campbell Barton
c5cb42f402 Code Cleanup: use bool for bmesh operator boolean mapping functions 2014-01-03 21:35:29 +11:00
Campbell Barton
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
Campbell Barton
133bc4b991 BMesh API: optimize BM_edge_exists(). 2013-12-23 16:57:39 +11:00
Campbell Barton
63a2cc2ab7 BMesh API: make simple, low level functions inline 2013-12-23 16:03:07 +11:00
Campbell Barton
01acc2a7dc EditMesh: wireframe tool, add offset and vgroup support (not used yet) 2013-12-22 06:54:37 +11:00
Campbell Barton
d833aab887 correct error in recent commit 2013-12-15 03:59:51 +11:00
Brecht Van Lommel
f00728c19b Fix bmesh compiler warning with OS X / clang. 2013-12-14 15:24:53 +01:00
Campbell Barton
ab9fabdfc6 BMesh API: optionally pass fallback to BM_edge_calc_face_angle functions 2013-12-14 23:25:28 +11:00
Campbell Barton
fac8e84632 Fix for own error in recent tessellation update. 2013-12-06 01:32:18 +11:00
Campbell Barton
c33fb00c28 Fix for triangulate and beauty-fill
- could crash if triangulate attempted to create an existing face.

- tagging edges to rotate was unreliable, don't do this anymore.
  now check if edge is in the array passed to the beauty function.
2013-12-02 11:49:18 +11:00
Campbell Barton
e3ee0b1d38 Fix for beauty option for triangulate (modifier and tool) 2013-12-01 16:41:03 +11:00
Campbell Barton
5da703e915 BMesh/Mesh: replace scanfill with polyfill 2013-11-30 22:13:52 +11:00
Campbell Barton
3d6f3c0457 Fix for recent BMesh regression refactoring out face tessellation 2013-11-27 13:44:19 +11:00
Campbell Barton
45eed8246a BMesh Operators: BMO_op_finish now overwrites values in debug mode
This should prevent accidental use-after-free.
2013-11-27 13:42:24 +11:00
Campbell Barton
3b24eaad9a Fix T37583: regression in bmesh triangulate breaking python's use of face_map 2013-11-27 08:11:34 +11:00
Campbell Barton
0b01cc1316 Compile Fix: fix for gcc4.8 with bmesh header. 2013-11-18 23:54:07 +11:00
Walid Shouman
238d2f962d BMesh Refactor: BKE_bmbvh_new can now be created without an EditMesh.
This adds BM_bmesh_calc_tessellation() so we can get triangles from a
bmesh without having to have an editmesh available.
2013-11-18 18:25:47 +11:00
Howard Trickey
bfb9cefccb Added options for how bevel amount is measured.
Now there is an 'Offset Type' dropdown on tool
shelf with types:
Offset - current method, offset of new edge
  from old along sliding face
Width - width of new bevel face (if segments=1)
Depth - amount a chamfering plane moves down
  from original edge
Percent - percent of way sliding edges move
  along their adjacent edges

The different options mainly are useful when
beveling more than one edge at once.

Leaving as a TODO to put these in the modifier,
as doing that has more permanent effects so
want to let users shake out problems with this
first.
2013-11-10 12:31:57 +00:00
Dalai Felinto
a7b44c82e5 Triangulate Modifier: using different ngon and quad methods
Quads: Beauty, Fixed, Fixed Alternate, Shortest Diagonal
Ngons: Beauty, Scanfill

* Shortest Diagonal is the default method in the modifier (popular
  elsewhere), but beauty is the default in Ctrl+T).

* Remove the need for output slot and beauty operator to be called
after Clt+T

Patch with collaborations and reviewed by Campbell Barton
2013-10-29 02:42:51 +00:00
Daniel Genrich
421346cefe Fix compile error using Visual Studio 2012. 2013-10-28 19:43:53 +00:00
Campbell Barton
3264461598 move bmesh array lookup data and utility functions from editmesh into bmesh,
since enough bmesh operations can also take advantage of direct index lookups on verts/edges/faces.

developers note:
- EDBM_index_arrays_init/ensure/free -> BM_mesh_elem_table_ensure/init/free
- EDBM_vert/edge/face_at_index -> BM_vert/edge/face_at_index
- EDBM_uv_element_map_create/free -> BM_uv_element_map_create/free
- ED_uv_element_get -> BM_uv_element_get
2013-10-28 02:05:33 +00:00
Campbell Barton
dee671276d rename BM_vert_at_index -> BM_vert_at_index_find (since this searches the mempool).
needed for other changes - coming.
2013-10-27 10:01:35 +00:00
Campbell Barton
3c1dce0d9b fix for BM_faces_join_pair() making the assumption that only the 2 faces use an edge, face winding could be flipped incorrectly.
also remove search for shared edges - all callers pass the edge in.
2013-10-26 05:05:37 +00:00
Campbell Barton
7c8c49a34a style cleanup 2013-10-21 23:35:08 +00:00
Bastien Montagne
55201ce48b Fix [#37160] Rotate edge direction changed between 2.64 and 2.65 (low priority)
Easy to fix, but do not really understand *why* this is needed...
2013-10-21 11:13:39 +00:00
Dalai Felinto
8f22c120f5 fix [#37145] "Triangulate Face" crash in specific scene
it was asserting if the last edge faces were already all set
2013-10-19 21:20:50 +00:00
Campbell Barton
234626f9e1 correct BM_edge_face_pair() being called inside BLI_assert() - this needed to run every time.
also other minor changes.
2013-10-16 22:07:16 +00:00
Dalai Felinto
bd2d7bedbd Triangulate modifier - beauty option is back
Patch reviewed and with collaborations from Campbell Barton
2013-10-16 17:58:00 +00:00