Replaces vector of allocations with dynamic linked list.
Bug caused by previously freed buffers still having been in the
list. Linked list enables fast removal of already-released buffers.
Also ensured that the memory manager classes are included in
memory tracking.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/108940
Transform: remove unused members from 'SnapObjectHitDepth'
Also move the `short face_nearest_steps` member before the bit field.
And move 'void SnapData_EditMesh::clear()' definition to the source.
Pull Request: https://projects.blender.org/blender/blender/pulls/109132
The function was named like a public API call but wasn't one. Rather
than renaming, replace it with a lambda that keeps the callback and
void-pointer casting local to the function it is necessary for. This
also avoids obfuscating code with function calls for trivial logic.
Moved selection operators and related functions to their own file
`grease_pencil_select.cc`.
Moved editing related functions to `grease_pencil_edit.cc`.
Added a `ED_operatortypes_grease_pencil` function that calls all the
`ED_operatortypes_grease_pencil_*` functions.
In this specific code path (recursive reading inside .blend files
containing assets), reading datablocks marked as asset would move
ownership over the asset metadata without indicating that in the source
that owned it previously. This would cause a double free attempt.
It was a bit odd having `ED_view3d_grease_pencil_selection_domain_get`
in the `ED_view3d.h` header.
Moving it to `ED_grease_pencil.h` makes more sense.
This patch adds support for two of the three selection domains in the Edit Mode tool settings: point and stroke.
Affected selection operators: select all, lasso select, select pick, box select.
Pull Request: https://projects.blender.org/blender/blender/pulls/108970
There where glitches while weight painting in Grease Pencil with
auto-normalize enabled. This resulted in incorrect weights on vertices.
And sometimes a vertex group not deformed by bones was also affected
by auto-normalize (which should never happen).
This was due to:
- An erroneous line in the auto-normalize function which led to an
index out of bounds (and screwing up the vertex weights).
- An edge case where the active vertex group was de facto the only
group to be normalized.
Also in this patch:
- Removal of unreachable code
- Better names for the auto-normalize functions
Pull Request: https://projects.blender.org/blender/blender/pulls/109036
There is an optimization to avoid creating the attribute if we only
set faces smooth. But since "use_smooth" and "sharp_face" are
inverted, the check for that case needs to be invertex compared
to other similar attribute setters.
`strcpy` could overflow the destination buffer by 768 bytes,
use FILE_MAX for the filepath buffer size.
Also include the size in the functions signature to avoid similar
errors in the future.
The Python API uses the term size for string lengths for
PyUnicode_AsUTF8AndSize and related API's, causing Blender's return
arguments to use the term `size` too in some cases.
This is error prone since Blender includes space from the the null byte
when the term size is used (by convention).
Just avoid creating links to outside the group. The original
version worked a little more accurately. But still she was just
making up links (because the inline version of the graph wasn't the same anyway).
For now, this is just a workaround to work around the
problem in the new behavior caused by fa3ca9afdb .
Pull Request: https://projects.blender.org/blender/blender/pulls/108332
It's a bit unfortunate that the `node_map` in both cases has different
constness, so a conversion or `reinterpret_cast` is necessary. For now
a new temporary map is created as this is less error prone. That's not
ideal but better than the duplication from before.