Campbell Barton
731672fc9b
bmesh utility functions for storing an editselection after another in the list.
2013-08-14 09:13:11 +00:00
Campbell Barton
723eaa36ce
fix own error in BM_mesh_calc_edge_groups() was clearning wrong dirty-index flag.
...
also remove unused transform defines.
2013-08-14 08:14:50 +00:00
Campbell Barton
5a9c012d86
fix for bug in rip tool, isolated verts would remain selected after ripping.
2013-08-13 01:52:36 +00:00
Campbell Barton
49411a6e37
fix own regression, rip tool wasn't handling selection.
2013-08-13 01:00:07 +00:00
Campbell Barton
fd14c344e0
switch arg order for BM_elem_select_copy(), would like to make this constant for all bmesh functions eventually.
2013-08-13 00:35:23 +00:00
Campbell Barton
726a7d6cd4
bmesh: simplify mode check for setting the edge selection
2013-08-13 00:17:39 +00:00
Campbell Barton
880a86230f
bmesh_vert_separate: remove unused return value
2013-08-12 23:49:56 +00:00
Campbell Barton
4a8d4f319f
bmesh_edge_separate: avoid counting radial loops when splitting edges, we only need to check if the edge is boundary or not. will speedup edgesplit modifier a little.
2013-08-12 22:36:46 +00:00
Brecht Van Lommel
83617429cf
Fix build warnings with clang and UNUSED_RESULT_ATTR (attribute declaration must precede definition).
2013-08-05 12:49:13 +00:00
Campbell Barton
93f5e2218a
code cleanup: replace strncpy -> BLI_strncpy, skip first 2 chars when making a hash from the object name.
2013-08-04 03:45:30 +00:00
Campbell Barton
5f72462e38
correct edgeloop tagging assigning an uninitialized value, also remove redundant NULL check in edgenet fill
2013-08-03 17:29:53 +00:00
Campbell Barton
a4b922ad9b
correct invalid sizeof() use in bmesh (harmless in practice)
2013-08-03 17:27:05 +00:00
Campbell Barton
4770848871
code cleanup: bmesh use 'const' for query functions.
2013-08-03 16:37:23 +00:00
Campbell Barton
31761f5e5b
code cleanup: replace bmesh_radial_face_find -> BM_edge_in_face
2013-08-03 15:30:57 +00:00
Campbell Barton
78820edafc
use bmesh for loop macros for looping over mesh verts/edges/faces
2013-08-01 18:33:35 +00:00
Campbell Barton
1300721d57
add asserts to ensure face normal is up to date.
2013-07-29 09:12:23 +00:00
Campbell Barton
cdc315a69b
bmesh optimization (noted as todo), avoid recalculating normal every time BM_face_legal_splits() runs,
...
assume normal is valid (assert when its not).
2013-07-29 06:04:09 +00:00
Campbell Barton
4f02555004
new mesh tool for cleaning up meshes, splits up non-planar faces while they exceed a given angle threshold
...
(access from the 'Mesh -> Clean' menu).
2013-07-28 19:53:46 +00:00
Campbell Barton
4982f200fa
move alloca define into its own header since its not related to BLI_array
2013-07-28 10:38:25 +00:00
Campbell Barton
72f2917032
bmesh: skip error checks when building in release mode (minor speedup),
...
also more strict use of BLI_array_declare(), only allow after array is declared.
2013-07-28 09:05:27 +00:00
Campbell Barton
d68917cb86
code cleanup: typos
2013-07-27 07:02:27 +00:00
Campbell Barton
5dc3cfc983
fix [ #36282 ] Spin error with non uniform scale
...
add support for passing object matrix to bmesh transform operators.
2013-07-26 11:15:22 +00:00
Campbell Barton
7c58ec9337
use math functions for copying matrix/vector types, also cast const pointers for freeing (clang error's out otherwise)
2013-07-26 10:43:23 +00:00
Campbell Barton
09a9aa5720
add twist option to bridge tool (for circular loops)
2013-07-25 19:27:18 +00:00
Campbell Barton
4bc32d5ded
mesh tool to fill in holes, added in mesh clean menu,
...
unlike other face creation tools it copies data from surrounding faces.
2013-07-25 18:43:05 +00:00
Campbell Barton
66d9c0def9
fix for face normal flipping calculation.
2013-07-25 18:16:55 +00:00
Campbell Barton
3270031660
correct problem with limited-dissolve not leaving the selection correctly (caused by BM_elem_attrs_copy no longer dealing with selection)
2013-07-25 06:05:44 +00:00
Campbell Barton
2d2f5f59d7
dyn-topo: maintain materials for new faces.
...
also minor optimization for BM_edge_in_face(), check edges radial loops rather then the faces edges
since normally there are 0-2 faces attached to an edge compared to 3+ edges in a face.
2013-07-24 19:58:16 +00:00
Campbell Barton
19496ab62a
internal bmesh api change: BM_elem_attrs_copy() no longer copies the selection flag.
...
this was slowing down modifiers since the selection flags would be copied and flushed to connected geometry.
2013-07-24 19:31:58 +00:00
Campbell Barton
cdac157f4c
code cleanup: use iterator macros, and replace BM_LOOPS_OF_FACE with direct loop access when converting a bmesh to a mesh.
2013-07-24 18:38:55 +00:00
Campbell Barton
90fdaa8219
optimization: lazy initialize EditDerivedBMesh members vertexNos, polyNos.
...
also add polyCos array which cache's face centers, gives overall ~20% speedup to drawing on a high-poly mesh in face-editmode.
2013-07-22 16:49:37 +00:00
Campbell Barton
57ce6d1470
old todo, rotate around individual origins now supports connected face/edge islands.
...
previously this gave very odd/annoying results, see bug reports [#36134 ], [#35419 ]
2013-07-22 14:50:38 +00:00
Campbell Barton
7398c49776
add support for BM_mesh_calc_face_groups to use vertex connectivity (not currently used yet)
2013-07-22 08:12:50 +00:00
Campbell Barton
7db1d6556d
code cleanup: add break statements in switch ()'s, (even at the last case).
2013-07-21 08:16:37 +00:00
Campbell Barton
b7826c42df
enable type limits warning when compiling with gcc.
2013-07-19 10:39:25 +00:00
Campbell Barton
c098557240
fix [ #36100 ] bevel lost selection
...
interpolating loop was copying face attributes including selection, checked all users of this function and its safe to remove the call (which is bad to begin with).
2013-07-11 14:21:50 +00:00
Campbell Barton
48c8d99cd9
add BM_elem_attrs_copy_ex() which can take a flag arg to define which flags should be copied. (mainly to be able to avoid copying selection/hidden state)
2013-07-11 12:43:34 +00:00
Campbell Barton
7fec23ae0a
fix for problem with edge slide where it would stop shapekey modifier from being applied (because of added vertices),
...
now, instead of making hidden copies of faces, the faces are copied into a temp bmesh.
also remove a hash that was being created and not used (old code).
2013-07-11 04:24:36 +00:00
Campbell Barton
b36999b2f7
bm_loop_interp_mdisps was doing multiple lookups in the same pointer in a nested loop. only need one, also avoid multiple layer lookups with mdisp calculation/smoothing
2013-07-11 01:28:27 +00:00
Campbell Barton
930dde34a3
BM_mesh_clear was setting toolflags incorrectly, also no meed to calloc when shrinking toolflags array.
2013-07-10 13:06:31 +00:00
Campbell Barton
14ab39c5e0
minor improvements
...
- calc normals only check flag when needed.
- keymap, dont get name unless its needed.
- keymap, avoid property lookup.
- idprop debug print, include pointer, helpful for troubleshooting.
2013-07-09 00:13:17 +00:00
Campbell Barton
27734f5bec
fix/improve normal calculation, noticed when checking on the previous bugfix.
...
- normals depended on the meshes rotation, so you could rotate Suzzane and in some cases one of the eye normals would be flipped.
- normals depended on the meshes placement in relation to the meshes center, now find the outer most face by each face-island center.
2013-07-08 13:30:11 +00:00
Campbell Barton
61bbefe40d
remove unused normal-recalc flags.
2013-07-08 08:56:46 +00:00
Campbell Barton
0d18f1829a
fix [ #35989 ] bridge tool flip mash
...
open edge loops were calculating flipping incorrectly.
2013-07-05 08:45:42 +00:00
Campbell Barton
02002c2394
fix [ #36014 ] Individual Origin Translation across Normal Orientation doesn't work properly.
...
makes boundary edges use predictable orientation.
2013-07-05 05:52:49 +00:00
Campbell Barton
73d32fdcc2
add type checking assert in bmesh operator iterator.
2013-07-01 07:12:05 +00:00
Campbell Barton
329b832dc2
BM_face_legal_splits - perform calculations in 2d (was using 3d vectors for all 2d operations)
2013-06-26 21:47:08 +00:00
Campbell Barton
56a47b6114
avoid calling axis_dominant_v3_to_m3 twice from BM_face_legal_splits
2013-06-26 21:17:10 +00:00
Campbell Barton
5fac3d9db5
remove bmesh arg from BM_face_legal_splits(), don't use a bmesh iterator.
2013-06-26 20:15:02 +00:00
Campbell Barton
c0c9f5386b
fix [ #35507 ] BMesh module: Crash on to_mesh() if faces.layers.tex is used but no loops.layers.uv
2013-06-26 04:17:41 +00:00