After #122672 landed, slots other than the the slot for the currently active
ID became accessible from the Action Editor. However, the code for inserting
keys directly in the Action Editor assumed that the ID being keyed was
always the active one. This made inserting keys on slots other than the slot
for the active ID fail because the RNA paths wouldn't resolve for that ID.
Additionally, even if they did resolve (e.g. if the ID type was the same), the
keying code would use the wrong ID anyway, which would result in unexpected
behavior regardless.
This commit fixes this by looking up an ID that actually uses the given slot,
and using that ID to perform the keying.
Note that there are various corner cases that have to be handled, such as when
there is more than one user of a slot (and none of them are the active ID),
which makes the choice ambiguous, or when there are no users of a slot. We
handle these corner cases by simply keying the fcurves directly, rather than
going through the normal keyframing code paths. This means that in those corner
cases the value of the property in the scene is ignored, and the fcurve is
simply keyed with whatever value the fcurve evaluates to on that frame. We may
revisit this in the future if this fallback behavior turns out to not feel good
to users in practice, but for now it seems like a reasonable solution.
Pull Request: https://projects.blender.org/blender/blender/pulls/124227
Caused by 9f90594db7
`func_argN_copy_fn` is assigned when `UI_but/block_funcN_set` is used.
In case of `ui_but_new`, it is uninitialized. Use block's callback
for but if `block/but->func_argN` exists.
Pull Request: https://projects.blender.org/blender/blender/pulls/124388
The option on NLA strips "Sync Length" (in the Action Clip dropdown of the N panel)
stops keys from being inserted if it is disabled.
This is due to the evaluation mode of the strip, which is set
to "Hold" internally but ONLY IF "Sync Length" is enabled.
Removing that condition allows to key in tweak mode regardless of that setting.
## History
This has been put in place by 89ee260ef2
Judging by the commit description, this was put in place to allow keyframing
in tweak mode. However, no explanation is given why this is only allowed
with "Sync Length" enabled. Potentially because there was no special
handling of tweak strips for keying evaluation, which has been put in
place later. (09709a7e64)
Pull Request: https://projects.blender.org/blender/blender/pulls/123902
Using a REGEX on an absolute path may not work reliably without
escaping the path. Remove the exclusion as these paths are no longer
part of Blender's sources.
If some developers happen to have these directories it's harmless as
they won't be used.
Uses the OpenXR extension XR_FB_PASSTHROUGH_EXTENSION_NAME,
compatible mainly with the Meta Quest family of devices.
Currently, passthrough support over OpenXR is disabled by default
in the Quest Link app, and must be manually enabled in its settings
to use this feature.
The performance of the passthrough render varies with the quality
of the connection between the headset and the PC. For better results,
connecting the headset directly through USB to the PC, or at least
connecting the PC to the local network over ethernet, is recommended.
Thanks a lot to [KISKA](https://kiska.com/)
for their support in the development of this feature.
Pull Request: https://projects.blender.org/blender/blender/pulls/124204
Also refactor definitions into a macro as they were exceeding the
line-length and wrapping.
Ref: !124275
Co-authored-by: Nathan Burnham <nathan@nathanburnham.uk>
When keys are realized, strip handle positions are used to ensure, that
left and right key exists. If strip content is offset to the right,
this caused crash. This happened, because `SEQ_retiming_add_key()`
clamped timeline frame to strip content only on right side.
Clamp timeline frame to strip content on both sides.
Pull Request: https://projects.blender.org/blender/blender/pulls/124207
The button's callback function argument "free function" needs to be
copied along with the resource itself. We used to just call MEM_freeN
in this case, now we call the dedicated deallocation function which
supports non-trivial types.
Caused by 9f90594db7.
Similar to:
- c93767a8b4
- 851505752f
Those commits didn't apply to the smoothing brushes. Now all refactored
brushes use the new code structure. This commit includes utilities for averaging
neighboring mask and position values which will be used by the mask and mesh
filters in future commits.
Pull Request: https://projects.blender.org/blender/blender/pulls/124371
When a mesh is shared between multiple objects, sculpting with a brush
with the Curve stroke type doesnt update normal values for the affected
nodes when using PBVH drawing. This is because when reevaluating the
depsgraph for the objects, the shared PBVH is destroyed and the nodes
are recalculated, losing the existing node flag updates.
This only occurs for the Curve stroke type because all of its stroke
steps are performed within a single call to the overall operator when
the user presses enter, unlike other brush strokes which apply on each
mouse movement.
To fix this, we simply force update the normals before destroying the
PBVH at the end of the stroke step.
Pull Request: https://projects.blender.org/blender/blender/pulls/124268
- Sort add menu alphabetically
- Use forward declaration for GeometrySet again
- Use `this->` to access class methods
- Use `MEM_cnew`
- Fix typo
- Pass Span by value
- Pass MutableSpan instead of Vector &
- Remove unnecessary whitespace
- Use `BLI_SCOPED_DEFER` for freeing non-RAII objects
- Use `is_empty()` instead of `size() == 0`
- Use `GeometrySet::from_mesh` ability to handle null argument
Add a node similar to the STL import node (d1455c4138) that
imports OBJ files, including both meshes and curves. The output consists
of a geometry instance for each mesh/curve in the file.
There are a few improvements to address in the future: Currently the node
has no inputs besides the file path. Options may be exposed in the future.
Materials are also not imported yet, because creating material data-blocks
during evaluation may not be trivial.
This is part of a GSoC project:
https://devtalk.blender.org/t/gsoc-2024-geometry-nodes-file-import-nodes/34482
Pull Request: https://projects.blender.org/blender/blender/pulls/123967
This is due to missing rebuild of outliner tree. Auto smooth operator
is cleared with shade flat execution but outliner is unaware of this and
the modifier tree element remains intact. This add a notifier.
Pull Request: https://projects.blender.org/blender/blender/pulls/124330
SHift-X sets the color value directly, bypassing clamping done
on the RNA level. The color picker uses RNA setter to assign
colors, which enforces limits.
This change makes it so the 0..1 is an UI range, but allows to
manually type in values above that. This is similar to colors
in the node trees, but a bit more conservative by using UI range
explicitly.
Thanks Omar for identifying the root cause of where the clamping
is coming from!
Pull Request: https://projects.blender.org/blender/blender/pulls/124355
Prevent crash from a mesh created around the time of Blender 4.0 with
bad (negative) material indices on some faces.
The Poly Haven folks were poked to fix the actual asset as well but it's
simple enough for us to clamp in this code path, especially since we
were already doing it for the upper bound.
Pull Request: https://projects.blender.org/blender/blender/pulls/124026
Renames "Sculpt Tool", "Vertex Paint Tool", ... to "Brush Type" in all cases.
The name "tool" is overloaded, plus, there actually is a "Brush Tool" now. As a
follow up to the assets project merge we can rename this in C++, added this
to #116337 and opened #124201. At least rename it in the UI for a start.
Pull request: https://projects.blender.org/blender/blender/pulls/124203
This is the main merge commit of the brush assets project. The previous
commits did some preparing changes, more tweaks are in the following commits.
Also, a lot of the more general work was already merged into the main branch
over the last two years.
With the new design, quite some things can be removed/replaced:
- There's a unified "Brush" tool now, brush based tools and all special
handling is removed.
- Old tool and brush icons are unsed now, and their initialization code
removed here. That means they draw as blank now, and the icon files can be
removed in a follow up.
- Creation of default brushes is unnecessary since brushes are now bundled in
the Essentials asset library. Icons/previews are handled as standard asset
previews.
- Grease pencil eraser options are replaced by a general default eraser brush
that can be set by the user.
More changes are planned still, see task list issue below.
Main Authors: Bastien Montagne, Brecht Van Lommel, Hans Goudey, Julian Eisel
Additionally involved on the design: Dalai Felinto, Julien Kaspar
Blog Post: https://code.blender.org/2024/07/brush-assets-is-out/
Tasks:
https://projects.blender.org/blender/blender/issues/116337
Reviewed incrementally as part of the brush assets project, see:
https://projects.blender.org/blender/blender/pulls/106303
Turns the asset shelf into a popover which reduces some of the special
handling. An operator `WM_OT_call_asset_shelf_popover()` (similar to
`WM_OT_call_panel()`) is added to be able to call the popover from shortcuts.
Exactly this was an important aspect for the brush assets project, to allow
quick searching for brushes from the popup.
A custom shortcut can be added to asset shelf popovers using "Assign Shortcut"
in the context menu of buttons invoking it.
The popover is spawned with the mouse hovering the first asset and the search
button active using "semi modal" handling. That means while the popover is
open, any text input is captured by the search button, while the rest of the
popover stays interactive. So for example navigating through asset catalogs is
possible, a single click activates an asset and closes the popover.
Reviewed as part of the asset shelf project, see:
- https://projects.blender.org/blender/blender/issues/116337
- https://projects.blender.org/blender/blender/pulls/106303
When opening the popup to select the asset catalogs to show as tabs in the
asset shelf, it's annoying that they would collapse back to the root level
every time. This would mean users have to manually uncollapse a bunch of
catalogs every time they call the popup. Since this is a popup, we don't need
to be too careful about saving space. And in practice these catalog trees are
usually rather small anyway. So simply uncollapse the first few levels of
catalogs.
Part of the brush assets project, see:
- https://projects.blender.org/blender/blender/issues/116337
- https://projects.blender.org/blender/blender/pulls/106303