Campbell Barton
d0bd474375
Custom Data API: redundant pointer-to-pointer arg
2014-09-24 18:50:29 +10:00
Campbell Barton
88a0fe5f1b
Code cleanup: use 'const' for arrays (bmesh)
2014-04-27 00:25:16 +10:00
Campbell Barton
fed1b8b16d
Code cleanup: suffix vars to make obvious they are squared
2014-02-03 02:46:45 +11:00
Campbell Barton
e7a6efa2a7
Code Cleanup: move delete funcs out of bmesh_construct.c into own file
2014-01-17 09:21:30 +11:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
7a38fe97fd
sorting utility functions for simple cases - sorting pointers by float for example.
2013-09-05 22:24:12 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
a4b922ad9b
correct invalid sizeof() use in bmesh (harmless in practice)
2013-08-03 17:27:05 +00:00
Campbell Barton
4982f200fa
move alloca define into its own header since its not related to BLI_array
2013-07-28 10:38:25 +00:00
Campbell Barton
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
Campbell Barton
66d9c0def9
fix for face normal flipping calculation.
2013-07-25 18:16:55 +00:00
Campbell Barton
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
Campbell Barton
7db1d6556d
code cleanup: add break statements in switch ()'s, (even at the last case).
2013-07-21 08:16:37 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
5e347c4f71
code cleanup: typos
2013-05-26 12:02:29 +00:00
Campbell Barton
b2f1720d41
bmesh: copy function - replace use of array reallocations with alloca in a static function.
2013-05-25 20:47:06 +00:00
Campbell Barton
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
Campbell Barton
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
Thomas Dinges
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
Campbell Barton
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
Campbell Barton
b27854bd47
use booleans for bmesh api.
2013-01-14 16:42:43 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
f6c5a72e3f
fix [ #33606 ] Adding the Decimate modifier will crash Blender
...
own regression since 2.65 release.
2012-12-19 01:24:12 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
2bb174cfa4
style cleanup: indentation
2012-11-09 09:33:28 +00:00
Campbell Barton
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
Campbell Barton
c9c76a9a68
add compiler hints that failing to create a bmesh face is unlikely.
2012-10-01 11:12:49 +00:00
Campbell Barton
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
Campbell Barton
ca7d1ec39d
style cleanup: use <pre> for doxygen ascii art
2012-08-13 15:17:15 +00:00
Campbell Barton
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
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
2a1ba8c85b
style cleanup: formatting and some float/double promotion
2012-05-03 19:57:24 +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
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
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
75b869e428
style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER
2012-04-19 11:44:12 +00:00