0a026033ae
BMesh: make toolflags optional
...
Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.
2016-07-01 19:29:22 +10:00
4a356d767b
BMesh: BM_verts_from_edges utility function
2015-12-24 20:30:02 +11:00
a12fa185f8
BMesh: use typed filter callbacks (const args too)
2015-11-28 13:37:02 +11:00
3e0c6a8ca2
BMesh: util functions to get edge loops from verts
2015-05-28 11:46:58 +10:00
01dda9a434
correct own error in recent ngon creation edit
2015-04-25 21:16:58 +10:00
89f5a09ab4
Cleanup: use 8 space indent for multi-line args
2015-04-25 20:15:20 +10:00
a7381cca34
BMesh: simplify BM_face_create_ngon
...
Was doing quite a lot of unnecessary steps.
Now construct the sorted verts, edges /w error checking, in a single loop.
2015-04-25 17:26:22 +10:00
d0bd474375
Custom Data API: redundant pointer-to-pointer arg
2014-09-24 18:50:29 +10:00
88a0fe5f1b
Code cleanup: use 'const' for arrays (bmesh)
2014-04-27 00:25:16 +10:00
fed1b8b16d
Code cleanup: suffix vars to make obvious they are squared
2014-02-03 02:46:45 +11:00
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