Commit Graph

351 Commits

Author SHA1 Message Date
Campbell Barton 32ba51c4a1 fix for limited dissolve (after sine intended fixes - not cleaning up before vertex dissolve would skip dissolving some verts that should be dissolved).
now do this:
- edge dissolve
- cleanup (removing edges left over from dissolving faces)
  cleanup removes verts and NULL vertex input array
- dissolve verts which haven't been removed.
2012-05-06 18:37:08 +00:00
Campbell Barton 3d9d26d6bf fix [#31197] Limited dissolve leaves faces/edges/verts behind
bad bug where vertices could be in a face more then once (which isn't allowed), now check for this when creating a face.
2012-05-06 18:04:37 +00:00
Campbell Barton a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
Campbell Barton 4c5502bfd6 code cleanup: function naming for BLI functions. 2012-05-05 00:23:55 +00:00
Campbell Barton 65b5362c74 fix [#31235] Limited Dissolve problems
this is in fact 2 bugs.
- unselected edges between 2 faces that were joined didnt get removed.
- in face mode, edges and verts at the boundary of the selection would get incorrectly dissolved.

also quiet float/double promotion warning.
2012-05-04 15:02:02 +00:00
Nicholas Bishop 4ea8c9ab38 Small hull bmop fix, distance check from plane needs absolute value. 2012-05-04 03:25:46 +00:00
Campbell Barton 2a1ba8c85b style cleanup: formatting and some float/double promotion 2012-05-03 19:57:24 +00:00
Brecht Van Lommel 3ee4be913b Fix #31139: fractal mesh subdivide was only working along normal where previously
it would displace in all directions. Now there's an operator option to control this.
2012-05-03 10:14:08 +00:00
Nicholas Bishop 6f0cb140b0 Initialize an input in bmo_hull. 2012-05-02 23:29:52 +00:00
Campbell Barton d6be860d31 bmesh: use fixed stack size for face flipping array.
also quiet unused var warnings
2012-05-02 11:10:54 +00:00
Sergey Sharybin 5d4fd04f05 Fix #31230: Grid primitive changes size with changing resolution 2012-05-02 09:03:15 +00:00
Campbell Barton 4cfa761951 source code style checker to, (similar to pythons pep8 checker)
currently checks for brace placement and some whitespace use.

can be accessed with:
  make test_style
or...
  source/tools/check_style_c.py  source/blender

also style cleanup on bmo_primitives.c
2012-05-01 20:36:39 +00:00
Campbell Barton 933b3166fc style cleanup: guys - set your editors to tabs! 2012-05-01 17:51:03 +00:00
Bastien Montagne b09ac48d0f Fix own error in BM_mesh_remap(), forgot to remap edge pointers in disk_links of edges, so wasn’t working at all with edges remapping! 2012-05-01 14:13:14 +00:00
Campbell Barton 1d743d11dc bmesh - python api
- bm.*.layers.*.verify()
- bm.*.layers.*.is_singleton
- bm.*.layers.*.copy_from(other)


also added api functons
- BM_data_layer_copy(...)
- CustomData_layertype_is_singleton(type)
2012-04-30 18:54:14 +00:00
Campbell Barton 8f3ed0501e code cleanup: quiet clang warnings, these would likely never but wont hurt to quiet them, 2012-04-30 10:47:32 +00:00
Campbell Barton 5979893711 style cleanup: edits to convex hull. 2012-04-30 10:39:35 +00:00
Nicholas Bishop 70f1279eab Add convex hull operator (bmesh operator and wm operator.)
Image-heavy user documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/Convex_Hull

Thanks to Campbell for providing code review:
http://codereview.appspot.com/6114060
2012-04-29 16:09:40 +00:00
Campbell Barton e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
Campbell Barton 04d8ef3c47 wireframe option to crase edges at the hub, much nicer subsurf 2012-04-29 12:33:56 +00:00
Campbell Barton 41a5e731a2 bmesh: new wireframe tool
- makes wireframe from faces.
- options similar to inset (even offset, relative scale)
- copies face settings and loops (uvs, vcolors)
- optionally replaces the existing geometry.
2012-04-29 10:44:00 +00:00
Campbell Barton 4465d2f419 bmesh api functions, not used yet:
BM_iter_elem_count_flag()
  BM_iter_mesh_count_flag()
2012-04-28 18:39:37 +00:00
Campbell Barton ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
Campbell Barton f8f7523fb2 fix memory leak in BM_face_copy()
note that this doesnt run when duplicating faces normally, only way to cause this bug I could find was to knife cut a 33+ sided ngon with multi-res applied.

also small improvement not to grow the array but allocate at once if needed.
2012-04-28 07:43:21 +00:00
Campbell Barton b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
Campbell Barton ef0a4c0ba9 fix for bevel modifier creating invalid geometry - simply tell BM_face_split() to check for doubles. 2012-04-26 15:38:16 +00:00
Campbell Barton 2118d3c19c code cleanup: bmesh comments/todos, no functional changes. 2012-04-26 08:27:50 +00:00
Campbell Barton 0daa5b0c47 bmesh: inset tool depth used bad normals for edge verts. 2012-04-26 03:40:10 +00:00
Campbell Barton c4abd6cf5a code cleanup: edge slide code had oddly named variables, added some comments and renamed vars.
also made BM_elem_select_set() a function (was a macro calling a function).
2012-04-25 01:24:55 +00:00
Campbell Barton 47b6b60e5a code cleanup: no functional change - had both EDBM_editselection_* and BM_editselection_* funcs, replace EDBM_ funcs. 2012-04-24 21:19:18 +00:00
Campbell Barton a667492d0e fix [#30997] Bevel angle option is broken (bevel vertex only) 2012-04-24 05:38:11 +00:00
Campbell Barton f02694f5a4 workaround for vertex bevel modifier failing since the BMesh update. 2012-04-24 05:02:53 +00:00
Campbell Barton 077cbaddf0 - remove unneeded len_v3v3 in bevel code
- remove dead assignments from vgroup-blend
2012-04-24 04:44:51 +00:00
Campbell Barton 03f451f2f1 fix own error with subdivision (broke icosphere), also noticed icosphere vanished at subd-5 which didnt happen before bmesh. 2012-04-23 23:01:03 +00:00
Campbell Barton 8baa5fbde2 - fix for python freeing its own bmesh clearing the global mirror cache.
- fix for own mistake (Ctrl+T didnt set beauty peroperty).
- remove bad level includes in bmesh.
2012-04-23 04:24:11 +00:00
Campbell Barton b51590d55d code cleanup: bmesh subdivide code - BM_mesh_esubdivideflag() & "esubd" bmesh operator was passing a flag about in a fairly confusing way.
since we will eventually have python bmesh operator access better expose this as multiple booleans.

remove remaining editbutflag's
2012-04-23 03:43:02 +00:00
Campbell Barton 792f536b36 code cleanup: better use of BLI_array_* (grow in larger steps where possible), include BMO_iter_new in for loops. 2012-04-23 02:17:57 +00:00
Campbell Barton 16ff7e40e6 code cleanup: change C naming convention (so py and C api match), eg:
C: BM_face_calc_area(f), Py: BMFace.calc_area()
2012-04-23 01:19:50 +00:00
Campbell Barton 5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
Campbell Barton 8765dfccf7 style cleanup: correct typos 2012-04-21 14:14:58 +00:00
Campbell Barton 1c54eaecd8 fix [#31049] New Faces (F) always solid shaded 2012-04-21 13:58:29 +00:00
Campbell Barton 2e20d3dc96 fix for error using uninitialized variable with shape key conversion. 2012-04-20 18:34:58 +00:00
Campbell Barton b26865ba99 code cleanup: prefer BM_face/edge/vert_select_set() over BM_elem_select_set() when the type is known (saves switch statement check on the type).
Add asserts so the correct types are ensured.
2012-04-20 16:55:47 +00:00
Campbell Barton ed81982049 knife tool alpha values where being set to zero (intersection points weren't visible), error made when converting to theme colors.
also minor bmesh style cleanup.
2012-04-20 13:45:38 +00:00
Campbell Barton 384f87cd1c rip tool wasnt working on a single edge selection in some cases (own error in recent fix). 2012-04-19 23:16:57 +00:00
Campbell Barton 028dbb132d add asserts for invalid iteratpr values so we can catch them in debug mode. 2012-04-19 22:40:09 +00:00
Campbell Barton 741a177a74 bmesh: improve rip tool
- When the rip extends into a fan, pick the opposite edge in the fan (rather then 2 along)
- When stepping over the fan to find the rip edge, walk in the direction closest to the mouse (generally works nicer)
2012-04-19 21:47:32 +00:00
Joseph Eagar ebbfcd71e5 Fixed crash in iter api, triggered by calling index_update() on the loop py seq in the py api. Note, I didn't fix the underlying problem (bad iter type) so loops.index_update() still isn't working (it's just not crashing). 2012-04-19 21:14:11 +00:00
Campbell Barton e387ccdb42 bmesh inset: add depth option (make use of relative and even offset options) 2012-04-19 19:03:15 +00:00
Campbell Barton b40476455e code cleanup: remove unused BMesh args. 2012-04-19 14:38:09 +00:00