Commit Graph

26 Commits

Author SHA1 Message Date
b8c40d47e0 Cleanup: remove unused bmesh iterator 2015-11-19 22:13:35 +11:00
89f5a09ab4 Cleanup: use 8 space indent for multi-line args 2015-04-25 20:15:20 +10:00
3e7e97f127 BMesh: ensure iterator macros assign to valid types
note, this is for C++ code which expects a cast, (will be added later)
also add a macro for nop-expressions (EXPR_NOP),
when we never want an expression to be evaluated, but it should still be valid.
2014-12-08 10:54:56 +01:00
d57ce42dfa BMesh: arg reorder 2014-11-03 08:30:54 +01:00
51d99ebf01 BMesh: type-check iterator data argument 2014-09-25 14:14:52 +10:00
3c0605c0ef BMesh: generic callbacks for mempool iterator 2014-09-24 14:55:30 +10:00
5b5bc63396 fix [#36923] Merge / Delete vertices crashes for some meshes
add BM_ITER_MESH_MUTABLE which steps before entering the for() loop body and prevents the assert from complaining about removing mesh data while iterating as well as the crash.

this was done in quite a few areas, more may turn up.
2013-10-03 07:06:56 +00:00
35b61a7512 Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers
to use special compiler's hints use a special file where
all things like this are concentrated.

Makes code easier to follow and allows to manage special
attributes in more efficient way.

Thanks Campbell for review!
2013-09-01 15:01:15 +00:00
fad1da062d correct typos in comments. 2013-06-25 22:58:23 +00:00
78c35c7720 bmesh: optimize iterator size using a union for iterator specific data.
on 64bit system reduces the struct to 64bytes, was 120, also avoids initializing unused values.
2013-05-25 09:46:28 +00:00
281c1565b9 remove BLI_array use in bmesh mirror, add BMO_iter_as_arrayN() function. 2013-05-13 13:44:20 +00:00
765060acd4 BMesh: make the context create operator (Fkay) more logical, before calling each operator check the state that it can even run and do something. 2013-03-28 06:01:58 +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
b27854bd47 use booleans for bmesh api. 2013-01-14 16:42:43 +00:00
b867f9f17e style cleanup: comments & spelling 2012-11-18 01:22:31 +00:00
0bfc92ff8e BM_iter_as_arrayN() can now take an optional existing array argument, useful to avoid many small malloc's by passing a fixes size stack variable instead.
Will give some speedup to edge-split modifier and bevel.
2012-11-12 05:53:43 +00:00
deeecc2029 code cleanup: remove unused members of BMIter struct to save some space. (this iterator is used everywhere).
also rename vars in the struct.
2012-10-20 10:11:26 +00:00
12a8c19956 un-subdivide bmesh operator, useful for making lower polygon versions of models, can give nicer results then edge collapsing which tends to give a lot of sharp triangles.
works on edges and faces, has iteration option to further reduce the poly count.

access from the edge menu, under subdivide.

example: http://www.graphicall.org/ftp/ideasman42/bmesh_unsubdivide.png
2012-10-16 16:04:12 +00:00
39231c90dd fix [#31738] BM_vert_splice modifies loops during iteration
patch by Nicholas Bishop, modified to avoid looping over vert-loops one extra time.

added BM_iter_as_arrayN(), returns an iterator as an array without knowing the length before calling.
2012-09-11 06:12:48 +00:00
4465d2f419 bmesh api functions, not used yet:
BM_iter_elem_count_flag()
  BM_iter_mesh_count_flag()
2012-04-28 18:39:37 +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
3c11379e26 code cleanup: move bmesh inline funcs to headers (avoids compiling the C files). 2012-03-24 01:24:58 +00:00
95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
a6f420b828 update doxygen comments for bmesh. 2012-02-29 06:55:10 +00:00
df0f0c63d3 bmesh: re-arrange headers 2012-02-28 16:47:12 +00:00