Commit Graph

50 Commits

Author SHA1 Message Date
542dfd94a5 Style Cleanup, use TRUE/FALSE defines. 2012-02-07 01:46:47 +00:00
3c39c9dcf2 add in gpl headers 2012-02-06 06:10:11 +00:00
5c3fdfac77 Code Style: more code style edits. 2012-02-06 06:03:46 +00:00
e80c80dc51 replace some hard coded limits with defines 2012-02-06 05:18:08 +00:00
288a5b4b17 Style Cleanup: bmesh code style was a bit mixed - follow http://wiki.blender.org/index.php/User:Nazg-gul/CodeStyle 2012-02-06 04:37:27 +00:00
18763fd9c8 Minor Improvements...
- more efficient array growing
- use BM_NGON_STACK_SIZE for more static arrays
- dont use BLI_array for bevel code where size is known.
2012-02-05 23:09:07 +00:00
11d5a2d2eb Code Cleanup: style change only 2012-02-05 15:55:28 +00:00
fb07ed7cfe fixed [#29907] Uncoherent behaviour of Delete Edge Loop 2012-01-18 12:31:41 +00:00
72169b79a7 fix own error [#28645] TODO: dissolve edges doesn't delete lonely vertices on edges
made this mistake when refactoring edge collapse code, though overall I think the function works better then before now.
2012-01-17 03:40:37 +00:00
8a8cb2c3ef minor formatting edits 2011-12-21 04:56:04 +00:00
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
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
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
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
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
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
b0a21add8a replace bmesh specific macros with math functions, also some pedantic formatting edits. 2011-11-07 09:02:10 +00:00
f7243ece07 remove redundant casts 2011-09-12 15:10:59 +00:00
73e2b88f62 skip assigning vars for inline bmesh flag funcs, just cast. 2011-05-13 10:59:30 +00:00
93fa307712 =bmesh=
Multires interpolation.  It's quite usable yet; I wanted to avoid
subsurfing the multires data and ray tracing original/new
topology.  The result is kindof like trunk's interpolation.

I'll see how much better I can get it.  I might have to go with 
the full-on ray tracing solution.  Right now, it's not very good.

Also made it so trunk files with multires open correctly.
2011-03-27 02:56:41 +00:00
8fb3ab5ab2 clear more warnings. 2011-03-20 16:30:39 +00:00
60aa74f9ee bmesh, less warnings 2011-03-20 14:49:16 +00:00
37f2c8a64c committing working copy 2010-07-22 22:17:20 +00:00
5d1c1c6421 [note: do not test quite yet]
Phase 1 of restructuring done.  There are now two
distinct subclass systems within the bmesh API;
one is compile-time, and forms the backend of what will
eventually be a "lite" bmesh API for modifiers (the
ones that use bmesh are simply too slow right now). 
The other is dynamic, and will be used to implement
multires reprojection.

The idea was to solve as many serious problems with
memory, speed, etc, at once as possible and set up others 
to be solved more easily later.

I've also added holes into the data structure, but not
the api; I don't plan to finish implementing that until
after bmesh gets into trunk.  I simply wanted to lessen
how much code I'll have to rewrite, since I was doing a
fairly major restructuring anyway.

In addition, I've added iteration support to mempool, to
avoid having to store linked list pointers (though this
has caveats).

Next step: merge in trunk changes. . .oh, what fun :P
2010-07-15 00:55:31 +00:00
a37bcf93ef wip commit; DO NOT USE. almost done with phase 1 of this restructuring, basically just some things that needed to be done before trunk (and some things that needed to be started, but can be finished much later). 2010-07-14 22:06:10 +00:00
473f235a6e pre-merge commit; decided might as well get it over with. 2009-12-26 08:47:38 +00:00
0e165c55bb did math lib conversion, equivilent to merge with trunk/2.5 at r24464 2009-11-23 14:41:22 +00:00
cfa4f3222a ctrl-alt-leftclick for adding new geometry works, but blocks zoom. we have got to fix this in 2.5. also made dissolving a 2-valence vert leave an edge behind. and fixed a bug or two. 2009-11-06 12:59:58 +00:00
0c65f27c79 part 1 of cleaning up my little array macro library to be a formal API. also removed some extraneous selection calls from loopcut.c. 2009-09-17 23:05:33 +00:00
eb34e3ad7c Brought Extrude all the way back. The contextual menu works,
as does only edges and individual faces extrude (individual vert 
extrude already did).

Note that I need to port this, after we all figure out how to handle
operators with variable transform follow-ons.

I also implemented the merge->collapse function, which is currently
accessable under ctrl->v, Bmesh Test Operator.  I still need to
implement the other merge modes, and properly hook everything into
the merge menu tool, which I plan on doing soon (tomorrow hopefully).

The cool thing about the collapse tool, is not only does it handle (all)
UV layers, it handles vcols as well.  To do this, I had to add a few math
functions to the customdata API, which seem to be working well.
2009-08-11 07:49:35 +00:00
454eb8793d Array modifier is now implemented using bmesh
(though it's not completely feature-complete yet).
I ported over the remove doubles code from the
old bmesh branch for this, and split it into two
bmops, "Weld Verts" and "Remove Doubles".

Weld verts welds specific verts together, while remove
doubles finds doubles and welds them.

I also reverted the hotkey change I made earlier.
2009-06-23 05:35:49 +00:00
9dfb7c4cf0 Turned delkey->Dissolve Verts into delkey->Dissolve,
and made it sensitive to the selection mode.  Also 
coded dissolve edges, since that was missing.
Removed the old "Delete Edge Loop", since dissolve
edges pretty much replaces that :)
2009-06-18 04:39:33 +00:00
166c270f06 NOTE: do not test. work-in-progress commit with editmesh ripped out and replaced with bmesh. this is not usable by any means. for those who read through this, note the design is still fairly messy in places, and fyi BMTessMesh is the replacement for EditMesh, I need to rename it to BMEditMesh. 2009-05-16 16:18:08 +00:00
52fc6d7829 removed all those nasty enums from the operator api. yay! I'm
so happy.  so now operators and their slots are referred to by
string names.  so much easier to remember!
2009-03-22 23:16:43 +00:00
168847fe79 further code comments. used a somewhat minimilistic style for the function comments, so people won't hate me. 2009-03-14 02:52:16 +00:00
7b5f9c2dec Dissolve faces now uses a different method of finding the boundary,
that handles some non-manifold situations better without failing.  
Also made edge subdivide use a more specializzed internal version 
of BM_Connect_Verts, that should hopefully always split the correct face.

Dissolve verts also now has checks to not accidentally dissolve
unselected vertices.  It's not kindof a hybrid tool, using dissolve
faces where it can to dissolve verts for robustness, and using
BM_Dissolve_Verts where it cannot.

And removed some cruft from a few API functions.
2009-03-13 13:11:50 +00:00
a254db099d fixed some dissolveverts/faces bugs and added a few hackish fixes for some others, so they don't crash 2009-03-09 15:15:17 +00:00
5018318fe0 dissolve faces: errors-out on holes, preserves winding, and doesn't delete original face if no dissolving happened. the conversion from/to editmesh now counts selected elements properly. 2009-03-09 09:52:32 +00:00
ccfe5547e1 compiler fix part 1
[[Split portion of a mixed commit.]]
2009-03-08 16:50:11 +00:00
f23b4bc2a1 Got the walker API to work, for safely recursing the mesh.
Used it to implement the dissolve faces operation (previous
incarnation was just a debugging hack).  The code works by
creating one giant new face per region of faces.

The dissolve verts (xkey->collapse, heh need to rename it)
operator now invokes dissolve faces on the faces around verts.
This is less error-prone then a pure topological/euler based
solution.
2009-03-08 15:02:49 +00:00
3faf2b6db7 more tweaks to triangulator. also added a bmeshutils.c file in editors/mesh for ui-related bmesh functions. and made delete only faces use the bmesh del operator, so it can handle ngons. 2009-03-02 02:21:18 +00:00
d122aea865 coded little vert connect tool. connects selected verts within the same face. currently integrated with fkey, along with the simple face merge tool I made too. 2009-03-01 08:02:28 +00:00
8be2a86ce1 split dissolve_disk into dissolve_vert dissolve_disk as agreed. also made dissolve vert bmop use the error api, and put in some code to report it to the user in the xkey ui code. I'm not sure how this should work; I don't think we can have utility code in bmesh/ for reporting errors to the user, so it'll have to go in editors/mesh somewhere. 2009-03-01 06:23:22 +00:00
99919b1714 merge with trunk. also tried to fix tesselator code; new code should've worked, but there's still some problems, possibly not in the tesselator code entirely. also still have reverted tools/Blender.py since scons still isn't fixed, heh. 2009-02-28 12:49:18 +00:00
d71d78e40d another dissolve bugfix. commented out some code I put there for helping in debugging tracing, also added another case to conversion code. I think I got the pocket case Briggs has always talked about, e.g. a three-edged face where two edges share the same verts. So that at least shouldn't crash, though not really sure if simply ignoring such faces is a good idea. 2009-02-15 14:02:27 +00:00
0b3d60c39c Dissolve verts better cleans up two-edged faces, as much
as it can.

Some design notes:

* BM_Dissolve_Disk is now more like a
  BM_Dissolve_Vert function (e.g. there's logic
  to remove verts if there's not surrounding faces).
  I kindof like this idea better (if we decide to
  go this way we should call it BM_Dissolve_Vert)
  but will have to discuss it further with Briggs.
  It seems more intuitive to have a "destroy this
  vert" function then a "just destroy it in this
  specific situation" function.

* Joining two two-edged faces does not work, so
  dissolve vert cannot clean all of them up.  Until
  this is fixed, I've added checks in the conversion
  code so at least things don't crash.
2009-02-15 02:14:40 +00:00
6ad0c2078c dissolve verts (which can be executed with xkey btw) now cleans up any two-edged faces that may result. 2009-02-15 01:02:51 +00:00
c31be607e7 destruction of previous slot api. if it returns, it'll
be in the form of functions that return pointer
references to the slot data or something.
2009-01-22 13:59:30 +00:00
cb033a8c4e added operator slot iterators 2009-01-22 12:29:08 +00:00
e43fa0eb82 conversion code now uses triangulator for fgonafication of ngons. also implemented a collapse vert operator (execute it with jkey). note to Briggs: BM_Collapse_Disk wasn't quite finished. . .I got it to mostly work, but it still needs work (and the way I had it handle 2- and 3-valence verts may be wrong). Also it can make 2-edged faces in certain situations. Need to work through the code some more. 2009-01-21 10:11:01 +00:00