Commit Graph

64 Commits

Author SHA1 Message Date
8733f89539 Style Cleanup: edits for line length 2012-02-06 06:26:54 +00:00
5c3fdfac77 Code Style: more code style edits. 2012-02-06 06:03:46 +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
11d5a2d2eb Code Cleanup: style change only 2012-02-05 15:55:28 +00:00
c7e8af13d4 remove cellalloc, from my tests jemalloc beats cellalloc, so we better just use a better malloc replacement.
See Details:

http://wiki.blender.org/index.php/User:Ideasman42/BMeshBranchReview#Update_43694
2012-01-25 20:18:12 +00:00
3d01f13c43 fix for 3 issues when applying a deform modifier in editmode.
- drawing face normals was broken (using wrong index).
- drawing flat faces in solid mode would display ugly tesselation normals (as if the model was made of triangles).
- drawing smooth faces in solid mode would show vertex normals based on tesselation (heavily slant in 1 direction).

now the normals are calculated and stored per polygon (will save some memory too for non tri meshes).
2012-01-24 19:37:18 +00:00
61a5cc28be disable re-tesselation for modifiers that use bmesh, array/bevel/edge split - were tesselating 2 times and didnt need to.
also comment array modifier from flushing selection flags.
2012-01-22 21:12:18 +00:00
ad3e9900d6 call CDDM_from_BMEditMesh without creating tessface data for modifiers.
- in the case of deform modifiers this is very safe (assuming the mods themselves dont need tessface data), since the DM is freed right after, so this is an easy speedup.

- in the case of bevel and split edge modifiers this should still work out fine since mods that need tessface data will generate it.
2012-01-18 15:29:25 +00:00
9d782c8a1a argument for CDDM_from_BMEditMesh() so creating tessface data is optional, no functional changes since all callers use this so far. 2012-01-18 15:09:27 +00:00
8a8cb2c3ef minor formatting edits 2011-12-21 04:56:04 +00:00
8d0dc29aba remove BLI_blenlib since its not needed in quite a few bmesh files 2011-12-12 22:34:05 +00:00
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
d12fb5053c trust 'bm->elem_index_dirty' is correct, this avoids looping over edges/faces/verts if its not needed, but if set wrong it could crash too so added verification when built with debeg.
also added debug define to help solve invalid values with valgrind's memcheck.

gives noticeable speedup since there was a loop no all faces to set index values on redraw.
2011-11-28 18:52:35 +00:00
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
565e2b4d73 use faster method of getting vert/edge/face indices which uses BLI_mempool_findelem to skip over chunks rather than going over every element 2011-11-27 02:05:46 +00:00
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
3ed866d2fc svn merge -r41926:41932 ^/trunk/blender 2011-11-16 19:57:20 +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
e63399edda BM_Compute_Normals was setting invalid edge index values when it didn't need to. 2011-11-16 13:23:29 +00:00
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
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
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
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
b0a21add8a replace bmesh specific macros with math functions, also some pedantic formatting edits. 2011-11-07 09:02:10 +00:00
63eb94e504 rename BM_FLIPPED --> BM_TMP_TAG to use as a temp tag anywhere. 2011-11-01 09:48:20 +00:00
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
61b699bf9b remove $Id from headers 2011-10-24 23:32:24 +00:00
f19cb3fc6b undo of 40542 (meant to make two separate changes) 2011-09-26 00:32:45 +00:00
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
10d6e1e16a Normal math improvements and vector math cleanup 2011-09-22 12:31:01 +00:00
2448f8caa9 code cleanup - commant/remove unused vars and reduce scope. 2011-09-07 06:49:20 +00:00
cb9d2488e9 fix for rna type getting an boolean as an int, and gcc's -Wdouble-promotion 2011-08-20 20:19:58 +00:00
0400b2e136 demoved some extraneous members from BMHeader 2011-05-12 18:17:23 +00:00
521d824371 =bmesh=
1. Removed pinning, at least until after trunk
reintegration (it's a usefull feature, but
incomplete).

2. Ripped out the subclassing code I originally
wrote so bmesh would be more usable for modifiers 
(I ended up improving CDDM instead).

3. Inlined some of the macros in bmesh.h, still need to
do the macros in bmesh_operator_api.h.

4. Removed the BMESH_ITER_*** macros (except for BMESH_ITER_INDEX).
   They were too clunkly to be worth it.
2011-05-12 01:55:08 +00:00
cd55aeaf6d set many vars & functions as static,
also commented invalid pin theme alpha assignment so bmesh branch builds with -Werror
2011-05-11 02:14:43 +00:00
b93594bf30 quiet more compiler warnings, also found a bug using printf rather then fprintf. 2011-05-09 05:09:07 +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
60aa74f9ee bmesh, less warnings 2011-03-20 14:49:16 +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
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
71003b9bcc merge with trunk at r27259 and commit of a patch by anthony jones to fix msvc (though further work may be needed because changes made by the merge 2010-03-09 04:32:40 +00:00
0e165c55bb did math lib conversion, equivilent to merge with trunk/2.5 at r24464 2009-11-23 14:41:22 +00:00
4652d66c0a editmode undo stores data as mesh dna now, instead of bmesh copies. also fixed a bug related to vpaint and hide flags. 2009-09-10 06:08:52 +00:00
4c072f85d9 commit of transform pinning patch by Fabian Fricke (frigi). wip hotkey is enter/alt-enter to pin/unpin verts. pinned verts aren't affected by transform, e.g. grab, rotate, etc. this could probably work nicer for proportional editing, but that can be done later. also the UI for this probably needs reviewing and feedback. still, very nice patch by Fabian, something I for one will probably find very useful :) 2009-09-10 03:59:12 +00:00
b0a1904d33 another optimization pass. biggest change is MDeformGroup->dw is now allocated via a somewhat simplistic, if effective allocator. This needs a little bit more work; I'd really prefer building this into guardedalloc, but the method requires mempools, which currently live in blenlib. and I'm not sure if we can have guardedalloc linking with blenlib? anyway, current allocator code is more of a temporary fix until I figure that out. 2009-09-10 01:46:52 +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
0b79b8f933 finished first pass at bmeshafying uvedit_ops.c. not everything works yet, loop select for example crashes. 2009-07-21 11:48:58 +00:00