The problem was caused because the `Nearest2dUserData::obmat_` member
was deallocated in derived classes even before the main class
destructor was called.
This is strange behavior and only seen in Mac or Linux Release builds.
The solution is to not rely on the destructor to register snap values.
So create a separate function.
This moves the `stroke_cache` that was previously stored on every
drawing to the `GreasePencilRuntime` struct.
Since this cache is only used for when a user is drawing a stroke, there
can only ever be one. It makes more sense to have this cache on the
data-block runtime data, rather than every drawings runtime data.
- "Front"/"Back": 'put something at the front/back' or 'the front/back
face of something'. (e. g. the Empty Image options, Depth and Side
option, both use the same strings as enum, which should be avoided
in some languages).
- "Flip": invert, as in normals, or mirror, as in an image.
- "Path": a path to a resource, in general a file but sometimes a
datablock, as opposed to a trajectory in space.
- "Join": disambiguate for the Grease Pencil operator, which may use a
different word as that for meshes.
- "Wave": an ondulating motion, as opposed to a fluid dynamics motion.
- "Step": can mean the distance between two things, or a number of
times to do something. In this case it is better to use the plural.
- "Edge": generally the edges of a mesh, but can also mean edge
detection. Additionally, it was used for the option to enable
Freestyle. This was changed to "Use Freestyle".
- "Boundary": the limit of a grease pencil drawing for filling
purposes, as opposed to the external limit of a (non-manifold) mesh.
- "Rotations": can be translated to something like "Turns", in the
context of a spiral.
Pull Request: https://projects.blender.org/blender/blender/pulls/108213
When using ATI GPU on MacOS/Metal compilation of Eevee shaders crashed due to an infinitive
loop in the compiler backend. This change fixes this by using a more reliable loop that
ensures that the loop will be finite.
Thanks for the Apple developers working on finding the root cause and Michael Parking White
for the initial fix.
Fixes#107322Fixes#107451
Pull Request: https://projects.blender.org/blender/blender/pulls/109358
The Undo History menu displays each undo step's name. These are either
operators or property names. Operators are translated upon display,
and they use the operator name. Currently, many of them are not
translated because they do not use the proper translation
context.
This commit changes the translation context to
BLT_I18NCONTEXT_OPERATOR_DEFAULT ("Operator").
Pull Request: https://projects.blender.org/blender/blender/pulls/108872
Since d8388ef36a, the "frame_change_post" handler could not be used
anymore to detect when animation playback stopped.
This functionality is needed by certain addons though and is generally
usefull to have, so this is now added.
Related reports : #109168, #109218
Pull Request: https://projects.blender.org/blender/blender/pulls/109232
Add Sculpt support for the new Draw Manager
and implement Sculpt rendering in Workbench Next.
Instead of using a callback approach, it's now possible to
retrieve a vector of GPUBatches and their material index,
so engines can use them as they see fit.
Pull Request: https://projects.blender.org/blender/blender/pulls/109294
This essentially replaces the `ed::curves::select_ends` function by using a new masking function (`ed::curves::end_points`) and manipulating the selection attribute directly in the operators.
Pull Request: https://projects.blender.org/blender/blender/pulls/109293
- When string join truncates, break out of the outer loop too.
- Use BLI_string_len_array when calculating the array size for
BLI_string_join_array_by_sep_charN.
- Add tests.
Compute edges of image once based on luminance instead of all 3 channels.
This also gives a modest performance improvement of 8%. Measured on intel i9 CPU using a 1920 x 3199 image.
Pull Request: https://projects.blender.org/blender/blender/pulls/108858
This patch implements the Keying node for the realtime compositor. To
ease the implementation, some morphological operators were moved into
algorithms and a mechanism to steal data between results was added to
the Result class.
Pull Request: https://projects.blender.org/blender/blender/pulls/108393
Avoid BLI_strcpy_rlen use as this has the same problems as strcpy
(it just returned the length which is useful at times).
Use memcpy instead when the size is calculated immediately beforehand.
Other uses of have been replaced by BLI_string_join_array that prevents
buffer overruns by taking the destination buffer length.
The algorithm that transforms space from local normal to world space was incorrect.
The problem is only observed with Align Rotation to Target on objects
with shear transformation.
Also rename:
- `SCE_SNAP_MODE_FACE_NEAREST` to `SCE_SNAP_INDIVIDUAL_NEAREST`
- `SCE_SNAP_MODE_FACE_RAYCAST` to `SCE_SNAP_INDIVIDUAL_PROJECT`
And arrange the enums in numerical order.
This brings back the `Fill Volume` and `Exterior Bandwidth` inputs in
the Mesh to Volume node and modifier. Those existed in Blender 3.5 but
were removed in 700d168a5c because the way they were
implemented did not use the openvdb api in the right way.
While it's rare that people turned off the `Fill Volume` option, the
exterior bandwidth was used more and can have significant impact on
the result. Furthermore, there is no clear replacement for the
functionality.
Therefore, we decided to roll back the changes in 3.6 to avoid breaking
compatibility. We intend to keep the changes in 4.0 for now, but need
to work on a more clear short term replacement for the removed
functionality.
Pull Request: https://projects.blender.org/blender/blender/pulls/109297