This patch makes the internal functions for the pose library aware of action slots.
* Allows to apply poses with more than 1 slot.
* The slot is chosen based on a best guess, with a fallback to the first slot.
Not in this patch:
There is no straightforward way to create multi slot pose assets yet. That will come later.
It is possible to manually tag an action with more than 1 slot as an asset though.
When applying poses, only the active object is modified. Multi object editing support will come later.
Part of Design #131840
Pull Request: https://projects.blender.org/blender/blender/pulls/132161
Regression in [0] which re-introduced #2931.
Accessing environment variables must always null check the result.
Resolve by checking the result as well as replacing $HOME
access with a function that falls back to `passwd::pw_dir`.
Also add code-comments to to clarify the current behavior.
[0]: b308b360eb
In Outliner (View Layer mode) when filter "Collections" is off the icon
of the object mode overlaps with "arrow" icon (if "Show Mode Column" is
enabled). To fix this, add offset for this specific case and also when
"All View Layers" is off.
Pull Request: https://projects.blender.org/blender/blender/pulls/132339
Previously, in 4.2, the `has_face_set` method always returned `true` for
whether or not a given vert had a given face set with dyntopo enabled.
This logic was updated to be more complete in 4.3, but the fallback
logic for when a mesh didn't have any face set data was not.
To fix this, if the corresponding BMesh doesn't have the face set
attribute, we check whether or not thet requested face set is
`SCULPT_FACE_SET_NONE`
Pull Request: https://projects.blender.org/blender/blender/pulls/132523
Cleanup (and make slightly faster as a side effect) the way VSE effects
do multi-threading. Previously (some of them) were using
IMB_processor_apply_threaded with C-like machinery (which internally
uses a task pool), switch that over to a helper apply_effect_op
(which internally uses a parallel for). Based on profiling, parallel
for is slightly more efficient (task pool takes a bit until all the
tasks are "pushed" into the pool). Note however that some VSE effects
were already doing parallel for internally; these are not affected.
VSE scene at 4K resolution, with four 4K resolution PNG images blended
over each other, time it takes to do render_strip_stack:
- Ryzen 5950X (Win/VS2022): 38.9ms -> 34.7ms
- Mac M4 Max: 21.9ms -> 19.8ms
Now that all VSE effects are internally threaded via parallel for,
there's no need for the init_execution and execute_slice machinery,
so remove all that.
You might also notice that half of "over drop" effect code is gone.
It was accidentally not doing anything whatsoever for the last 18 years
(since 2.42), and currently observed behavior matches documentation
and "internet knowledge", so let's accept it as correct.
Pull Request: https://projects.blender.org/blender/blender/pulls/132380
The output node types were seemingly incorrect since the initial commit
and would produce incorrect MaterialX documents[1]. When MaterialX is
upgraded to 1.38.10 this will now fail material creation in Hydra.
Use the node type directly instead of setting things to their default
`color3` output type.
[1] See PR for an example.
Pull Request: https://projects.blender.org/blender/blender/pulls/132362
Caused by 84c7684871.
Previously we could count on adding the attributes to the result mesh
not failing. Now, since the vertex group names are copied, they might
fail because a name would cause the attribute to already exist with a
float type on the point domain, which might not match the most
complex domain/type we'd use otherwise.
The fix is to only create attributes as vertex groups if the domain and
type combination from all the input meshes is correct.
Pull Request: https://projects.blender.org/blender/blender/pulls/132506
With the goal of removing the type and custom data domain from
the attribute requests, tweak the order of the calls to ensure that
each vertex buffer is allocated until after we know about the source
mesh data format. After that, it makes more sense to have the loop
over BVH nodes inside each extraction function.
Pull Request: https://projects.blender.org/blender/blender/pulls/132467
Conversion from [0-1] float value ranges to [0-255] integer char ones
was left in Alembic importer, when the internal Blender storage for
these values was converted from a char in the old `MEdge` struct to a
regular float attribute.
Not entirely straightforward, some manual edits were done since when
this library was created, some of the work was already done.
- Remove any bf_imbuf_movie paths from INC
- Add a dependency though LIB when missing
- Add public dependency to bf_imbuf in bf_imbuf_movie since it uses the
imbuf headers in its public headers.
- Fix namespace not to have underscores
context: https://devtalk.blender.org/t/cmake-cleanup/30260
Pull Request: https://projects.blender.org/blender/blender/pulls/132407
This commit exposes the "Quality" option of the Open Image Denoiser
to the user for the denoise node in the compositor.
There are a few quality modes:
- High - Highest quality, but takes the longest to process.
- Balanced - Slightly lower quality, but usually halves
the processing time compared to High.
- Fast - Further reduce the quality, for a small increase in
speed over Balanced.
Along with that there is a `Follow Scene` option which will use the
quality set in the scene settings.
This allows users that have multiple denoise nodes
(E.g. For multi-pass denoising), to quickly switch all nodes between
different quality modes.
Performance (denoising time):
High: 13 seconds
Balanced: 6 seconds
Fast: 5 seconds
Test setup:
CPU: AMD Ryzen 9 5950X
Denoising a 3840x2160 render
---
Follow ups:
Ideally the "Denoise Nodes" UI panel in the render properties panel
would be hidden if the compositor setup does not contain any
denoise nodes.
However implementing this efficiently can be difficult and so it was
decided this task was outside the scope of this commit.
Pull Request: https://projects.blender.org/blender/blender/pulls/130252
Use window->tag_cursor_refresh rather than WM_cursor_set when changing
cursor for numerical inputs. This works better since this allows a
change directly to a region-specified cursor rather than always to
default first.
Pull Request: https://projects.blender.org/blender/blender/pulls/132185
This commit fixes a small bug where the macOS native titlebar file path
icon (often referred to as proxy icon) wouldn't be cleared when creating
a new blank file and would instead retain its previous state. This was
caused by the GHOST setPath() function being short-circuited by the
&& operator, since `has_filepath` was false. The GHOST WindowCocoa
setPath() function was also simplified to remove unneeded exception
handling.
Pull Request: https://projects.blender.org/blender/blender/pulls/132359
Part of #130975: split off overly large VSE effects.cc (almost 4000
lines) into separate source files. No behavior changes.
- Add / Subtract / Multiply all go into one source file,
- Blend Over / Blend Under / Over Drop / other blend modes all go
into one source file,
- Cross and Gamma Cross go into one source file,
- All others go into their own files.
Pull Request: https://projects.blender.org/blender/blender/pulls/132323
The compositor backdrop in certain files always have a size of 256x256
regardless of the actual size of the viewer image. That's because the
compositor writes its result to a different image buffer than the one
the image engine reads its image buffer from. And the image engine
assumes a default size of 256x256. The reason is a bit involved.
For non multi-view images, the image module uses the special cache index
value of IMA_NO_INDEX for the compositor backdrop, which works fine if
the image was detected as a non multi-view image in the first place.
However, this detection fails because the compositor may still write
multi-view images even for non multi-view renders.
In particular, before the compositor writes its viewer image, it ensures
correct views by calling BKE_image_ensure_viewer_views, which first
checks if we need to recreate the views of the viewer image if they
don't match the render views. And in the case of non multi-view image,
that check fails in one case.
Functions like BKE_image_is_multiview checks if a single unnamed view
exists in the image, unnamed being the keyword here. The root issue is
that BKE_image_ensure_viewer_views only checks that a single view
exists, while it should also check that it is unnamed. Which happens
when the user enabled multi-view, added only one view, then disabled
multi-view again.
To fix this, we add a check for the name of the view in case of non
multi-view images. And additionally pull the view matching code into its
own documented utility function for clarity.
Pull Request: https://projects.blender.org/blender/blender/pulls/132348
The Legacy Cryptomatte node asserts when its inputs are not valid,
that's because it is specialized for image inputs and invalid inputs are
single values. To fix this, make sure only valid Cryptomatte layers are
considered.
Caused by 580e0af309
The above commit fixed the condition that caused the hang in #128702 but
it also changed the `while` loop to a `do while`.
The do while loop executes the content of the loop once before checking
the condition of the while.
Whereas a while loop will check the condition first before executing the
content.
As a consequence, we could (falsely) enter the loop and return with a
(false) best direction.
To resolve, keep the check from 580e0af309 but go back to a `while`
loop (instead of the `do while).
Needs to go into 4.2 LTS
Pull Request: https://projects.blender.org/blender/blender/pulls/132270