Age | Commit message (Collapse) | Author |
|
Optionally don't remap indices for objects.
Checking all objects parent's would reference a freed pointer
while freeing all objects.
In the case of dynamic topology there is no use in keeping track
of hook/vertex-parent indices.
Also disable this when creating meshes for undo storage
since adding an undo step shouldn't be modifying other objects.
|
|
- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
(hint this isn't a simple getter).
See P611 to apply instead of manually resolving conflicts.
|
|
|
|
|
|
Would leave the flag set on raising an exception.
|
|
Suggested in T53131
|
|
|
|
|
|
|
|
|
|
Regression in 46cf33bf0
|
|
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.
Some inline exceptions are kept because they show useful details.
|
|
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.
|
|
|