* Handle the case where `drawing_array_num` is 0.
* Reset the pointer of the active node (because it is no longer valid)
* Cleanup copy-paste error in docstring
Blender crashes when viewing invalid images in the compositor. That's
because cached images will not be null, but will be unallocated, so to
fix this, we check allocation status as well as nullptr in the image
node.
Getting the active tool from context doesn't work exactly when executed
from the properties editor, which shows the active tool settings of the
3D view. Make the brush tool code fallback to the active tool from the
3D view, so it can be called from the properties.
Users of the layered Actions API should never mutate the data via these
spans, and so the functions should always return just a `Span<>`.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/128264
Instead of `Geometry`, the fallback name is now `(Geometry)`. The goal is to
make it more obvious that this is not the actual name, but just a fallback. With
some luck it also motivates people to use better custom names.
The same thing is done for grease pencil layer names.
Pull Request: https://projects.blender.org/blender/blender/pulls/128207
This makes link-drag-search more convenient when one wants to insert a new node
between existing nodes. The change currently also affects normal node-insertion
when dragging it. The exact behavior still has to be figured out.
Pull Request: https://projects.blender.org/blender/blender/pulls/128197
Handle the case separately when end points of strokes are selected.
Always deselect them (i.e. set "true", later array values are inverted)
when executing select less operation.
Pull Request: https://projects.blender.org/blender/blender/pulls/126591
When auto key is enabled, add keys to all layers in sculpt mode.
After 37458329e2, `ensure_active_keyframe` accepts layer argument. Run
a loop over all the layers, call above function to handle keyframe/drawing at
current frame.
Resolves#127650.
Pull Request: https://projects.blender.org/blender/blender/pulls/127849
Pipeline pool could log to much information that confused developers who
are not up to date what pipelines are. This PR will hide the confusing
messages. When working on Vulkan these messages can still be shown by
raising the log level.
See !128254
Pull Request: https://projects.blender.org/blender/blender/pulls/128352
This rare GPU has z-fighting issues in editor mode. Might be fixable by
changing the bias, but would decrease precision on other platforms as
well. Better to move this GPU to limited support. It is working, just
has some drawing artifacts.
See #128179
Pull Request: https://projects.blender.org/blender/blender/pulls/128351
The meshes custom data-mask edit-mode check only considered the object
in edit-mode if it was the active object. This isn't correct as multiple
objects can be in edit-mode at once.
The potential for `mesh_get_eval_deform` to leak memory remains,
this just avoids an unnecessary mesh re-generation on selection
(which was causing the leak), see: !128228 for details.
Brushes that restored from undo step data on every brush
iteration triggered a performance regression because of
missing filtering of unchanged nodes after recent changes
to the PBVH dirty positions tagging system. There was a
TODO comment left from 76c322047e that
I had forgotten about.
Part of #118145.
Prior to this commit, for each node that a brush step affected, we would
look up the `.sculpt_mask` and `.hide_vert` attributes. To avoid this
overhead, this commit creates a helper struct to hold commonly used
attributes and reduces the frequency that they are accessed.
Pull Request: https://projects.blender.org/blender/blender/pulls/128286
The 'Closest' 'Snap With' option does not work well with 'Snap to Grid'
due to the unpredictable nature of this 'Snap With' option. That's why
another option is used in this case.
The option chosen in this case is the same one that was used in
'Absolute Grid Snap', that is, 'Median'.
Fixes incorrect usage of StringRef in new grease pencil code, where
`.data()` was passed as a null terminated C string. Removes the now
unnecessary `std::string` creation that attribute accessors used to
fix that problem.
Pull Request: https://projects.blender.org/blender/blender/pulls/128298
Part of #118145.
This PR introduces a number of helper methods used across the brush
implementations to reduce duplication when calculating a base value for
the `factors` array.
Not all brushes have been ported to use these helper methods - a
conservative approach was taken to avoid adding complexity for the
common case.
Pull Request: https://projects.blender.org/blender/blender/pulls/128235
When attempting to cache a generated image, the ImageFormatData's
view_settings would inadvertently be leaked due to the settings being
assigned a different set of values without first being free'd.
Additionally, there was another missed free from an early return a bit
later in the same function.
Pull Request: https://projects.blender.org/blender/blender/pulls/128229