Shortcut is actually assigned to the operator but inside wrong keymap
("Animation"). When "add shortcut" is invoked for a property within
side panel or properties tab, add the new keyitem to "User Interface"
keymap.
Pull Request: https://projects.blender.org/blender/blender/pulls/137080
Masks for scrollbars were properly shrunk to match their drawn
representation in #135021, however, click logic was not updated
alongside this change.
For one, `mouse_in_scroller_handle` incorrectly assumed that if the
slider filled up the entire scrollbar extents, we would only be able to
select the bar. This code never ran in practice since `scrollers` were
always smaller than their mask, but now that they're the right size,
it's being run. Fix by removing the case.
It is also guaranteed that the "scroller"/"bubble"/"thumb" is not out of
view of the scrollbar track itself because it is clamped at the end of
`view2d_scrollers_calc` (which always runs before
`mouse_in_scroller_handle`), so this is dead code that can be removed.
Finally, rename `mouse_in_scroller_handle` to `scrollbar_zone_get` to
better represent its function.
Pull Request: https://projects.blender.org/blender/blender/pulls/137437
This adds initial support for showing logged data in closures. This is more
tricky than the other zone types, because the zone content is evaluated
elsewhere. The main new thing here is a function that attempts to find where a
given closure is evaluated statically.
Finding this place statically is also important because we generally decide
which compute contexts we want to log before evaluation starts. That's because
we don't want to log everything (which is expensive), but just the places that
the user is currently looking at.
This also changed a bunch of CMakeLists.txt files so that these modules can
include NOD_* stuff, which is generally fine everywhere in editors code.
Pull Request: https://projects.blender.org/blender/blender/pulls/137403
Not sure why it was not done before... But it should be fine to
completely ignore the loopback relationships (mainly liboverride
hierarchy root pointers themselves, and owners of embedded and
shape key IDs) when handling hierarchies.
Quick tests on complex production cases here also showed no obvious
issue (or even change at all) with this tweak, so think it's safe to try
it out in main.
This make the shadow rays always multiply the lighting,
which can make renders with large light sources darker.
This bias introduced too many light leaking issues. And
these issues are made more visible since the introduction
of 410282e156.
Its first use was to avoid self shadowing artifacts from
large light sources. Since the shading was already
integrated over the visible hemisphere, it made sense
that the shadowing was also in the visible hemisphere.
However this only works if the shading is actually
clipped to the visible hemisphere above the geometric
normal, which might not always be the case.
Given it is better to have self shadowing noise than
light leaking, it is better to just removing this trick.
Self shadow noise can be mitigated by increasing the
sample count or by increasing the terminator bias.
Light leaking, on the other hand, has no known workaround.
Fix#136594
Pull Request: https://projects.blender.org/blender/blender/pulls/137485
This adds a simple `compute_context_for_edittree` function that returns the
"active" compute context for the given node editor. This is used in various
places, but previously one had to construct the compute context in multiple
steps (first find the root context (modifier/operator), then handle the tree
path). Since the edittree already has a specific active context, there should be
an easy way to retrieve that.
This also adds a few extra check that avoid redundant work that was done before.
Pull Request: https://projects.blender.org/blender/blender/pulls/137525
Seems that this was a fundamental design problem that was resolved
with 3b6ee8cee7.
Since the vertex group names are stored on the mesh now, we can
just store their state in the undo mesh, and restore it when decoding
an undo step.
Pull Request: https://projects.blender.org/blender/blender/pulls/137225
Creating f-curves one by one is quadratic complexity due to:
1) scanning all existing f-curves for possible name+index duplicates,
2) channelbag invariants recalculation after each f-curve addition.
3) f-curve array storage is reallocated for each f-curve addition.
In cases when many f-curves are created at once (primary case:
importing an animated character), using the newly added
fcurve_create_many is much faster, because it:
1) uses a hashtable for duplicate name+index checking, instead of
linear scan, and
2) recalculates channelbag invariants just once.
3) does f-curve array reallocation just once.
Importing USD file exported out of Blender Studio "Rain Restaurant"
scene (about 20k f-curves), on Ryzen 5950X goes 2.0 sec -> 0.9 sec.
Pull Request: https://projects.blender.org/blender/blender/pulls/137004
Every call to BM_faces_join and BM_faces_join_pair has been adjusted to
provide the new face pointer, and a BLI_assert_msg has been added so
that doubles are now consistently identified and flagged as a problem.
BM_faces_join is now also capable of automatically reusing a double
when it is found. This new behavior is currently unused at this point.
Future patch-sets will begin to use it, allowing simplification of
calling functions.
Ref: !137406
Boolean sockets were not handled in shader nodes, so they were assigned
a NONE GPU type which causes crashes later on. No such sockets exist
yet, so this is a fix for future work.
With the move to the new snapping system,
the snapping flags were no longer stored on the editor but on the scene.
While that is good for all editors that deal with animation,
it also affected the Driver Editor since that is effectively a Graph Editor.
However since the driver editor doesn't deal with frames,
it is unlikely that settings should be shared with other animation editors.
With this PR the Driver Editor gets it's own snapping flag,
which means snapping can be controlled without affecting
other animation editors.
This also removes snapping options
* Snap to markers doesn't make sense, there are no markers in drivers
* Snap to seconds also makes no sense
Only snap to frames, i.e. whole numbers is kept with the option
to snap directly to whole numbers or offset the current position
by a whole number.
Pull Request: https://projects.blender.org/blender/blender/pulls/136826
Descriptor pools were never discarded, leading to out of memory issues
when running for a long time. This PR discards used descriptor pool when
the render graph is submitted to the device.
- Detected that to descriptor sets could be uploaded multiple times
however once was always empty.
- When render graph is flushed all descriptor pools are discarded.
- Improved debugging of discard pools.
Pull Request: https://projects.blender.org/blender/blender/pulls/137521
The pose mode Select Mirrored operator now keeps bones selected when
they cannot be mirrored.
This means that you can now select the spine and the left arm, mirror
the selection, and it'll have the spine and the right arm selected.
Before this change, all non-mirrorable bones (like the spine) would
always get deselected.
I also snuck in a little bugfix, where locked-for-selection bones could
still get selected.
Pull Request: https://projects.blender.org/blender/blender/pulls/136836
A few smaller cleanups to the pose mode Select Mirror operator.
- Don't store flags in a `void *` on the pose channel, but just use a
map to store the pre-mirroring selection flags.
- Instead of checking the `extend` flag for every bone, use two
functions to either add to the selection or set the selection, and use
the 'extend' flag to choose between those once.
- Flip some conditions and use `continue` to reduce cognitive
complexity.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/136836
Do this only when applicable.
This allow better compile time checking in Shader C++ compilation.
Moreover, this allows to have `constexpr` in shared code between
C++ and GLSL.
After investigation the `const` keyword in GLSL has the same
semantic than C/C++.
Rel #137333 and #137446
Pull Request: https://projects.blender.org/blender/blender/pulls/137497
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