Commit Graph

78 Commits

Author SHA1 Message Date
006937bf2e bmeshafied edge rotate. 2009-07-26 14:58:31 +00:00
22bd3c8995 revert part of this thing I was doing with ccgsubsurf 2009-07-26 13:26:59 +00:00
0b6066c8f1 replaced use of bmesh tesselator with scanfill when leaving edtmode and generating the mface tesselation data. also fixed a normals problem. 2009-07-26 13:12:55 +00:00
5fcbb36b79 assorted uv fixes 2009-07-25 14:13:26 +00:00
82ff261455 baaad typo 2009-07-25 04:52:44 +00:00
62a847d741 uv texture (though not glsl) works now. also fixed some bugs. still some issues left, and for some reason textured objs aren't displaying properly in object mode. 2009-07-24 10:43:58 +00:00
be5cd6a4e9 small subdivide fix, and a compile fix 2009-07-22 03:41:24 +00:00
69327f2ebd merge with trunk at r21785, and also fixed stupid ngon normals bug 2009-07-22 02:57:40 +00:00
19a2da9303 first pass at the uv code. uv editor now mostly uses new bmesh structures for uvs. 2009-07-21 08:39:58 +00:00
19afbc9785 . . .and I forgot this check 2009-07-17 11:28:44 +00:00
024866726e subdivide experimental stuff is now more stable. basically, it no longer creates new edges in all the situations it used too, plus you can connect two edges in an ngon. 2009-07-17 11:15:06 +00:00
f2138686d9 moved the selection history stuff within bmesh itself, to avoid memory access problems. also committing some playing around I did with the edge subdivide code, which isn't doesn't really completely work. 2009-07-17 10:54:00 +00:00
359fb502b6 small tweak 2009-07-17 06:12:50 +00:00
6fa67401d8 some small edge split related things. now you can split edges (with no additional geometry created) with mkey. 2009-07-17 06:05:09 +00:00
928258936f mirror modifier is now feature-complete, though not all features can be tested at the moment. also cleaned up some of the memory leaks. 2009-07-17 00:32:19 +00:00
321246e6d9 vertex and uv layers now refernce mpolys/mloops in rna. also fixed some customdata-related problems. 2009-07-16 09:17:27 +00:00
0b1649b2b8 merge with 2.5 at r21568 2009-07-16 06:27:37 +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
020de22d85 some small fixes to removedoubles 2009-06-23 07:14:39 +00:00
0b77ef0895 forgot to add this file. 2009-06-23 06:37:12 +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
5abbb20c89 extrude handles active face, and operators now properly restore unmodified mesh on failure 2009-06-18 07:11:55 +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
8a6d70bcb1 ctrl-click to make an isolated vert works again 2009-06-18 03:04:27 +00:00
00d0a58db3 click-extrude works again 2009-06-18 02:05:56 +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
a457b7129c further fixes for modifiers, and edge loop select works now. 2009-06-16 20:08:40 +00:00
80effa20b1 moved the active face pointer to BMesh, where I think it belongs. also made some fixes to the ccgsubsurf derivedmesh, and some general modifier bugfixes. note that modifiers are still rather buggy and crashy at the moment, heh :) also made some functions for converting Mesh flags to BMesh flags, and back. 2009-06-12 14:02:37 +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
b7fe3258b6 some stability stuff related to undo, and more extrude stuff works 2009-05-19 00:33:54 +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
b1de007e50 edge subdivide ops now use bmesh code, rather then just the test bmesh op. also, got bmesh edge subdivide's smooth subdivide mode to work (fractal already worked I think, not sure). 2009-03-16 14:15:18 +00:00
aa4915fdcf extrude region op now does wire vert extrudes too 2009-03-16 11:38:42 +00:00
ba4d6babbb some cleanup of bmesh_polygon.c. there were three winding functions, now there's just one, the original testedgeside, that has some additional tests that might fix some issues I was having. still need to decided if bmesh_polygon.c stuff should be entirely double or entire floats, right now there's a little half-and-half going on. 2009-03-16 10:12:52 +00:00
34ed34b572 some fixes for extrude, to better handle customdata, winding, etc. 2009-03-16 09:43:47 +00:00
f8b846ff8f some fixes for extrude, to better handle customdata, winding, etc. 2009-03-16 09:41:33 +00:00
dbad24e0f6 had to increase size of a numerical error compensation value, kindof odd but works 2009-03-15 06:14:03 +00:00
302e796270 connect verts now does geometric tests to perform valid splits. it also supports multiple splits in a face, going around the face boundary in a loop and performing splits. 2009-03-14 13:16:35 +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
e91a478dab missing file 2009-03-04 09:38:26 +00:00
2c33a51e3f Printf-style method of calling operations now take a modified format string,
like so:

[opname] [slotname]=%[format code]

Before it was relying on the input format codes being in the same proper
order as the slots, which seemed like a potential maintainance nightmare to
me.  Also the flags for creating buffers from bmop flags or header flags,
now support additional modifiers for combining vert/edge/face inputs.
E.g. %hfvef would accept all geometry with a header flag, and 
%fef would accept edges and faces with a certain bmop flag set.

Example from the UI code:

if (!EDBM_CallOpf(em, op, "del geom=%hf context=%d", BM_SELECT, DEL_ONLYFACES))
			return OPERATOR_CANCELLED;
			
(remember EDBM_CallOpf is the UI wrapper for this that does conversion, 
 error reporting, etc).  
 
 On todo is cleaning up/splitting bmesh_operators.h,
 since it's kindof a mesh right now.  I'm thinking of adding the slot
 names in comments next to the slot ids, but I definitely would have to
 clean up bmesh_operators.h first, or it'd just be too chaotic for me.
 BTW, the operator API should now have enough meta info to wrap with
 a scripting language, not that it matters since that's not happening till
 much much later.
 
 Also hopefully corrected some SConscripts, fix mostly provided by Elia Sarti,
 though I also copied some SConscripts from 2.5 (not sure if doing
 so was especially helpful).
 
 Finally, I refactored a few places to use the new operator calling api,
 as an example of how this is beneficial.
2009-03-04 08:21:10 +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