dee671276d
rename BM_vert_at_index -> BM_vert_at_index_find (since this searches the mempool).
...
needed for other changes - coming.
2013-10-27 10:01:35 +00:00
7c65015ab8
use ints for ghash/edgehash flags, since its allocated theres not much point to try save a few bytes here.
2013-08-24 20:16:14 +00:00
09a52f18b6
ghash: reserve size when its known or can be guessed close enough.
...
also avoid allocs per node in pbvh_bmesh_node_limit_ensure()
2013-08-24 17:33:47 +00:00
930dde34a3
BM_mesh_clear was setting toolflags incorrectly, also no meed to calloc when shrinking toolflags array.
2013-07-10 13:06:31 +00:00
d54d00ef84
Remove paranoid null checks for editmesh EDBM_vert_at_index and friends (use asserts instead).
...
temp set BM_OMP_LIMIT to zero for better testing before release.
2013-06-19 18:59:54 +00:00
9e05f6571f
Make sure bool will always have the same size in C and C++
...
There were an issues with data structures defined in headers
and being used by both C and C++ on systems with stdbool
unavailable.
This happened because bool in this case will be defined as
unsigned int, which is 4 bytes. But C++'s bool is only 1
byte and this lead to alignment issues.
Now bool is always 1 byte, also made sure there's no situation
like bool foo = BitField & BitFlag, which could give overflow
issues. Use (BitField & BitFlag) != 0 instead.
Fixes #35553 : Compositor broken (Backdrop & Preview)
2013-05-29 11:49:39 +00:00
6f8c29ab0b
fix for 2 errors introduced since release
...
- shape key NULL pointer dereference.
- use uninitialized variable for bmesh free.
also update credits and merge dissolve flag assignment.
2013-05-09 07:02:51 +00:00
f554c264da
speedup for freeing bmeshes, skip calling free on every
...
vert/edge/face/loop if there are no free functions for the customdata
layers.
2013-05-08 12:59:56 +00:00
245a175a00
fix [ #34657 ] Smoothing will not be updated in object mode, when hiding faces in edit mode and changing shape.
...
remove the option to skip hidden faces in BM_mesh_normals_update, use openmp to speedup recalculation for high poly meshes.
2013-04-24 12:07:13 +00:00
37e73aa368
code cleanup: use BKE naming conventions for functions in BKE_editmesh.h and BKE_editmesh_bvh.h
2013-04-16 05:59:48 +00:00
456f3b318a
code cleanup: minor changes, clang checker option for exact size matches and use vector functions.
2013-04-14 12:01:12 +00:00
1e373ac048
minor speedup to BM_mesh_normals_update()
2013-04-14 07:46:45 +00:00
da5e0ea8fe
bmesh operators: use operator type-flag to specify which operations require normal-calculations and which operations require selection flushing.
...
eg, no need to flush selection after 'Smooth' tool, no need to recalculate normals after 'Select Similar'.
2013-04-14 06:22:34 +00:00
6da961775f
code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere).
2013-04-13 20:31:52 +00:00
655ed9cc7f
style cleanup
2013-03-18 11:44:56 +00:00
baf3bb37a9
- ghost-sdl builds again.
...
- without python builds without warnings.
- replace MAXFLOAT -> FLT_MAX in some areas, MAXFLOAT overflows (lager then float range).
- add cmake option WITH_GCC_MUDFLAP to enable libmudflap use.
2013-03-16 20:49:46 +00:00
296444e1dc
style cleanup: some warnigs & spelling.
2013-02-06 14:02:19 +00:00
b27854bd47
use booleans for bmesh api.
2013-01-14 16:42:43 +00:00
b0fd9378e3
correct own error in openmp use for BM_mesh_elem_index_ensure().
2012-12-22 08:37:34 +00:00
2ee180eab6
add threshold for bmesh & openmp so its not used with low poly meshes, BM_OMP_LIMIT may need tweaking.
2012-12-12 07:20:34 +00:00
3d69dbd44a
use openmp to thread some common bmesh operations
...
- BM_mesh_elem_toolflags_ensure / bmo_flag_layer_alloc / bmo_flag_layer_free / bmo_flag_layer_clear
- BM_mesh_select_flush
- EDBM_index_arrays_init
notes:
- mostly use openmp `sections` to split operations on vert/edge/face since this is a fairly minor change.
- split tool flag pool in 3, this means we can allocate exact sizes needed and iterate on them in threads without alloc'ing.
2012-12-12 05:04:01 +00:00
671b871e7f
fix [ #33392 ] In-dev freeway generation addon crashes on recent builds.
2012-12-03 05:40:48 +00:00
48aa356b7b
use const for bm_mesh_allocsize_default, bm_mesh_chunksize_default
2012-12-03 05:38:28 +00:00
5716762c02
fix for changes in own recent commit:
...
selected linked in face mode was crashing. (needs bmesh operator flags)
also some style edits, remove unused includes and change triangulate modifiers use_beauty to a flag.
2012-11-19 23:52:24 +00:00
a9af563526
bmesh: lazy initialize bmesh tool flag pool, has the advantage that modifiers that dont use bmesh operators can skip allocating it.
2012-11-18 12:14:22 +00:00
12ed0c64bc
make use customdata typeoffset more, add an assert to ensure its to date.
2012-10-31 09:50:24 +00:00
2de2acc681
add CDDM_from_bmesh(), avoids using BMEditMesh in modifiers.
2012-10-24 07:24:11 +00:00
da9394f596
code cleanup: define sizes of vectors for function args and use C style comments
2012-10-15 09:11:17 +00:00
ed1cda9a6c
style cleanup
2012-09-30 06:12:47 +00:00
aff591c6e1
code cleanup: typos and set exceptional cases of zero length normals as UNLIKELY().
2012-09-17 22:22:06 +00:00
d724d0adfe
code cleanup: quiet warnings for gcc's -Wundef, -Wmissing-declarations
2012-09-16 00:26:36 +00:00
d9fcbe2f59
remove BMO_OP_FLAG_RATIONALIZE_NORMALS option which wasnt used anywhere.
2012-07-21 01:09:11 +00:00
90d215535e
add option so operators can be called with a flag, currently the only flag is to respect hidden geometry.
...
this is useful for bmesh tools that operate in object mode or for modifiers which would previously use hidden faces in some cases.
2012-07-21 00:58:02 +00:00
69a7e0af02
rename bmesh ops since they are exposed in an api now.
2012-06-30 15:27:13 +00:00
ed33320e3f
Code cleanup: simplify standard GHash creation.
...
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.
GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);
Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
2a1ba8c85b
style cleanup: formatting and some float/double promotion
2012-05-03 19:57:24 +00:00
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
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
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
8765dfccf7
style cleanup: correct typos
2012-04-21 14:14:58 +00:00
b40476455e
code cleanup: remove unused BMesh args.
2012-04-19 14:38:09 +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
3ef7943910
code cleanup: first step to replace BM_ITER BM_ITER_INDEX macros.
2012-04-19 12:45:56 +00:00
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
75b869e428
style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER
2012-04-19 11:44:12 +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
4f19c1a995
spelling cleanup
2012-03-18 07:38:51 +00:00
99f72dfbfc
Add 'level' field to struct MDisps, companion to 'totdisp'.
...
Gets initialized when loading old files and updated at the same places
totdisp is updated. Saves having to do log+sqrt to extract level from
totdisp.
2012-03-14 03:10:18 +00:00
b330abc290
remove Object member from BMesh struct - was only used for undo and BMEditMesh already stores an object pointer.
...
also fix for own mistake with mesh conversion refactor, shape key index was off by 1 when switching editmode.
2012-03-11 19:58:56 +00:00
19400d418d
fix for debug assignment left in from own commit r44778
...
also removed private face normal update functions - they were same as public.
2012-03-11 15:27:08 +00:00