Commit Graph

41 Commits

Author SHA1 Message Date
8733f89539 Style Cleanup: edits for line length 2012-02-06 06:26:54 +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
b54182c93f minor header tidy up 2012-01-22 18:44:44 +00:00
30d129593b non functional changes & de-duplicate yet another face center function 2011-12-12 23:58:05 +00:00
45a3acc398 Adjust BMO_Get/SetIndex syntax so that it can take element pointers directly 2011-11-24 11:20:48 +00:00
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
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
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
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
421fd9f286 Fix for not correctly removing doubles after adding builtin primitive meshes (e.g. uvsphere) 2011-10-12 14:16:05 +00:00
5ba0c2c049 tag unused arguments, quiet some warnings 2011-05-09 14:32:55 +00:00
b93594bf30 quiet more compiler warnings, also found a bug using printf rather then fprintf. 2011-05-09 05:09:07 +00:00
0bba684d08 =bmesh= fixed a few bugs in the uv editor 2011-04-13 22:30:25 +00:00
6e6b4b5f77 =bmesh=
Multires interpolation now works on cases like 
simple cubes. (though it isn't perfect
when bevelling sharp corners).

Normal flipping is handled correctly, and
multires interpolation now works on 
normal-inconsistent meshes (so long as 
they are manifold, at least).
2011-03-30 22:46:56 +00:00
7d43a48993 =bmesh=
Multires interpolation is considerably better
now, though it still has a problem with occasionally
producing little random tangent spikes.  Still, it's
far better then it was.

Also fixed a bug in dissolve faces.
2011-03-29 05:48:18 +00:00
f01261d040 merge with/from trunk at r35190 2011-02-27 06:19:40 +00:00
421823e34e =BMesh: Super Knife Tool Alpha=
Implemented a new "super knife".  Activate with k.  Holding CTRL
will allow extended cutting ala old lines mode.  Confirm with enter 
and escape. You cannot cancel, btw, you can only confirm (and undo 
later if you want). Hopefully I'll support undo within the tool soon.

* Supports cutting edges, into faces, etc.  You can pretty much do whatever 
  you want.  Will snap to vertices too.
* Note that if you cut into a face, it must be valid topologically when 
  you press enter to confirm.
* It's pretty and graphical :)
* You can only cut visible geometry.
* UVs/vcols are a little buggy still

Now, thou shalt all cease and desist all lack of motivation for
testing!  No longer shall users put off testing until "it's cooler"!

:P
2010-09-25 01:54:58 +00:00
c11c196efa part 1 of merge from trunk at r30358; it compiles, but doesn't link quite yet :) 2010-07-19 04:44:37 +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
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
a54a9d5d4e fkey on two broken edge loops will create an ngon now, as will fkey on one broken edge loop 2009-09-12 08:41:39 +00:00
e0a014a45f finished removedoubles, and inlined a bunch of functions. 2009-09-09 06:28:58 +00:00
67c64cf82b more optimization stuff. transformed a few functions into macro that profiling showed were taking a bunch of time. also have some work-in-progress (if disabled) stuff related to inlining, which I'm trying to get working but may be too much trouble. 2009-09-06 02:43:36 +00:00
971155b373 part one of profiling/optimizing. made cddm not update tesselations itself in cddm_from_mesh. also made BMO_Test/Set/ClearFlag into macros, and tweaked the way normals are calculated. 2009-09-05 06:10:30 +00:00
f7cef59b3d rearranged some code a bit 2009-08-18 20:05:08 +00:00
927e03cf16 fixed some problems in weld, collapse, and collapse uvs 2009-08-12 03:51:28 +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
886b613363 bmeshafied the hide/reveal code. created a set of API functions for hiding/revealing elements in bmesh_marking.c. main function is BM_Hide, which can hide or reveal an element (vert/edge/face, NOT loops, obviously), and will handle any flushing necassary. also renamed BM_Is_Selected to BM_Selected, though I may get rid of that function altogether. 2009-08-05 06:06:58 +00:00
006937bf2e bmeshafied edge rotate. 2009-07-26 14:58:31 +00:00
3bade13503 pre-merge commit. the mirror modifier is currently in pieces, to be picked back up after the merge. there should be some removedoubles fixes, along with some other assorted fixes. 2009-07-14 06:13:43 +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
6bdbbf150d Ported over the delete key and fkey fully over
to bmesh.  Yay! Creating faces from edge nets
is sill missing, I'm leaving that for later.

I added two new bmop functions, BMO_HeaderFlag_Buffer
and BMO_UnHeaderFlag_Buffer, which are header flag
version of BMO_Flag_Buffer and BMO_Unflag_Buffer.
The new functions properly handle setting/clearing
BM_SELECT via the selection API.
2009-06-18 01:31:50 +00:00
40b60cb1fa Added a matrix slot type for bmops. Coded a simple transform
bmop, that just multiplies input verts with a matrix.  Also
made a derivative translate bmop.

BMO_CallOpf now has a %s format code, which is used to
copy data from another slot.

Also cleaned the extrude code up some more, and restored extrude-repeat
(which is bound to ctrl-alt-4), though this doesn't work right yet
(the view matrix it uses is incorrect, or something like that).
2009-06-02 07:40:32 +00:00
b5aa425dee Did some code cleanups. Added BM_ITER and
BMO_ITER macros to make defining iterator
loops easier.  Moved some files around.
And also made the editmesh conversion functions
tesselate ngons to triangle fans, since it's
more stable for conversion, and editmeshes are
never displayed to the user anyway.  And ported
akey to bmesh.

Next up I plan on adding face iterators to DerivedMesh,
since that's the last major chunk of major refactoring
left, I think, except perhaps the uv editor (at the
moment it's probably close to working, but it's still
converting to editmeshes for everything, which is very
bad).
2009-05-28 04:41:02 +00:00
5bb09886fb mesh DNA modficiations; two new structures added for storing ngons, MPoly and MLoop. 2009-05-26 04:17:47 +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
aa4915fdcf extrude region op now does wire vert extrudes too 2009-03-16 11:38:42 +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
15979466dc fixed triangulator. 2009-03-09 13:24:37 +00:00
714a9303d8 split bmesh_operators.h, added (some) docs in comments, and hopefully made it less messy. also added op names and slot names in comments next to their BM_XXXX_XXX definitions in bmesh_operators.h. 2009-03-09 10:38:36 +00:00