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
ea93a492e3
fix for [ #29365 ] Sharp Edges get lost after edit mode toggle
...
own failt when editing flag code.
2011-11-23 22:21:33 +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
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
e63399edda
BM_Compute_Normals was setting invalid edge index values when it didn't need to.
2011-11-16 13:23:29 +00:00
Campbell Barton
bda9a2dc8b
ensure dirty flags / index arrays are in a valid state before & after executing a BMO in debug mode.
2011-11-16 13:06:49 +00:00
Campbell Barton
496a078810
fix for error in last commit, also make BM_ElemIndex_Validate() check dirty flag and complain if its set when it didnt need to be (this function isnt called yet)
2011-11-16 12:56:33 +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
Campbell Barton
dfe90e54cd
set the index on newly added vert/edge/faces
...
added BM_ElemIndex_Ensure(...), not used yet.
2011-11-16 06:17:56 +00:00
Joseph Eagar
aea95c7860
bmesh: fixed merge issues with navmesh (though I've not tested if it works yet).
...
also fixed a small crasher in bridge.
2011-11-08 00:20:50 +00:00
Campbell Barton
b0a21add8a
replace bmesh specific macros with math functions, also some pedantic formatting edits.
2011-11-07 09:02:10 +00:00
Andrew Wiggin
a9dc6038e0
Fix MSVC build (warning-to-error for mismatch of "const" keyword between function decl and def)
2011-11-03 13:49:04 +00:00
Campbell Barton
85e0609c54
use char for BMHeader type and flag (saves 2 bytes per edge/loop/vertex/face)
...
also found mouse_mesh_shortest_path was casting edit selecton to the wrong type.
2011-11-01 14:36:23 +00:00
Campbell Barton
63eb94e504
rename BM_FLIPPED --> BM_TMP_TAG to use as a temp tag anywhere.
2011-11-01 09:48:20 +00:00
Campbell Barton
b03e78e1af
minor cleanup edits
2011-11-01 03:02:33 +00:00
Andrew Wiggin
12ace958f5
Miscellaneous warning fixes (mostly unused local vars) and trivial cleanups
2011-10-31 00:44:12 +00:00
Campbell Barton
a7bf015f38
style edits
...
- rename var to match trunk shape key code
- reduce scope of some vars
- comment some unused vars
2011-10-29 11:23:37 +00:00
Andrew Wiggin
cfb435e8a5
Fix 28960: if BM_free_data_layer[_n] removed the last layer, we didn't clear data->pool and instead kept it pointing to the pool that gets freed at the end of update_data_blocks
2011-10-26 13:24:58 +00:00
Andrew Wiggin
ca0a8566b9
Disable converting multires to absolute space during bmesh edits, as this was causing bmesh edits that used absolute space to have no effect on the higher levels of the multires mesh.
2011-10-26 12:27:29 +00:00
Campbell Barton
834caf38dd
- smooth tool now works for mirror.
...
- mirror was selecting verts from 0.4 distance which causes errors.
- utility function EDBM_ApplyMirrorCache(...)
2011-10-26 07:41:56 +00:00
Campbell Barton
61b699bf9b
remove $Id from headers
2011-10-24 23:32:24 +00:00
Andrew Wiggin
618d4d1a6e
Add some validation checking and fix a bug in bmesh_[cut|splice][edge|vert] (used by vertex ripping)
2011-10-23 22:21:55 +00:00
Campbell Barton
60713a1d61
- Knife tool would switch the knife line to 0,0,0 when not over any geometry, this felt glitchy and while drawing in free space isn't supported 0,0,0 can easily be free space too. So draw a line to the mouse cursor.
...
- knife tool was missing calls to BLI_array_free()
- add assert for bug [#28960 ] where dissolve can cause invalid bmesh.
2011-10-18 08:39:26 +00:00
Campbell Barton
638a93b235
svn merge ^/trunk/blender -r41075:41099
2011-10-18 01:09:00 +00:00
Campbell Barton
19b3f13a84
quiet some pedantic gcc warnigns
2011-10-17 03:06:20 +00:00
Andrew Wiggin
c4cb393e45
Fix vertex paint face selection
2011-10-14 09:05:20 +00:00
Andrew Wiggin
ce4e6600e6
Fix a memory leak in interpolation
2011-10-13 05:03:58 +00:00
Andrew Wiggin
cccb06d92b
Add nodoubles arg to BM_Make_Face
2011-10-13 04:58:34 +00:00
Andrew Wiggin
421fd9f286
Fix for not correctly removing doubles after adding builtin primitive meshes (e.g. uvsphere)
2011-10-12 14:16:05 +00:00
Andrew Wiggin
a4fadadd06
implementation of bmesh_urmv (unglue region make vert) and use of it to fix ripping corners joining just two faces, which wasn't working before
2011-10-12 06:11:21 +00:00
Andrew Wiggin
1dccb351e5
a few trivial bug fixes
2011-10-11 04:30:04 +00:00
Andrew Wiggin
69732dbe21
Miscellaneous cleanup, comment changes, and asserts. Should be no functional changes.
2011-10-10 14:56:09 +00:00
Andrew Wiggin
429a16ddb1
Some bevel fixes: fix a crash BM_Copy_Attributes when source==target, and fix a memory leak from not cleaning up em->emcopy after calling bevel bmop
2011-10-10 07:21:05 +00:00
Andrew Wiggin
8631207896
Fix leaks of MDisps custom data
2011-10-06 02:28:09 +00:00
Andrew Wiggin
8d7d3b2837
Fix for a lot (but not all) of the multires distortion when using bmesh editing tools
2011-10-05 15:02:00 +00:00
Andrew Wiggin
720f69aa9c
Fixes for a few bugs in selection and the interaction between BM_SELECT and BM_HIDDEN:
...
- Select all was selecting hidden elements
- Select flush was also selecting hidden elements (so selecting two *visible* vertices of a *hidden* edge selected that hidden edge)
- Several places were using BM_SetHFlag(elem, BM_SELECT) directly, when they should be using BM_Select(bm, elem)
- In certain scenarios, "reveal all" could leave you with selections which aren't valid in that selection mode (e.g. lonely edges selected in face select mode)
2011-09-30 04:27:12 +00:00
Campbell Barton
dbdb58f2a3
possible fix for msvc building
2011-09-27 11:55:28 +00:00
Andrew Wiggin
7f165ac4b0
Fix some typos & bugs from some of my previous patches and commits
2011-09-26 05:10:37 +00:00
Andrew Wiggin
8cc095696a
Bread-first bmesh walkers:
...
- walkers can be run in breadth-first order or depth-first order (previously there was only depth-first)
- walkers keep track of current depth (with this + breadth-first, select nth implementation is now trivial)
- new connected vertex walker (similar to shell walker, but returns vertices instead of edges)
- shell walker can be started from a vertex (in which case the walker starts by queueing all the edges incident on the vertex) or from an edge (walker starts by queueing the single edge)
- bug fix for walker reset (was emptying states, but not clearing the visithash)
- bug fix for select nth (indexing for deselection was walking through *all* connected elmeents, to match trunk it should only walk through *selected* connected elements)
2011-09-26 03:38:30 +00:00
Andrew Wiggin
e625ce0b16
Fix dissolve crashes.
...
For some cases, this will make dissolve work as expected. For other cases dissolve will fail gracefully (it will report unable to dissolve, but not crash). To get dissolve to work in these cases we need to define what happens when you dissolve a disk that has faces which share more than one edge.
2011-09-26 03:37:12 +00:00
Andrew Wiggin
f19cb3fc6b
undo of 40542 (meant to make two separate changes)
2011-09-26 00:32:45 +00:00
Andrew Wiggin
6cd42ebe18
Fix dissolve crashes.
...
For some cases, this will make dissolve work. For others dissolve will still fail (report unable to dissolve, not crash) in some cases. To get dissolve to work in these cases we need to define what happens when you dissolve a disk that has faces which share more than one edge.
2011-09-26 00:27:25 +00:00
Campbell Barton
1f12740a82
make error prints more helpful & correct some comments for rip code.
2011-09-24 12:13:13 +00:00
Andrew Wiggin
bf95e3c34e
Port jfke and jekv euler functions to new bmesh structures
2011-09-23 14:38:45 +00:00
Andrew Wiggin
74e21161e3
Solidify bmesh op and edit mode tool
2011-09-23 12:06:47 +00:00
Andrew Wiggin
10d6e1e16a
Normal math improvements and vector math cleanup
2011-09-22 12:31:01 +00:00