Commit Graph

74 Commits

Author SHA1 Message Date
f12ac5b23f fix [#37100] Segfault when I rotate an edge 2013-10-16 05:24:55 +00:00
590f58d455 code cleanup: redundant includes and add minor comments. 2013-10-08 20:18:38 +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
76e989d7b1 function renaming for own recently added BLI_math functions, suggested by Brecht. 2013-07-30 10:58:36 +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
5dc3cfc983 fix [#36282] Spin error with non uniform scale
add support for passing object matrix to bmesh transform operators.
2013-07-26 11:15:22 +00:00
29df776b89 optimization: call one bmesh operator for rotate (not 3).
added pivot_m4() utility function since rotating about an arbitrary point is handy.
2013-07-26 06:12:49 +00:00
335fd7388f move normal recalculation into its own source file. 2013-07-08 08:50:04 +00:00
2c8087aa2a fix [#36047] Recalculate normals produces faulty normals on certain simple meshes
The mesh in the report had 3 faces-user-edges, resolve the problem by not walking over these edges.
also don't recurse anymore (avoids realloc's).
2013-07-08 00:51:30 +00:00
48fd740096 edit-mesh improvements to select shortest path
- Ctrl+RMB only worked for edges & faces
- Menu item 'Select Shortest Path' only worked for vertices.

Now Ctrl+RMB works for vertices and the menu item works for verts/edges/faces (depending on the current selection).
2013-06-04 01:23:51 +00:00
be409d446c fix for own recent change with normal calculation (with no faces it wasn't freeing 0 byte allocation). 2013-05-15 05:56:49 +00:00
c961c56c64 add missing STACK_INIT, also quiet float <> double conversion warnings. 2013-05-13 02:10:59 +00:00
4e4eff3937 remove BLI_array allocations from uv/color reverse, rotate. 2013-05-12 14:45:09 +00:00
40535f5ef3 bmesh recalculate normals - remove BLI_array reallocation, the max size of the array is known.
replace with STACK_* macros (moved to BLI_utildefines.h).
2013-05-12 12:23:44 +00:00
85145db47b remove wanton use of array reallocation for mesh smoothing. 2013-05-12 12:06:08 +00:00
3c67cf9594 from bug report [#34984] bmesh.ops.recalc_face_normals() ignores use_flip=True
the name `use_flip` is misleading, option in fact tags faces that have been flipped, rename to `use_face_tag`
2013-04-22 20:15:42 +00:00
dad7afa1af code cleanup: remove double call to BKE_node_instance_key(), rename ruler (lots of tools are 3d :)), and redundant assignment. 2013-03-21 14:16:55 +00:00
00ef8896fd fix for own error in recent BLI_array commit 2013-01-20 16:58:14 +00:00
b27854bd47 use booleans for bmesh api. 2013-01-14 16:42:43 +00:00
0526fcf13f revert part of r52720, Id rather leave these as-is, even if they give warnings under some configurations. 2012-12-03 08:11:04 +00:00
818a345be3 Silent a bunch of gcc warnings (usually dummy, but noisy!). 2012-12-02 16:01:06 +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
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
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
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
dbdc76c9d0 code cleanup: make bmesh operator names more consistant since python has access to these as input arguments and return values.
all output values currently have ".out" suffix, this may go in the future, but for now it makes it clear in C code what are inputs and outputs.
2012-11-20 05:50:19 +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
617a73c573 code cleanup: unused defines & some formatting. 2012-11-08 06:46:10 +00:00
199e597922 code cleanup: move select-similar bmesh operators into their own file since there are 3 operators here that share
utility functions with eachother but have nothing in common with other operators in bmo_utils.c
2012-10-30 07:59:25 +00:00
330c0178ce add the option to select Equal/Greater/Less when selecting similar.
Recently addons were submitted for review and this was the only advantage they had over blenders existing internal
select-similar tool.
2012-10-30 07:29:17 +00:00
b5e8e8da6f add option to select face by matching number of sides. 2012-10-30 06:43:30 +00:00
248b2fc6d6 bmesh-decimator update
- update face normals when triangulating.
- avoid divide by zero when interpolating customdata on a zero length edge.
- replace zero float comparisons with fabsf() < FLT_EPSILON to avoid numeric error.

also renamed BLI_heap_empty() --> BLI_heap_is_empty() so its obviously readonly function.
2012-10-21 15:20:53 +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
84e80b6904 Fix #32301: mesh select more/less not taking hidden vertices/faces into account. 2012-08-22 15:10:07 +00:00
f608b3c444 code cleanup:
- building without python works again
- rename maxi/mini to i_max/i_min (so thay are available for function names)
- some minor edits to IK stretch setting (no functional changes).
2012-07-29 17:49:14 +00:00
718569dc16 Fix #32199: Smooth Vertex no longer has X, Y and Z options. 2012-07-27 17:35:02 +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
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
69a7e0af02 rename bmesh ops since they are exposed in an api now. 2012-06-30 15:27:13 +00:00
bd9192670b Added option in shift-g to select verts by number of connected edges (valence). 2012-06-15 01:43:01 +00:00
56c5c63f57 code cleanup: doxy comment filename corrections 2012-06-08 23:43:11 +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
23c0d49a7c optimization for select similar
- use angle_normalized_v3v3() where both vectors are known to be normalized.
- remove needless radian to degrees conversions.
- move checks for customdata layers outside the inner loop (for bevel and crease).
2012-05-12 14:25:14 +00:00
821b231bd6 add bevel to select similar edges operator 2012-05-12 14:06:35 +00:00
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
792f536b36 code cleanup: better use of BLI_array_* (grow in larger steps where possible), include BMO_iter_new in for loops. 2012-04-23 02:17:57 +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