Age | Commit message (Collapse) | Author |
|
Just return the face or NULL, like BM_edge_exists(),
Also for BM_face_exists_overlap & bm_face_exists_tri_from_loop_vert.
No functional changes.
Old code did some partial overlap checks where this made some sense,
but it's since been removed.
|
|
Pass size when its known.
|
|
No need to re-convert from C strings to PyUnicode.
|
|
|
|
Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.
|
|
D1988 by @wisaac, with own edits and improvements.
This improves on existing tangent calculation functions too.
- BM_face_calc_tangent_auto: Chooses method based on number of sides, used by manipulator (not exposed to Python).
- BM_face_calc_tangent_edge: from longest edge.
- BM_face_calc_tangent_edge_pair: from longest edge-pair (most useful with quads).
- BM_face_calc_tangent_edge_diagonal: edge farthest from any vertex.
- BM_face_calc_tangent_vert_diagonal: vert farthest from any vertex.
Also optimize BM_vert_tri_calc_tangent_edge* functions to avoid sqrt.
|
|
Now CD_SHAPEKEY_INDEX customdata is stored in edit-mode when hooks and vertex parents are used.
This also fixes a bug where undo would loose key-index data.
Move to structs for BM_mesh_bm_to/from_me to avoid passing many argument, which mostly aren't used.
|
|
Resolves T48258
|
|
|
|
|
|
Follows convention for set, useful to avoid error handling with remove().
|
|
Was raising "internal error".
|
|
|
|
|
|
|
|
Layers returned from items() and values() could have an invalid index.
|
|
|
|
|
|
This could cause problems since they could be any int,
then passed directly to internal functions that assume bools.
|
|
Access arrays directly, avoiding type-check every time.
|
|
Also add BPy_BMElem_PySeq_As_Array_FAST
|
|
|
|
|
|
Splitting edges could give duplicates.
|
|
|
|
|
|
|
|
D782 by Stanislav Blinov
|
|
|
|
add BM_***_count_is_over(), _count_is_equal()
Useful if we only want to know if the count is a smaller value.
|
|
Make consistent with calc_edge_angle,
take an optional fallback arg for non-manifold edges
otherwise raise an exception.
|
|
This was mis-named, rename to `calc_edge_angle`
and allow a fallback value in the case when the vert doesn't have 2-edges.
|
|
Was breaking windows compile, reported by bdancer over IRC, thanks.
Also, quite some annoying 'unused vars' warnings (debug-only vars).
|
|
Previous text could make think this func was checking whether a point was
inside and on the face, while it actually checks whether the projection
of that point onto the face is inside its boundary...
|
|
This appends while giving ownership to the list, avoiding temp assignment.
This matches PyList_SET_ITEM which bypasses refcount's
Note, this also reduce code-size, Py_DECREF is a rather heavy macro.
|
|
Setting all values of a tuple is such a common operation that it deserves its own macro.
Also added Py_INCREF_RET to avoid confusing use of comma operator.
|
|
remove 'type' argument, very few mathutils objects are wrapped,
add new function for creating wrapped objects.
also fixes unlikely memory leak if the data-array can't be allocated.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
This changes the Py API to use array lookup table.
Previously this could be very slow since it would loop over all elements.
Now the python script is responsible for creating the internal lookup table (as with C code).
This will break some scripts.
|
|
|
|
|
|
|
|
|
|
|