Campbell Barton
444833a8fb
remove some redundant lines of code.
2011-12-21 07:36:30 +00:00
Campbell Barton
71edaceab9
avoid a loop over all faces in copy_mesh
2011-12-21 05:35:19 +00:00
Campbell Barton
8a8cb2c3ef
minor formatting edits
2011-12-21 04:56:04 +00:00
Campbell Barton
57e6ac47a0
use TRUE/FALSE rather then 1/0, no functional changes.
2011-12-21 03:33:32 +00:00
Howard Trickey
d0b70cffaf
Partial fix for #29601 - fixes infinite loop in edgesplit; but edgesplit (angles) messes the geometry still
2011-12-14 14:53:22 +00:00
Campbell Barton
e4b712608e
when calculating the size to bevel when the factor is measured against the face, use the shorter edge rather then the middle.
...
this reduces overlapping geometry.
2011-12-14 00:43:42 +00:00
Campbell Barton
6254cc1c70
2 new bevel options for the operator and the modifier.
...
* even offset, uses same shell distance method as solidify to give even with beveled faces.
* distance offset, this is mostly for compatibility with the modifier in trunk which uses the bevel width as a distance rather then a percentage. at the moment this is awkward for the operator since it makes percent act differently where the 0-1 range doesnt make sense.
still need to bring back more options from trunks bevel modifier.
2011-12-13 09:57:19 +00:00
Campbell Barton
143a654e6f
formatting and minor refactor of some bmesh functions.
...
* BM_Make_Quadtriangle --> BM_Make_Face_QuadTri_v
* BM_Make_QuadTri --> BM_Make_Face_QuadTri
2011-12-13 06:56:10 +00:00
Campbell Barton
8c521496dd
save 4 bytes per BMLoop, added some comments on index use.
2011-12-13 05:20:02 +00:00
Campbell Barton
30d129593b
non functional changes & de-duplicate yet another face center function
2011-12-12 23:58:05 +00:00
Campbell Barton
8d0dc29aba
remove BLI_blenlib since its not needed in quite a few bmesh files
2011-12-12 22:34:05 +00:00
Campbell Barton
3aebfe7a7f
formatting and variable rename edits only.
2011-12-12 22:25:28 +00:00
Campbell Barton
80da50270d
slight improvement to bevel, when using the edges to take the new vertex location into account, dont let the longer edge skew the new position.
...
also include an new & improved vertex placement method but left commented for now.
2011-12-12 09:28:46 +00:00
Campbell Barton
3d64d5afb6
minor bevel improvement
...
- concave vertices in a polygon were not correctly checked for.
- remove commented method of calculating bevel vertex positions, have a similar/better method coming.
2011-12-12 09:09:01 +00:00
Campbell Barton
c5e6b44748
split BM_Collapse_Vert into 2 functions
...
* BM_Collapse_Vert_Faces
* BM_Collapse_Vert_Edges
since these are both quite different operations and callers where checking for one case or another anyway.
2011-12-07 21:54:14 +00:00
Campbell Barton
26db98293f
Quiet annoying warning:
...
Warning! Tesselation uvs or vcol data got out of sync, "had to reset!
This would happen on every editmode edit with UV's and wasn't too reassuring that blender was handling uvs/vcols correctly.
From looking into the problem I found that creating the undo mesh would act as if it was tessellating the existing mesh each time and complain that the data was out of sync, when infact the mesh was just created and being filled in.
Also, allocating uv and vcol customdata arrats for tessfaces isn't needed for undo mesh, so save some memory and dont allocate these in the first place.
2011-12-06 09:28:25 +00:00
Campbell Barton
e4ced610ee
fix for crash calling rotate edge on a completely selected torus.
2011-12-06 03:31:28 +00:00
Campbell Barton
5431081472
yet another fix for [ #28645 ] TODO: dissolve edges doesn't delete lonely vertices on edges
...
this one finally does what Vilem Novak was asking for, however the other changes were still improvements.
2011-12-06 02:24:30 +00:00
Campbell Barton
e72534e398
fix for crash toggling editmode with vertex parenting, add check if the vertex map can even be created to save looping over all mesh data to do nothing, which is what was happening previously when it (wasnt crashing) in some cases.
2011-12-06 01:49:35 +00:00
Joseph Eagar
a115c02605
bmesh: fixed crash in bevel
2011-12-04 00:44:09 +00:00
Campbell Barton
34c5698d2e
some formatting edits & #if 0 files which are not used.
2011-12-02 22:35:05 +00:00
Campbell Barton
78b60d3cbf
fix [ #28645 ] TODO: dissolve edges doesn't delete lonely vertices on edges
...
support for dissolving boundry & loose edges, previously this would only join adjacent faces,
now it collapses edge vertices when the edge has no face users.
2011-12-01 02:20:24 +00:00
Campbell Barton
f06bbaed92
split BMFlags_To_MEFlags & MEFlags_To_BMFlags into type specific calls, since we always know the types with these functions theres not much point in having generic calls with a type switch.
2011-12-01 01:41:56 +00:00
Campbell Barton
f2551ff799
- add BM_NGON_STACK_SIZE define to use wherever ngon stack arrays are used.
...
- renamed BM_Compute_Face_Center() to BM_Compute_Face_CenterBounds() and added BM_Compute_Face_CenterMean() since there was code inline to find the mean center in transform.
2011-11-29 04:11:17 +00:00
Campbell Barton
ed29b35a3f
gpl header cleanup, some files didnt have a gpl header.
...
also added inline iterator file (not yet used)
2011-11-28 19:49:05 +00:00
Campbell Barton
173b956ea2
fix for missing NULL check in remove doubles.
2011-11-28 15:31:34 +00:00
Campbell Barton
f8d5a01562
more work on getting bmesh dirty index flags reliable.
...
now there very close, some hard to redo cases to check on.
2011-11-28 06:49:16 +00:00
Campbell Barton
8d6b280cac
minor changes
...
- comment BM_SetIndex as setting dirty.
- have alloc_flag_layer validate the index data and clear the dirty flag since it loops on the data anyway.
2011-11-28 05:56:00 +00:00
Campbell Barton
8aeaa442bc
use lower angle when checking to draw an edge, adding uv sphere looked strange
2011-11-28 03:07:12 +00:00
Campbell Barton
f246672811
when comparing lengths no need to sqrt
2011-11-28 01:20:53 +00:00
Campbell Barton
ac4b9ffcf3
2 of the 3 places that check 2 edges share a vertex were incorrect (silly mistake)
...
so make into a function: BM_Edge_Share_Vert()
2011-11-28 00:27:26 +00:00
Campbell Barton
8d9d3995c0
fix [ #29079 ] New face added with "F" has wrong winding
...
now newly created faces use the best winding order based on surrounding edges.
2011-11-25 01:18:48 +00:00
Campbell Barton
4801ecae71
replace unhelpfully named eck! and eek! error prints, also some minor changes to math library use.
2011-11-24 23:09:55 +00:00
Andrew Wiggin
45a3acc398
Adjust BMO_Get/SetIndex syntax so that it can take element pointers directly
2011-11-24 11:20:48 +00:00
Campbell Barton
4d53bd68ef
fix [ #28676 ] Tris to Quads: "Max Angle" is not interpreted correctly
...
the angle should be more meaningful now.
2011-11-24 06:59:29 +00:00
Campbell Barton
b6aa307368
move edge angle test from previous commit into a static function & set on the edge loop rather then of face edges.
2011-11-24 03:12:37 +00:00
Campbell Barton
5a0da92418
fix [ #29313 ] In object mode wire frame edges between two planar faces render
2011-11-24 02:52:38 +00:00
Campbell Barton
a89071333e
per type restrict masks for walkers
...
- vert/edge/loop/face each get their own restrict masks
- any invalid restrict masks (which are not supported by the walkers) raise an error.
2011-11-24 01:07:36 +00:00
Campbell Barton
052d892207
small changes to iterator, preparing for bigger changes.
...
- renamed flag to layer
- added define to make dummy layer args easier to tell apart from flags
2011-11-24 00:14:13 +00:00
Campbell Barton
5d26f5dabc
fix for build errors
2011-11-22 22:02:46 +00:00
Andrew Wiggin
08f466cce8
Fix broken edge rip
...
The recent element index work broke edge split entirely, because edge rip was trying to use BM_Get/SetIndex across calls to other BMesh operators (which is bad practice). I've converted it instead to use the indices in the BMO layer, which belongs ot the edge split operator and won't be overwritten by BMO operators called in the process of doing the edge split.
2011-11-22 19:57:37 +00:00
Andrew Wiggin
9089d72f06
Various typo cleanups, remove unnecessary code etc, found during recent work and separated to a cleanup change
2011-11-20 16:21:13 +00:00
Campbell Barton
42c0250b28
fix [ #28676 ] Tris to Quads: "Max Angle" is not interpreted correctly
2011-11-18 09:41:39 +00:00
Campbell Barton
3ed866d2fc
svn merge -r41926:41932 ^/trunk/blender
2011-11-16 19:57:20 +00:00
Campbell Barton
9d05ccf9e8
svn merge -r41899:41926 ^/trunk/blender. also sync mempool with trunk and move BLI_mempool_alloc out of mempools header where it was inlined
2011-11-16 19:06:38 +00:00
Campbell Barton
707fcc42a3
replace macros with math functions
2011-11-16 17:37:20 +00:00
Campbell Barton
9087cb91d4
quiet compiler warnings for BLI_array defines, split BLI_array_append into BLI_array_append / BLI_array_append_r, the latter returning the new array location.
2011-11-16 17:09:41 +00:00
Campbell Barton
0c017bf146
tag index arrays as dirty when any element is removed, also check validity on operator init/exit (check was missed in some cases before)
2011-11-16 14:36:23 +00:00
Campbell Barton
da849bbfc0
prepare for flagging the bmesh has having invalid index values, so we can skip looping over all elements if its already valid.
...
- went over every BM_SetIndex call and added comments about its use, if its setting dirty values or correct ones.
- replace loops over all elements _just_ to set index values, with a new function, BM_ElemIndex_Ensure(...), this will eventually only initialize values when they are dirty.
2011-11-16 12:38:40 +00:00
Andrew Wiggin
2266c7fc1c
Add CD_POLYINDEX layer to reduce need for retesselations
2011-11-13 15:13:59 +00:00