e7a6efa2a7
Code Cleanup: move delete funcs out of bmesh_construct.c into own file
2014-01-17 09:21:30 +11:00
5b5bc63396
fix [ #36923 ] Merge / Delete vertices crashes for some meshes
...
add BM_ITER_MESH_MUTABLE which steps before entering the for() loop body and prevents the assert from complaining about removing mesh data while iterating as well as the crash.
this was done in quite a few areas, more may turn up.
2013-10-03 07:06:56 +00:00
5342d57a5e
allocate bmesh data from known sizes where possible (was still using defaults in places),
...
add macros for initializing BMAllocTemplate's, also add assert on invalid use of bmesh_sfme()
2013-09-24 03:31:00 +00:00
7a38fe97fd
sorting utility functions for simple cases - sorting pointers by float for example.
2013-09-05 22:24:12 +00:00
d6b9fb36d8
fix leak in BM_face_split() with multires if the split failed.
...
also remove redundant normal copy.
only triangulate the mesh if its needed when enabling dyntopo.
2013-08-23 13:00:43 +00:00
9470754fd3
bmesh api cleanup, face creation args now accept an example face (as with vertex and edge),
...
also replace BM_face_create_quad_tri_v with BM_face_create_verts
2013-08-21 07:51:47 +00:00
8937a8b839
use BM_CREATE_NOP arg rather then zero, with pointer and bool args in either side in some cases it gets a bit confusing.
...
also correct edge-rotate where bool->flag conversion worked by accident.
2013-08-21 05:39:46 +00:00
6f856777fe
bmesh api:
...
- use heap for BM_face_create_ngon_vcloud allocations.
- replace BM_face_create_ngon_verts with more efficient BM_face_create_verts
2013-08-21 05:20:57 +00:00
19d3e230e6
improved BM_face_copy_shared to copy from more possible connected loops and add filter function (not used yet).
2013-08-18 11:44:51 +00:00
fd14c344e0
switch arg order for BM_elem_select_copy(), would like to make this constant for all bmesh functions eventually.
2013-08-13 00:35:23 +00:00
a4b922ad9b
correct invalid sizeof() use in bmesh (harmless in practice)
2013-08-03 17:27:05 +00:00
4982f200fa
move alloca define into its own header since its not related to BLI_array
2013-07-28 10:38:25 +00:00
4bc32d5ded
mesh tool to fill in holes, added in mesh clean menu,
...
unlike other face creation tools it copies data from surrounding faces.
2013-07-25 18:43:05 +00:00
66d9c0def9
fix for face normal flipping calculation.
2013-07-25 18:16:55 +00:00
19496ab62a
internal bmesh api change: BM_elem_attrs_copy() no longer copies the selection flag.
...
this was slowing down modifiers since the selection flags would be copied and flushed to connected geometry.
2013-07-24 19:31:58 +00:00
7db1d6556d
code cleanup: add break statements in switch ()'s, (even at the last case).
2013-07-21 08:16:37 +00:00
48c8d99cd9
add BM_elem_attrs_copy_ex() which can take a flag arg to define which flags should be copied. (mainly to be able to avoid copying selection/hidden state)
2013-07-11 12:43:34 +00:00
7fec23ae0a
fix for problem with edge slide where it would stop shapekey modifier from being applied (because of added vertices),
...
now, instead of making hidden copies of faces, the faces are copied into a temp bmesh.
also remove a hash that was being created and not used (old code).
2013-07-11 04:24:36 +00:00
5e347c4f71
code cleanup: typos
2013-05-26 12:02:29 +00:00
b2f1720d41
bmesh: copy function - replace use of array reallocations with alloca in a static function.
2013-05-25 20:47:06 +00:00
2e0f741d01
can't use alloca in inline functions (fills up stack - I thought compiler would be smart here).
...
also reserve the exact number of vert/face/edge/loops when creating a bmesh during undo.
2013-05-09 11:42:24 +00:00
8ac2fee57a
minor speedup for bmesh - add CustomData_bmesh_free_block_data(), use
...
when the block would be immediately allocated again.
2013-05-08 13:00:25 +00:00
858ff6b696
Fix for [ #34898 ] Typo in error message of mathutils.Vector
...
* Also fixed some more cases of "more then" -> "more than".
2013-04-07 15:09:06 +00:00
29c8bd7b24
api cleanup: split part of BM_face_create_ngon_vcloud() into a new function BM_face_create_ngon_verts(),
...
a function to create a bmesh face from an ordered vertex array, optionally creating edges and calculating winding.
2013-03-27 05:52:28 +00:00
b27854bd47
use booleans for bmesh api.
2013-01-14 16:42:43 +00:00
b2f6e6b113
code cleanup: BM_face_create_ngon()
...
Change some of the paranoid checks into an assert since they should never happen.
2013-01-03 08:06:12 +00:00
7b212b3bd0
fix [ #33689 ] Crash with decimate modifier
...
in fact a more general bug in BM_face_create_ngon() where edges containing the same vertex multiple times were not accounted for.
2013-01-03 07:53:30 +00:00
2cb39ea9da
use BM_face_create() over BM_face_create_ngon() in bevel and extrude individual faces to get some speedup.
2012-12-19 09:45:56 +00:00
fbf4f57cd6
bmesh optimization: use BM_face_create() rather then BM_face_create_ngon() in BM_mesh_copy(), gives ~30% overall speedup in my tests.
2012-12-19 09:13:06 +00:00
f6c5a72e3f
fix [ #33606 ] Adding the Decimate modifier will crash Blender
...
own regression since 2.65 release.
2012-12-19 01:24:12 +00:00
71730f26d7
replace BLI_array_fixedstack_declare with() new macro BLI_array_alloca() which uses stack memory always and doesn't need to be freed explicitly.
2012-12-11 15:10:19 +00:00
07ccd3ee3f
fix [ #33029 ] Applying modifier leaks memory
...
Thanks for Sergey for finding the bug & patching, This fix works a bit differently.
Theres no need to allocate the customdata in the first place - since its written into. So add a flag for vert/edge/face/loop creation functions so they can skip customdata creation.
2012-11-29 16:26:39 +00:00
cdc4037f0d
bmesh: BM_verts_in_face was using bmesh operator flag which is no longer ensured to be available,
...
use internal apiflag instead, Thanks to Nicholas Bishop for spotting.
also quiet some warnings.
2012-11-19 00:54:55 +00:00
42ebc9bc80
bmesh: move internal API flags out of BMFlagLayer, into BMHeader which was being padded up anyway, added static assert to make sure it stays <=16 bytes.
2012-11-18 10:17:07 +00:00
0bfc92ff8e
BM_iter_as_arrayN() can now take an optional existing array argument, useful to avoid many small malloc's by passing a fixes size stack variable instead.
...
Will give some speedup to edge-split modifier and bevel.
2012-11-12 05:53:43 +00:00
2bb174cfa4
style cleanup: indentation
2012-11-09 09:33:28 +00:00
bf4be941fc
fix for filled rip copying loop customdata (fix in BM_edge_other_loop broke it)
...
also assert when customdata can't be copied because of invalid args.
2012-10-27 01:33:33 +00:00
c9c76a9a68
add compiler hints that failing to create a bmesh face is unlikely.
2012-10-01 11:12:49 +00:00
f5d3e361ce
fix for missing NULL check in init_render_texture() (possibly own fault), also remove some redundant code.
2012-09-19 08:09:22 +00:00
ca7d1ec39d
style cleanup: use <pre> for doxygen ascii art
2012-08-13 15:17:15 +00:00
3289628610
fix [ #31489 ] EdgeSplit modifier prevents All Edge to be work correctly since 2.63
...
bmesh regression where the edge-draw flag was cleared when bmesh modifiers were used.
2012-05-22 07:26:45 +00:00
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
2a1ba8c85b
style cleanup: formatting and some float/double promotion
2012-05-03 19:57:24 +00:00
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
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
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
75b869e428
style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER
2012-04-19 11:44:12 +00:00
a1e6e75add
fix [ #30936 ] Face Inset gives bad UV's
2012-04-13 10:37:33 +00:00
8fa17c5362
code cleanup: no functional changes
...
- memset(..., -1) is used incorrectly even though it worked: MOD_solidify.c - thanks Halley from IRC for noticing this. use fill_vn_i() instead.
- quiet warnings in editmesh_slide.c
- cleanup comments in bmesh and some other minor comment additions.
2012-04-07 12:37:15 +00:00
3f3b88ff42
bmesh iterators were passing the BMesh as data argument to BM_iter_new(), harmless but incorrect.
...
replace these cases with iterator macro.
2012-04-03 00:28:38 +00:00