Age | Commit message (Collapse) | Author |
|
Separate the creation of trees from EditMesh from the creation of trees from DerivedMesh.
This was meant to simplify the API, but didn't work out so well.
`bvhtree_from_mesh_*` actually is working as `bvhtree_from_derivedmesh_*`.
This is inconsistent with the trees created from EditMesh. Since for create them does not use the DerivedMesh.
In such cases the dm is being used only to cache the tree in the struct DerivedMesh. What is immediately released once
bvhtree is being used in functions that change(tag) the DM cleaning the cache.
- Use a filter function so users of SnapObjectContext can define how edit-mesh elements are handled.
- Remove em_evil.
- bvhtree of EditMesh is now really cached in the snap functions.
- Code becomes organized and easier to maintain.
This is an important patch for future improvements in snapping functions.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
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!
|
|
|
|
on 64bit system reduces the struct to 64bytes, was 120, also avoids initializing unused values.
|
|
|
|
each operator check the state that it can even run and do something.
|
|
- BMO_iter_elem_count_flag().
closely matching existing BM_iter_elem_count_flag() function but checks tool-flags instead.
|
|
|
|
|
|
to avoid many small malloc's by passing a fixes size stack variable instead.
Will give some speedup to edge-split modifier and bevel.
|
|
(this iterator is used everywhere).
also rename vars in the struct.
|
|
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
|
|
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.
|
|
BM_iter_elem_count_flag()
BM_iter_mesh_count_flag()
|
|
maceros had unused args in both cases).
|
|
|
|
|
|
|
|
|
|
|