Campbell Barton
87919be4f6
fix for own bad mistake using alloca in a loop, also knife project wasnt selecting correctly.
2013-03-15 13:18:35 +00:00
Campbell Barton
25e579c631
fix for minor glitch in recent addition to create faces from partial selections.
...
BM_edge_exists() would return an edge if both verts passed match, now assert instead.
2013-03-13 14:54:47 +00:00
Campbell Barton
0488af00fe
fix for crash with laplacian smooth when unselected ngons were used, volume calculation assumed unselected face were not ngons.
...
- added convenience function BM_face_calc_tessellation() to get triangles from an ngon.
- expose volume function as BM_mesh_calc_volume().
2013-03-13 06:32:08 +00:00
Campbell Barton
660be3da39
use gcc warning -Wredundant-decls, exposes some odd/duplicate declarations which have been removed.
2013-03-11 20:27:38 +00:00
Campbell Barton
f9f7070336
add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh.
2013-03-10 06:18:03 +00:00
Campbell Barton
347e2b6cb0
code cleanup: make bmesh var names more consistent
2013-03-09 17:12:24 +00:00
Campbell Barton
6a59f71d04
bmesh: face creation from a single selected vertex/edge, now extends the selection along wire/boundary edges and makes a face.
...
Selection is specifically so you can continuously fill in holes by tapping the Fkey.
Similar functionality to the F2 addon, however the mouse location isn't used.
2013-03-09 14:14:20 +00:00
Campbell Barton
ddddb7bab1
code cleanup: favor braces when blocks have mixed brace use.
2013-03-09 03:46:30 +00:00
Campbell Barton
b9554c86dc
fix null pointer dereference in BM_edge_is_contiguous() (own code).
2013-03-08 03:07:32 +00:00
Campbell Barton
0d5b028d43
patch [ #34103 ] use boolean in path functions and add comments.
...
path_util_1.patch from Lawrence D'Oliveiro (ldo)
2013-03-04 19:27:51 +00:00
Gaia Clary
d17a8639e4
Added typecasts to keep c++ from reporting errors
2013-03-02 12:16:23 +00:00
Campbell Barton
ac6e44887e
code cleanup: remove references to old bevel code (which has been removed for a while)
2013-02-21 17:13:25 +00:00
Sergey Sharybin
fdb25a1d27
Fix #34249 : collapse edges crash blender with a specific mesh
...
OpenMP block was using shared variable, which for sure leads to
threading issues.
2013-02-19 09:51:32 +00:00
Campbell Barton
098e4234b1
minor change to own recent commit with transform fcurve centers and some style edits and typo corrections.
2013-02-19 02:30:02 +00:00
Campbell Barton
2005f7c6c0
style cleanup: also some typos
2013-02-11 00:49:00 +00:00
Campbell Barton
555bcc3298
add beauty option for triangle fill since you might want to use the initial scanfill result.
2013-02-09 15:49:20 +00:00
Campbell Barton
d03befd0db
fix for is_quad_convex_v3(), getting the dominant axis wasn't accurate enough in some cases and would make beauty fill fail.
...
now rotate the coords before calculation.
2013-02-09 07:59:56 +00:00
Campbell Barton
c30fb009cc
problem with own changes to triabgulate: calling beauty fill directly would re-allocate the faces which mean't triangulates output slots pointers became invalid. (noticed when using from py api)
2013-02-06 15:57:12 +00:00
Campbell Barton
296444e1dc
style cleanup: some warnigs & spelling.
2013-02-06 14:02:19 +00:00
Campbell Barton
4528405597
add BM_edge_is_contiguous(), check for python api.
2013-02-04 10:14:31 +00:00
Campbell Barton
89bda7899d
style cleanup & some spelling
2013-02-03 10:28:28 +00:00
Campbell Barton
0510735f4e
fix BM_loop_calc_face_tangent for concave face corners, caused a bug in wire-frame operator.
2013-02-03 09:44:37 +00:00
Campbell Barton
4e94fca896
fix for error in own recent change, sculpt triangulate was done on a bmesh with uninitialized faces normals,
...
add warning that BM_mesh_bm_from_me() dosn't calculate face normals.
2013-02-03 08:13:15 +00:00
Campbell Barton
1f21efdeac
fix [ #34073 ] Combined EdgeLoop slides weirdly on even try
...
concave check on co-linear edges could fail, avoid by using the loop-direction + face normal.
2013-02-03 06:09:29 +00:00
Campbell Barton
f0d4b85fef
improve BMesh api use from r54265, no need to do edge lookups from the faces verts since the face stores these already.
...
also remove ScrArea.cursor, historic runtime variable.
2013-02-03 02:54:24 +00:00
Nicholas Bishop
ad2b4c6e54
Remove loose edges created during undo in dynamic-topology sculpt mode
...
Fixes [#34043 ] "Dyntopo: noise appear during sculpting (parasite edges)"
projects.blender.org/tracker/index.php?func=detail&aid=34043&group_id=9&atid=498
2013-02-02 16:54:18 +00:00
Campbell Barton
58ba7f7cf4
triangulate was checking existance of edges unnecessarily, splitting face already does this.
2013-02-02 06:06:34 +00:00
Campbell Barton
f02f491ed0
correction to r54188, also don't attempt to triangulate triangles.
2013-01-29 20:49:40 +00:00
Campbell Barton
2b875a947f
skip calculating the normal for each face when triangulating, all callers make sure its valid. also remove some commented code (more then one generation of bmesh old).
2013-01-29 15:05:23 +00:00
Campbell Barton
37489d71c7
Triangulate modifier no longer uses bmesh operator api call, instead add a BM_mesh_triangulate() function. Gives ~2x speedup in my tests on an optimized build.
2013-01-29 10:31:05 +00:00
Campbell Barton
69585591d6
Correct fix for r54164, the testcase I was using worked but different edge slide examples didn't.
...
Edge slide needed to check for concave ngons too.
add BM_loop_is_convex() and expose to python too.
2013-01-29 03:25:47 +00:00
Campbell Barton
c37bc8fa76
minor optimization - don't do double lookups on vertex mask layer for vert_mask_get(), vert_mask_set().
...
add an assert because if the mesh is in an invalid state the mask layer can exist but the mask pointer still be NULL (noticed this while looking into a different bug).
2013-01-28 04:10:47 +00:00
Campbell Barton
774ff1c246
style cleanup: also remove unneeded NULL check.
2013-01-28 01:59:59 +00:00
Campbell Barton
d760a86927
code cleanup: minor changes, replace len_v3 with len_squared_v3 for comparison.
2013-01-21 18:45:31 +00:00
Campbell Barton
78405a89c8
fix [ #33937 ] Planar decimate + triangulate operator leaves non-triangle faces
...
triangulate operation will now always triangulate, even on degenerate faces.
2013-01-21 17:25:08 +00:00
Campbell Barton
38cee985bb
code cleanup: style & warnings.
2013-01-21 02:30:40 +00:00
Campbell Barton
38825f891e
use openmp for building bmesh arrays, also replace calloc with malloc.
2013-01-19 02:21:53 +00:00
Campbell Barton
f251eb3f0c
minor dyntopo speedup: was doing 2x ghash lookups for BM_log_face_removed(), BM_log_vert_removed(), only one needed.
2013-01-19 00:53:33 +00:00
Campbell Barton
5ddc7d64a8
optimize bmesh operations that use triangle BMFace's (dyn-topo and mesh conversion).
2013-01-16 21:09:54 +00:00
Campbell Barton
8496a5a501
replace vertex slide with the transform operator. (MESH_OT_vert_slide -> TRANSFORM_OT_vert_slide)
2013-01-15 03:48:13 +00:00
Campbell Barton
ef0ed228ec
remove NULL checks for BM_iter_new() element iterators. replace checks with assert().
2013-01-14 19:46:30 +00:00
Campbell Barton
2b7db66edf
optimize BM_face_exists(), was doing a lot of redundant checks.
2013-01-14 18:37:58 +00:00
Campbell Barton
b27854bd47
use booleans for bmesh api.
2013-01-14 16:42:43 +00:00
Campbell Barton
fae67b6fb3
fix own bug, edge crease and bevel weights lost on undo.
2013-01-14 12:14:08 +00:00
Campbell Barton
9f2e845181
code cleanup: use BMW_begin insode for loops body.
2013-01-14 09:53:56 +00:00
Campbell Barton
7c64109bce
bmesh todo: uv stretch area draw mode wasn't calculating ngon area - added area_poly_v2().
2013-01-10 08:16:19 +00:00
Campbell Barton
ceb9701507
don't store bevel weights or edge crease customdata layers in editmode unless they are needed.
...
configurable in 'Geometry Data' panel, will be added when running crease edges transform for example.
2013-01-10 04:43:31 +00:00
Campbell Barton
e24443b79a
style cleanup
2013-01-09 03:30:15 +00:00
Campbell Barton
36f79eab20
fix [ #33784 ] Select Linked All + Seams fails to select seam bounded area
...
was incorrectly flushing vertex selection.
2013-01-08 17:30:06 +00:00
Campbell Barton
e62bc29a9b
fix [ #33792 ] Accessing a bmesh object created by from_object crashes blender
...
Issue was customdata wasnt being initialized for layers in the destination BMesh but not in the source data.
2013-01-08 14:25:17 +00:00