Prior to this commit, Using the gesture Face Set operators on a mesh
that doesn't have the `.sculpt_face_set` attribute created would lead to
invalid data being written and ultimately a crash.
To fix this, use the `ensure_face_sets_bmesh` function.
This commit also ensures that the `find_next_available_id` function
doesn't return `1` for the next face set id for BMesh.
Pull Request: https://projects.blender.org/blender/blender/pulls/137492
When undoing dyntopo actions, we have a fast path where if the mask
layer was affected, we avoid a full depsgraph tagging and BVH rebuild.
This tagging was missing recalculating the overall node visibility
states, potentially preventing further brush strokes and actions from
working if they filtered out fully hidden nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/137502
We have separate drag movement thresholds, and one is specifically for
tablet pen movement. A movement is not considered a drag (when using
left click select) until this amount is detected. This PR decreases
that amount with pen pressure. This results in more immediate and
responsive behavior that feels quite natural. Whether using RCS or
LCS this also similarly reduces the lag when dragging on numerical
inputs and sliders.
Pull Request: https://projects.blender.org/blender/blender/pulls/136685
Since the changes that allow user select-able border widths our
calculation of minimum area heights is incorrect in that it does not
take into account border width. This PR improves this calculation so
that as you resize windows and areas none go below header height.
Pull Request: https://projects.blender.org/blender/blender/pulls/137498
This patch makes it so that the theme color is used for the
initial/loading Blender window background color. Unlike what
it may look like, theme settings are well loaded at this point
in the initialization process, which lets us directly use them
for coloring the window background instead of relying on a
default grey color.
This also makes the colored titlebar window decorations (introduced in
#123982 for macOS, #134054 for Windows 11), always blend with the window
instead of looking somewhat broken during window initialization. On the
technical side, this uses the top-bar header background theme color to
ensure this always matches with the color used by the colored titlebar.
Pull Request: https://projects.blender.org/blender/blender/pulls/137425
While testing some distortion options, I noticed that the Movie Distortion node
would crash when used with e.g. (0.0, 0.0, 0.5) as the lens parameters.
This appears to be caused by 00ee917fd. Turns out that even though the input was
512x384, the extended size ended up being around 600000x500000, which obviously
caused some issues.
Therefore, this patch a) clamps the margin to be at most as wide as the input
(so 9x the pixels in the worst case) and b) fixes the indexing calculations to
not overflow the int32 values in case the input is legitimately huge.
Pull Request: https://projects.blender.org/blender/blender/pulls/137440
On MacOS, while editing text in an input field, allow pressing Option+
Arrow to move to next word, Command+Arrow to move to beginning and end
of the string.
Pull Request: https://projects.blender.org/blender/blender/pulls/136904
This makes accessing these properties more convenient. Since we only ever have
const references to `CPPType`, there isn't really a benefit to using methods to
avoid mutation.
Pull Request: https://projects.blender.org/blender/blender/pulls/137482
While `ComputeContextBuilder` worked well for building simple linear compute
contexts, it was fairly limiting for all the slightly more complex cases where
an entire tree of compute contexts is built. Using `ComputeContextCache` that is
easier to do more explicitly. There were only very few cases where using
`ComputeContextBuilder` would have still helped a bit, but it's not really worth
keeping that abstraction around just for those few cases.
Pull Request: https://projects.blender.org/blender/blender/pulls/137370
Now, if no closure is connected to the Evaluate Closure node, it behaves like if
it is muted. Previously, all outputs were just defaulted and the inputs ignored,
but that's less useful.
Pull Request: https://projects.blender.org/blender/blender/pulls/137418
This unify the C++ and GLSL codebase style.
The GLSL types are still in the backend compatibility
layers to support python shaders. However, the C++
shader compilation layer doesn't have them to enforce
correct type usage.
Note that this is going to break pretty much all PRs
in flight that targets shader code.
Rel #137261
Pull Request: https://projects.blender.org/blender/blender/pulls/137369
As Relocate code temporarily removes some linked IDs from Main, this can
make collection hierarchy data invalid, in a way that will break
`BKE_main_collections_parent_relations_rebuild`.
For now, simply move that call outside of `BLO_library_link_end` and do
it after adding back all linked IDs to main.
Pull Request: https://projects.blender.org/blender/blender/pulls/135936
Relocation is the only case where old and new linked data may have
a different library. This makes remapping dependencies IDs for the
liboverrides that use these linked data somewhat more challenging and
complicated.
From basic tests with both simple data, and full production-level
Mikassa char, it seems to behave fairly well now.
So far it was only possible to relocate a whole library, now one can
also relocate a single linked ID (pulling in all of its dependencies).
This is essentially linking the new data, remapping local usages of the
old linked data to the new one, removing no more used IDs, and updating
liboverrides if needed.
Use `get_influence_vertex_weights` for thickness modifier. This returns
array of values 0 when group is empty (see `lookup_or_default`).
Function also controls the invert state for vertex group.
Pull Request: https://projects.blender.org/blender/blender/pulls/137455
This patch adds initial cursor support for the blade tool, with bitmaps
for 16x16, 24x24, and 32x32 cursors.
Additional Changes:
- Locked strips now show a "stop" icon when hovered over.
- Previously, the frame to split was truncated when clicking in between frames.
Now, round to the closest frame.
- Previously, the blade operator was able to select padded strip handles
outside of strip bounds. This bug has been resolved, so that selection with
the blade tool can only happen via box-select passthrough.
Pull Request: https://projects.blender.org/blender/blender/pulls/136749
This patch completely reworks the slip operator from the ground up,
reorganizing code to be simpler and adding more clarifying documentation.
Major Changes:
- Add modal keymap to the operator along with an interactive status bar.
- Show offset overlays to the left and right of strips whenever slipping.
- Add option to "clamp" slipped strips.
- Rework input to be accumulative, avoiding "jumps" when transitioning in/out
of precision mode.
Fixes:
- Properly draw header when initializing operator before any events have been
sent, and reorganize event flow so that all events have an immediate effect.
- Properly clamp subframe slips.
More information in PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/137072
Regression in [0] which incorrectly swapped the check for the
`use_scripts` property being set with the value it was set to.
Resolve this error as well as the "Recover Last" operator
which never worked.
[0]: 8c688a052c
Regression in [0], buffer overflow reading a short array as floats.
Support short array and fix glitch where the mouse cursor wasn't
included in the poly-line.
[0]: 9d4d1aea98
Previously, internal links used the same heuristics as most other nodes. However,
this is more problematic here, because I intend to use the same internal links
for the case when no closure is connected. The behavior in this case should not
change in the future if we decide to change the heuristic for internal links for
muted nodes.