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
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
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
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
2118d3c19c
code cleanup: bmesh comments/todos, no functional changes.
2012-04-26 08:27:50 +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
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
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
Campbell Barton
475ecbb0ce
remove BM_ITER, BM_ITER_INDEX macros, use ELEM or MESH variants only (the maceros had unused args in both cases).
2012-04-19 13:47:58 +00:00
Campbell Barton
3ef7943910
code cleanup: first step to replace BM_ITER BM_ITER_INDEX macros.
2012-04-19 12:45:56 +00:00
Bastien Montagne
7cadd242d3
BMESH_TODO: xsort of vertices working again.
...
This commits adds a new function which can remap vertices/edges/faces of a BMesh in a new given order:
void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
2012-04-19 12:31:39 +00:00
Campbell Barton
75b869e428
style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER
2012-04-19 11:44:12 +00:00
Campbell Barton
db2edfcfde
bmesh api function: BM_edge_face_tangent()
...
was used by inset but make into an api function since scripts can use this too.
2012-04-19 11:25:05 +00:00
Campbell Barton
c776418b24
add missing NULL check for BM_vert_collapse_faces(), could crash in rare cases.
2012-04-18 08:11:08 +00:00
Campbell Barton
9a4aecbcc3
bmesh: fix own bug in BM_vert_collapse_faces() with option 'kill_degenerate_faces', was removing data as it iterated, would crash in some cases.
2012-04-18 07:27:15 +00:00
Campbell Barton
1f01d62d15
more replacement for BM_edge_face_count() use.
2012-04-18 06:57:28 +00:00
Campbell Barton
f1ececaabb
code cleanup: replace use of BM_edge_face_count with BM_edge_is_manifold and BM_edge_is_boundary
2012-04-18 06:44:48 +00:00
Campbell Barton
27696ddae1
fix error in last commit. Misunderstood BM_vert_is_manifold(), added some comments.
2012-04-18 06:36:47 +00:00
Campbell Barton
df27c315ce
code cleanup: minor edits to bmesh_jfke(), move simple checks first.
2012-04-18 04:44:50 +00:00
Campbell Barton
a1337caac0
bmesh api: minor simplify & cleanup
...
- add BM_face_edge_share_loop(f, e) -- edge version of existing BM_face_vert_share_loop(f, v)
- simplify BM_edge_ordered_verts_ex(), check could be reduced.
- use BM_ELEM_INTERNAL_TAG for bmesh_jfke(), not BM_ELEM_TAG to avoid clobbering tagged data tools might use.
2012-04-18 04:32:55 +00:00
Campbell Barton
e6adcfe8c6
bmesh api: adjust bmesh_vert_separate() not to set the loops index values (need them to be left untouched for other tools).
2012-04-17 15:44:19 +00:00
Campbell Barton
195d6c1b1a
minor speedup for scanfill, dont calculate the normal if its already known - use for editmode ngon filling.
2012-04-16 18:24:49 +00:00
Campbell Barton
67f8e3a3a7
inline function for "Newell's Method" used for normal calc.
2012-04-16 16:49:37 +00:00
Sergey Sharybin
34814e4755
Port multires_topology_changed to new bmesh api
...
This call is still needed when loading editmesh because some operations
are not creating CD layer for new loops (like crating new face) and
to prevent loosing all sculpted data when running disps correct
displacement maps should be allocated on loading edit mesh.
2012-04-16 11:03:42 +00:00
Francisco De La Cruz
86508076d8
Fix [ #30943 ] Crash when edge mode enabled and use the bmesh vertex slide(shift-V)
...
Also fixed snapping sensitivity. Gave BMOp a more consistent name "vertex_slide".
2012-04-15 18:34:13 +00:00
Campbell Barton
db53faffa3
make ngon_perimeter into a public api function and expose to python.
2012-04-15 10:09:27 +00:00