Commit Graph

109 Commits

Author SHA1 Message Date
afe3b55483 Cleanup: warning & whitespace 2015-10-26 22:22:30 +11:00
2e2dc9b9e3 Refactor translation code out of blenfont
- Add blentranslation `BLT_*` module.
- moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`).
- moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-08-18 07:01:26 +10:00
89f5a09ab4 Cleanup: use 8 space indent for multi-line args 2015-04-25 20:15:20 +10:00
b7174c9320 Fix connect-vertices failing for concave ngons
Also add:
- generic callback for bmesh elements.
- ability to pass an existing array to a bmesh operator.
2014-11-02 00:09:14 +01:00
6b3ec0c515 Fix editmesh-connect with hidden geometry
- ignore hidden faces & verts
- when cutting a pair, select edges co-linear to the cut.

Also support creating a buffer from hidden elem's even if BMO_FLAG_RESPECT_HIDE is enabled.
(if the hflag used includes BM_ELEM_HIDDEN).
2014-09-02 14:35:56 +10:00
39c7ccca1e BMesh: report errors for invalid operator use
- invalid htype's into a slot
- duplicate htype's args to BMO_op_vinitf
2014-09-02 13:57:39 +10:00
ca1bca442a Fix T40993: Store selection history for extrude 2014-08-25 16:57:38 +10:00
2aca720bff Fix T40813: Dissolve verts with adjacent regions, removes the dividing edge 2014-06-27 05:39:39 +10:00
d53ed58c57 BMesh: avoid OpenMP use for low poly meshes (counting selection)
also use schedule(static) for simple for loops.
2014-06-06 23:54:15 +10:00
5580afb5df GHash/Edgehash: make simple iterator checking functions inline.
also remove NULL check, only a few areas made use of this.
2014-04-08 15:50:38 +10:00
412826a504 Mempool: delay allocating an initial chunk, its not always used 2014-04-08 12:58:56 +10:00
af59ee340f Mempool: remove BLI_MEMPOOL_SYSMALLOC, MEM_* allocs are more efficient now 2014-04-05 12:14:05 +11:00
191183b304 Fix for bmesh with openmp 2014-02-16 22:40:09 +11:00
b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
c5cb42f402 Code Cleanup: use bool for bmesh operator boolean mapping functions 2014-01-03 21:35:29 +11:00
45eed8246a BMesh Operators: BMO_op_finish now overwrites values in debug mode
This should prevent accidental use-after-free.
2013-11-27 13:42:24 +11:00
98a4ae8562 use booleans in BKE_nurb_handles_autocalc and BMO_op_vinitf 2013-10-08 12:35:58 +00:00
0ac194687e style cleanup 2013-09-18 00:07:17 +00:00
15039b14ff Make strict compiler happy for release builds. 2013-09-02 17:24:56 +00:00
01a2634d61 fix [#36412] Pivot of active element switches to last selected face after duplicating vertices. 2013-09-02 04:39:48 +00:00
54310b8086 bmesh: internal api change, remove BMOElemMapping, its not needed since the values can be stored in the ghash directly.
saves 24 bytes per element (per vertex/edge/face on a 64bit system), for bmesh operators.
2013-09-02 03:13:51 +00:00
b7a3a3894e internal bmesh operator change, always initialize ghash for mapping slots, save having many checks. 2013-08-27 22:13:11 +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
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
7c58ec9337 use math functions for copying matrix/vector types, also cast const pointers for freeing (clang error's out otherwise) 2013-07-26 10:43:23 +00:00
b7826c42df enable type limits warning when compiling with gcc. 2013-07-19 10:39:25 +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
73d32fdcc2 add type checking assert in bmesh operator iterator. 2013-07-01 07:12:05 +00:00
716ed32d90 fix [#34870] bmesh.ops.* parameter lists and descriptions don't show in PyConsole on auto-complete
more a feature request then a bug but nice to have __doc__ on bmesh operators.
2013-04-05 19:58:18 +00:00
cb6f4160cc api cleanup: replace BMO_vert_edge_flags_count() with more reusable function - BMO_iter_elem_count_flag().
closely matching existing BM_iter_elem_count_flag() function but checks tool-flags instead.
2013-03-27 10:14:09 +00:00
f9f7070336 add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh. 2013-03-10 06:18:03 +00:00
6a59f71d04 bmesh: face creation from a single selected vertex/edge, now extends the selection along wire/boundary edges and makes a face.
Selection is specifically so you can continuously fill in holes by tapping the Fkey.

Similar functionality to the F2 addon, however the mouse location isn't used.
2013-03-09 14:14:20 +00:00
fdb25a1d27 Fix #34249: collapse edges crash blender with a specific mesh
OpenMP block was using shared variable, which for sure leads to
threading issues.
2013-02-19 09:51:32 +00:00
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