The new/experimental, layered `Animation` data-block is merged with the
existing `bAction` data-block.
The `Animation` data-block is considerably newer than `bAction`, so the
supporting code that was written for it is also more modern. When moving
that code into `bAction`, I chose to keep the modernity where possible,
and thus some of the old code has been updated as well. Things like
preferring references over pointers.
The `Animation` data-block is now gone from DNA, the main database, etc.
As this was still an experimental feature, there is no versioning code
to convert any of that to Actions.
The DNA struct `bAction` now has a C++ wrapper `animrig::Action`, that
can be obtained via `some_action->wrap()`.
`animrig::Action` has functions `is_empty()`, `is_action_legacy()`, and
`is_action_layered()`. They **all** return `true` when the Action is
empty, as in that case none of the data that makes an action either
'legacy' or 'layered' is there.
The 'animation filtering' code (for showing things in the dope sheet,
graph editor, etc) that I wrote for `Animation` is intentionally kept
around. These types now target 'layered actions' and the
already-existing ones 'legacy actions'. A future PR may merge these two
together, but given how much work it was to add something new there, I'd
rather wait until the dust has settled on this commit.
There are plenty of variables (and some comments) named `anim` or
`animation` that now are of type `animrig::Action`. I haven't renamed
them all, to keep the noise level low in this commit (it's already big
enough). This can be done in a followup, non-functional PR.
Related task: #121355
Pull Request: https://projects.blender.org/blender/blender/pulls/121357
Reduce cognitive complexity by returning early in `BKE_pose_minmax()`.
Also rename `changed` to `found_pchan`, as that explains better what's
being tracked.
No functional changes.
Remove the `use_hidden` parameter of the `BKE_pose_minmax()` function.
This parameter was only used with `use_selected` set to the same value,
with the following effects:
- Both set to `true`: only selected bones are considered. Since hidden
bones are automatically deselected, this effectively excluded hidden
bones.
- Both set to `false`: explicitly excludes hidden bones.
So in both use cases hidden bones were ignored, which IMO is the correct
approach anyway, as the bounding box is used for centering in view,
snapping to bounding box, etc.
No functional changes.
Refactor `BKE_armature_min_max()` so that it calls `BKE_pose_minmax(ob,
use_hidden=false)`. The former took neither bone visibility nor custom
bone shapes into account when computing the bounding box. Now these two
are unified, fixing the regression.
`BKE_armature_min_max()` is now basically a thin wrapper that uses more
modern C++ types in its signature. This will be cleaned up in a
follow-up refactor commit.
Another difference is that these functions return the AABB in different
coordinate spaces (object vs. world). This isn't done entirely correctly
(just transforming the two extreme points), but in a way that is
symmetrical with `BKE_object_minmax()`.
Pull Request: https://projects.blender.org/blender/blender/pulls/121739
Make the `Object *` argument `const` in `BKE_pose_minmax()`. There is no
writing to the object to cache the bounding box, and that's now clear from
the declaration as well.
No functional changes.
Part of #121565.
Use the `get_drawing_at` function instead of reading the drawing indices.
This gets us closer to not exposing the drawing indices
at all.
This adds a light parameter to avoid near camera pixels
allocating too much shadow resolution.
This is more intuitive than the scale shadow setting and
allows reducing the precision without changing the look
of distant shadows.
For sun lights, the property sets the minimum pixel
size the shadow can contains. This allows to
remove a lot tilemap close up.
For local lights, there is another additional property
to set the maximum resolution in shadow space (like
EEVEE-Legacy) instead of in world space (like sun
lights). This allows making older files lighter and
allow a more conservative approach to resolution.
This add versionning code to handle EEVEE-Legacy files
that had fixed resolution per light type.
The resolution setting is always in world space distance
as the maximum shadow resolution distribution might change
in the future or be dependent on other parameters
(like beam angle). This ensure that there is no
dependency on these parameters, but make the
setting use very small units. But this is more of
a UI problem.
Pull Request: https://projects.blender.org/blender/blender/pulls/121701
Rename the `_defs_paint_grease_pencil` toolsystem definition to
`_defs_grease_pencil_paint` for consistency with other definitions,
like `_defs_grease_pencil_sculpt`.
Overlay engine extra layer can record draw list commands with an
empty index buffer. This would not affect any pixels and should be
ignored.
Issue detected when vulkan validation layers are turned on and loading
default scene.
Pull Request: https://projects.blender.org/blender/blender/pulls/121736
Previously this would be random, which makes the order in the asset
shelf unpredictable when duplicating an essentials brush asset and
keeping the same name.
Caused by 7ae77e61cd06069ad6517d2684acc487ea661cb6.
Opening files and templates would cause an assert to be hit in
debug mode.
For now, comment the assert out to temporarily fix the issue.
Follow the layout closer to the 3D Viewport overlays.
* Wider, to fit two-column layout and translations.
* Move general settings on top.
* Move strips-related overlays into their own subpanel.
* Move `Thumbnails` higher up so it's more easily reachable.
* Rename `F-Curves` to `Animation Curves`.
* Remove redundant labels.
* Gray out "Waveform Style" when set to Off.
Pull Request: https://projects.blender.org/blender/blender/pulls/121591
Blender already had the ability to sample the depth with an eyedropper
and fill the focus distance (see `"ui.eyedropper_depth"`). But this feature
was fairly hidden. You had to hover over the `focal_distance` property
in the camera data panel and then press `E` (then sample a distance
in the 3D viewport).
This patch adds a `prop_data_path` property to the `ui.eyedropper_depth`
operator to allow specifying the property that should be filled with the
depth value.
The idea for this is taken from `wm.radial_control`, which also uses this
approach to write to a property. This allows us to add the eyedropper
as a button.
Pull Request: https://projects.blender.org/blender/blender/pulls/121486
If a curve was not using U parameter range of 0..1, the importer
did not properly detect whether the "U endpoint" flag should
be set on it. Fixed that, along with test coverage for the case.
There is an implementation flaw in the render graph where local pointers
cannot be updated, but the data it refers to can be reallocated to
another location.
The cause of this is that the nodes use an union, which can only contain
simple constructed structs (eg memcpy). this union is stored in a vector
and can relocate the union. Any local pointers can (and will) become
invalid.
This PR is a quick fix by updating the pointers just before sending
them to the command buffer. In future a better fox needs to be done
as part of #121649.
Pull Request: https://projects.blender.org/blender/blender/pulls/121723
The render graph tests initialized a command buffer wrapper that
requires a working device. The wrapper was not used, but when
destructing it would try to deallocate the command buffer, which
cannot be done as that requires a working device as well.
This PR removes the unneeded command buffer wrappers in the test
cases.
Copy modules before filtering `addon_modules` to avoid
change of dictionnary size during iterations. Otherwise errors
can be triggerd when running `python -m pytest test.py` since
it may modify the module dict.
Co-authored-by: Alexis-19 <alexis-19@noreply.localhost>
Pull Request: https://projects.blender.org/blender/blender/pulls/121100
By adding NSURLBookmarkResolutionWithoutMounting to options to keep MacOS from attempting to mount shortcuts.
This addresses that blender hangs and crashes if there's a shortcut to a network drive that cannot be mounted at that time.
Pull Request: https://projects.blender.org/blender/blender/pulls/121673
Overlay texts were previously drawn with two sets of shadows:
- 3px blur,
- 5px blur, slightly offset
But since the shadow color was always set to black, it was still
causing legibility issues when the text itself was dark (set
via theme for example).
This PR adds a new "outline" BLF text decoration, and uses that
for the overlays. And it picks text/outline color depending
on the "background" color of the view.
Details:
- Instead of "shadow level" integer where the only valid options
are 0, 3 or 5, have a FontShadowType enum.
- Add a new FontShadowType::Outline enum entry, that does a 1px
outline by doing a 3x3 dilation in the font shader.
- BLF_draw_default_shadowed is changed to do outline, instead of
drawing the shadow twice.
- In the font shader, instead of encoding shadow type in signs of
the glyph_size, pass that as a "flags" vertex attribute. Put
font texture channel count into the same flags, so that the
vertex size stays the same.
- Well actually, vertex size becomes smaller by 4 bytes, since turns
out glyph_mode vertex attribute was not used for anything at all.
Images in the PR.
Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/121383
Result isn't consistent on Windows platform due to copying structs with arrays.
This is a quick fix and will be looked at next week. The code isn't used at this moment.
Pull Request: https://projects.blender.org/blender/blender/pulls/121670