c30fb009cc
problem with own changes to triabgulate: calling beauty fill directly would re-allocate the faces which mean't triangulates output slots pointers became invalid. (noticed when using from py api)
2013-02-06 15:57:12 +00:00
b27854bd47
use booleans for bmesh api.
2013-01-14 16:42:43 +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
e2f0a1e4db
own cleanup commit in bmesh branch - removed last letters from ends of some comments.
2012-12-11 14:24:27 +00:00
231d1a3ddd
bmesh toolflags would use BLI_MEMPOOL_SYSMALLOC when reducing layers only (would use MEM_mallocN in one case but malloc in another). better use blenders MEM_mallocN for both.
2012-12-08 13:15:04 +00:00
1d09d0a9c5
Silent some warnings (the one in bmesh_operator.c was even preventing build in -Werror mode).
2012-12-02 13:35:33 +00:00
8ecce451ab
bmesh operator naming - use clearer names for args eg: (mat -> matrix, use_singleedge -> use_single_edge)
...
also remove duplicate docs for operator arg formatting.
2012-11-28 00:16:06 +00:00
69948150ad
improve docstring for BMO_op_vinitf().
2012-11-27 23:37:02 +00:00
c00a1b7493
use clearer names for 'single' bmesh operator args & add '%e' to BMO_op_vinitf comments.
2012-11-27 09:41:08 +00:00
a9855c227e
py/bmesh api - add support for single item buffers (odd feature but used quite a bit with bmesh operators).
...
also add utility functions BMO_slot_buffer_from_single(), BMO_slot_buffer_get_single()
2012-11-27 09:21:57 +00:00
9982b283e6
fix for asserts added in own recent commit with more strict type-checking
...
- BMO_slot_copy now only copies compatible elements.
other minor changes
- don't use text.format(...), convention for UI scripts is C style string formatting.
- rename bmo_edgenet_prepare --> bmo_edgenet_prepare_exec
- float/double warning in bevel.
2012-11-27 02:34:40 +00:00
f8bc346eff
bmesh/py operator api:
...
add type checking for element buffers, there was nothing stopping python from passing any element type into an argument when in some cases only verts/edges/faces were expected.
now operator args define which types they support.
2012-11-27 00:50:59 +00:00
42c54bcd93
py/bmesh api - support for converting from/to BMO_OP_SLOT_MAPPING type.
2012-11-26 08:44:37 +00:00
3d64381e4d
use more rigid type checking for bmesh slot subtypes.
2012-11-26 03:16:29 +00:00
3fe8134d6d
add subtypes to bmesh operators (needed for python api to know how to convert return values).
2012-11-26 02:24:03 +00:00
55535b21fe
fix own error - remove doubles slot name.
2012-11-22 01:00:40 +00:00
68e9fdeb81
code cleanup: comment unused members of bmesh operator slots and some osl style edits.
2012-11-20 14:31:58 +00:00
ebaf1306b8
bmesh operator api:
...
avoid per vert/edge/face string lookups in BMO_slot_map_* functions --- used in array modifier, subdivide, remove doubles and other tools.
2012-11-20 13:29:27 +00:00
e8667421ed
bmesh operator api edits, add macros and NULL the buffer if BMO_slot_buffer_alloc()'s len is zero.
2012-11-20 03:29:12 +00:00
48639af5f8
use input and output slots for bmesh operators, needed for the python api to get return values.
2012-11-19 14:58:31 +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
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
ae06e2cf9b
fix [ #33000 ] bmesh.ops.create_* either crash blender or do nothing
2012-11-08 10:32:11 +00:00
964f29797b
avoid using BLI_array for remove double helper function - bmesh_find_doubles_common(), was growing and array one at a time (with re-allocs), when the size is known.
2012-11-05 14:39:49 +00:00
eb69d1c1ae
style cleanup: also quiet harmless compiler warning.
2012-10-29 15:43:54 +00:00
c9dade4fe0
Big i18n commit: add "reports" from bmesh/readfile/tracking/dynapaint (and a few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()...
2012-10-26 17:32:50 +00:00
aff591c6e1
code cleanup: typos and set exceptional cases of zero length normals as UNLIKELY().
2012-09-17 22:22:06 +00:00
1a7eb3454e
style cleanup
2012-09-08 08:59:47 +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
2ed69a95f4
add bmesh/python operator support for vector and matrix args.
...
also rename BMO_OP_SLOT_PNT to BMO_OP_SLOT_PTR (matches RNA and sounds less like 'point')
2012-07-02 20:28:43 +00:00
69a7e0af02
rename bmesh ops since they are exposed in an api now.
2012-06-30 15:27:13 +00:00
e6d55c97dd
add support for passing lists of verts/edges/faces to bmesh operators
2012-06-30 12:58:04 +00:00
3e99ec8d3d
all bmesh operators can now be accessed from bmesh.ops.* using a generic wrapper,
...
argument parsing still needs to have support added for vector, matrix and element types.
2012-06-30 11:14:10 +00:00
35d8424273
code cleanup: rename some members of bmesh operators, 'slots' is a C++ keyword which confuses some IDE's.
...
also added missing BMO_op_vinitf args to comments.
2012-06-30 09:55:04 +00:00
a18b303a76
Fix incorrectly deleted elements in array modifier caps.
...
Add check for merging vertices into vertices that are themselves
marked for merge, was already done for array eleements but not end
caps.
Fixes bug [#31695 ] Array Modifier: End Cap fails if all vertices are merged
Also corrected some reversed assert arguments.
2012-06-11 09:41:08 +00:00
2d2d36fe3b
code cleanup:
...
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +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
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
75b869e428
style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER
2012-04-19 11:44:12 +00:00
e9358a3806
bmesh api changes:
...
- remove recently added BM_mesh_select_flush_strip(), functions purpose wasn't clear.
- add BM_mesh_elem_hflag_disable_test(), BM_mesh_elem_hflag_enable_test()
to match existing BM_mesh_elem_hflag_enable/disable_all(), these take a hflag to test before editing each element.
This replaces the need for BM_mesh_select_flush_strip().
2012-04-13 04:02:26 +00:00
db9c9f6c64
fix [ #30772 ] No more than two subdivions give correct result when adding an icosphere
...
bug was introduced in r45297, which inadvertently broke testing for multiple flags at once.
added BM_elem_flag_test_bool() and BMO_elem_flag_test_bool() to get TRUE/FALSE results rather then the flag value.
2012-04-03 02:38:27 +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
c56bc8cb0f
style cleanup: multi-line if's & whitespace.
2012-04-02 22:40:02 +00:00
3c1b5b5632
stule cleanup: edits for files which were recently cleaned up.
2012-04-02 22:26:00 +00:00
c7aed8b2af
For BMesh functions that test flags, add enabled/disabled variants.
2012-03-30 17:30:49 +00:00
bbbbe1b00e
Add BMO function to append to a buffer slot.
2012-03-30 17:30:24 +00:00