Commit Graph

56 Commits

Author SHA1 Message Date
7df8452d1a BMesh: add bmesh delete functions that dont depend on operator flags 2014-01-17 14:55:06 +11:00
590f58d455 code cleanup: redundant includes and add minor comments. 2013-10-08 20:18:38 +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
da7af1e271 correct own error in r59365, reported as [#36536] Extrusion detaches faces 2013-08-22 18:52:34 +00:00
c1cc9f3376 bmesh duplicate operator: add vertmap output slot. 2013-08-22 17:32:41 +00:00
fca659252f code cleanup: bmesh duplicate functions
- avoid using an iterator when stepping around an edges radial loop.
- use naming constant with the rest of the bmesh operators.
2013-08-21 14:35:51 +00:00
649743dfd6 mesh duplication was doing a loop & hash lookup for every loop corner, when there is no need since the faces are aligned.
was also initializing and stepping an iterator for no reason.
2013-08-21 11:27:18 +00:00
7d661839a6 correct error in recent commit (face customdata) 2013-08-21 11:09:50 +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
78820edafc use bmesh for loop macros for looping over mesh verts/edges/faces 2013-08-01 18:33:35 +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
cdac157f4c code cleanup: use iterator macros, and replace BM_LOOPS_OF_FACE with direct loop access when converting a bmesh to a mesh. 2013-07-24 18:38:55 +00:00
79b919644b code cleanup: remove array reallocation in bmesh duplicate function (use alloca) 2013-07-19 10:39:32 +00:00
fad1da062d correct typos in comments. 2013-06-25 22:58:23 +00:00
59ca83c3a9 rename axis_angle_to_mat3_no_norm() --> axis_angle_normalized_to_mat3().
this matches closer to convention from existing functions - angle_v3v3() angle_normalized_v3v3().

also added assert to ensure argument given to axis_angle_normalized_to_mat3() is in fact normalized.
2013-04-15 15:16:11 +00:00
b1f4e2b4db code comments: bmesh operator doxy header descriptions. 2013-03-30 08:54:50 +00:00
b27854bd47 use booleans for bmesh api. 2013-01-14 16:42:43 +00:00
84361f602a fix [#33651] Spin tool destroys unselected loose vertex
bmesh.ops.extrude_face_region() didn't check for isolated verts (not connected to geometry), and removed them, happened for Ctrl+LMB extrude too.
2012-12-27 01:02:32 +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
c5a8bd498d use radians for 'spin' bmesh operator (since the rest of the py api uses radians). also rename BMO_OP_SLOT_SUBTYPE_MAP_FLOAT -> BMO_OP_SLOT_SUBTYPE_MAP_FLT for consistency. 2012-11-28 00:47: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
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
3d64381e4d use more rigid type checking for bmesh slot subtypes. 2012-11-26 03:16:29 +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
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
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
25c96bc9f3 code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +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
2932cded40 fix for own error renaming bmesh operator dupe 2012-06-30 21:19:12 +00:00
69a7e0af02 rename bmesh ops since they are exposed in an api now. 2012-06-30 15:27:13 +00:00
0a2da1ee45 patch [#31574] Screw seams to not work
from Benoit Donat-Bouillud (ladeheria)

from tracker -
  When using a screw axis (reference edge for screw), the operation always give the same result (as if the orientation of the reference edge was not take into account).
2012-06-13 16:06: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
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +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
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
75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
58064bdfc4 code cleanup: add doxygen headers to bmesh operator files, also add own include so definitions dont get out of sync. 2012-04-06 09:21:19 +00:00
d2d2b8c2f2 code cleanup: replace inline axis angle conversion with axis_angle_to_mat3() 2012-04-02 06:43:16 +00:00
6c4d675759 style cleanup 2012-04-02 01:57:56 +00:00
52f1f292f7 Reverting some style changes from r45305.
See discussion here:
http://lists.blender.org/pipermail/bf-committers/2012-April/036098.html
2012-04-01 15:25:07 +00:00
6904d9727e Minor code cleanups for bmo_dupe.c. 2012-03-31 12:29:17 +00:00
c7aed8b2af For BMesh functions that test flags, add enabled/disabled variants. 2012-03-30 17:30:49 +00:00
f71f09d714 Partial fix for bug 30695, "Array broke crease, weird visibility and slowdown"
* Array modifier creates BMesh from DM; add missing CD_CREASE layer
  for edge creases.

* With a modifier stack like mirror+subsurf+array, face normals were
  wrong. Fix by removing CD_NORMAL layer from CCGDM output. Previously
  the elements in this layer were simply copied, so they did not
  reflect subdivision correctly.

* Minor style fixes in bmo_dupe.c.

Issues not yet addressed:

* Subsurf's optimal draw setting for hiding subdivision edges is not
  respected by the array output.

* Slowdown issue; array modifier is much slower than in 2.62.
2012-03-27 12:34:00 +00:00
9c9745ef30 Fix more truncated comments. 2012-03-27 11:03:10 +00:00
d76c05cd36 style cleanup: bmesh 2012-03-21 09:10:08 +00:00
6f104aad3a code cleanup: bmesh api - make arg order consistent - htype before hflag or oflag. 2012-03-19 08:36:27 +00:00
c2d93e8d4a comment cleanup 2012-03-14 22:39:56 +00:00
9aafe32147 bmmesh api - use struct rather than int[4] to initialize mesh sizes.
also correct bad assert() in previous commit.
2012-03-01 20:09:17 +00:00