Caused by using timeline frame instead of frame index as argument for
`seq_retiming_evaluate()` in `claculate_speed_table_from_seq()`.
This bug only affected speed transitions in sound strips.
`RetimingRangeData` also incorrectly interpreted segment type after
transition end, which would not cause issues, but was incorrect.
This PR ensures the ClosureLightStack is only accessed
with constant indices. This reduces compiler spill and allows
furhter constant folding, improving the deferred lighting
evaluation performance by 30%.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/121124
BLF_buffer was trying to accept "how many colors channels in output
image?" argument and doing math with it, but in the lowest level code
was always writing out full 4 channels for each pixel.
All the call sites would ever call it with argument of 4 however, and
that is why no one noticed the issue.
Pull Request: https://projects.blender.org/blender/blender/pulls/121630
This implements removing of groups and adds an operator
`GREASE_PENCIL_OT_layer_group_remove`.
Groups can be removed in two ways:
* Remove the group and keep the children.
* Remove the group together with all its children.
Based on an earlier attempt by @PratikPB2123 here: !121611
Pull Request: https://projects.blender.org/blender/blender/pulls/121663
New drag type `WM_DRAG_GREASE_PENCIL_GROUP` introduced for layer group nodes.
Replaced layer struct with `GreasePencilLayerTreeNode` in `wmDragGreasePencilLayer`
so group node can be stored while dragging in `wmdrag->poin`.
Using `can_drop()`, drop operation of layer group node returns `false`
if the target node is its child.
Part of #121390.
Pull Request: https://projects.blender.org/blender/blender/pulls/121654
This allows to expose these settings in the Performance panel in the
render buttons. Also moves compositor-specific options away from the
generic node tree structure.
For the backwards-compatibility the options are still present in the
DNA for the bNodeTree. This is to minimize the impact on the Studio
which has used the GPU compositor for a while now. They can be
removed in a future release.
There is no functional changes expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/121583
This adds the functions `has_active_group` and `get_active_group`,
similar to the `has_active_layer` and `get_active_layer` ones.
Also refactors some of the code to use these new functions instead.
PR #121478 added options for blurred shadows and text outline for text strips.
However since text strips produce an image that is size of the "whole screen",
applying large blurs or wide outline on that is quite costly.
Make both blur and outline calculations only be performed on the text bounds
(offset and expanded as needed to take into account blur/outline width).
On Windows/VS2022/Ryzen5950X machine, with 4K VSE resolution, and text strip
that takes about 900x400 pixels on screen, applying blur 0.4 and outline 0.25,
time to render the text strip goes from 470ms down to 35ms.
Pull Request: https://projects.blender.org/blender/blender/pulls/121644
Make the preview window translate/grab too round the resulting strip positions
to integer pixels. Resulting strip will more often end up using faster
interpolation (without bilinear), and avoids "text edges are too dark"
artifacts with light text strips on light backgrounds.
The latter happens because bilinear filtering does not do full alpha
premultiplication, so a text strip pixel that is just outside the glyph ends up
being (0,0,0,0) which under bilinear filtering sneaks in a dark color into the
glyph edge.
Example images in PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/121652
This moves the responsibility for handling the "Only Insert Needed"
flag from `insert_keyframe_value()` to the lower-level function
`insert_vert_fcurve()`.
We're doing this because `insert_vert_fcurve()` is the common entry
point between the new animation system's and old animation system's
keyframing code. This therefore ensures that both systems will
behave the same way with respect to the "Only Insert Needed" flag.
Pull Request: https://projects.blender.org/blender/blender/pulls/121525
When keying custom properties that are defined by an addon,
you can't use square brackets. The GUI buttons already reflect that.
The baking code and the keyframe insertion code didn't respect
that and so were able to key properties that are defined as non-keyable.
## Solutions
I've solved the issue on the C++ side by resolving
the path twice, once without and in case that didn't work the
second time with brackets. While that does solve the issue
this feels really dirty and I feel like I am misusing the system here.
**However it is absolutely needed**.
When resolving a path with brackets to a property defined
by an addon, you get an `IDProperty` disguised as a `PropertyRNA`
which will not have the correct flags set.
By checking if a property `is_animatable` in python, all that do not have that can be skipped.
Also making sure the path is passed without brackets in the correct cases.
Pull Request: https://projects.blender.org/blender/blender/pulls/121520
Both `autokeyframe_object()` and `autokeyframe_pose_channel()` had an
odd structure where they would call completely different keying
functions depending on whether "Only Insert Available" was toggled on
or not. This not only overcomplicated the code, but also introduced
the possibility for divergent keyframing behavior depending on whether
that flag was set or not, beyond the intended effect of the flag.
This commit changes both functions to call the same keyframing function
(which already handles that flag correctly on its own) regardless of
whether that flag is set or not, unifying the keyframing behavior and
simplifying the code.
As a happy side effect, auto-keyframing failures are now reported even
when "Only Insert Available" is disabled, which wasn't the case before.
(An example of the aforementioned unintentional divergent behavior.)
Pull Request: https://projects.blender.org/blender/blender/pulls/121476
The flag for "Only Key Available" was weirdly omitted from the flags
returned by `get_autokey_flags()`, always being set to false. This
happens to be okay at the places the function is currently used, but
it is unexpected and a likely footgun for future changes to the code
that uses it.
While `do_versions_after_setup` does more than what was previously done
by link/append code (essentially also handles pre-2.50 IPO and sound
proxy conversions), there is no real fundamental reasons to not use it
in linking code.
The IPO and sound proxy conversion codes are likely fully broken for
linked data - but they should then be removed or fixed, since they will
be applied on linked data in blendfile reading case anyway.
And in general, versioning should 'just work' the same when loading a
whole blendfile, or linking some data from a library. Keeping things
separate only makes it harder to work with, and easier to hide issues
with linked data.
While `BKE_blendfile_link` is used in both cases, there is a small
subset of its code only executed in linking case. It now lives into its
own util function, for clarity.
There should be absolutely no functional change in this commit.
Handling of the blendfile handle freeing when linking data from a
blendfile requiring endianness conversion was totally broken, leading
to double-freeing attempts.
Guess that the fact that this was never reported shows how rare
'big-endian' blendfiles are nowadays... But we still have a few in our
test repo.
Adds support for clear attachments to the render graph.
Clearing attachments require that the command buffer is
being set for rendering (vkCmdBeginRendering).
**What works**
- Clear attachments are working with dynamic rendering and the render graph
- `GPUVulkanTest.framebuffer_clear_color_single_attachment`
- `GPUVulkanTest.framebuffer_clear_color_multiple_attachments`
- `GPUVulkanTest.framebuffer_clear_multiple_color_multiple_attachments`
- `GPUVulkanTest.framebuffer_scissor_test`
- `GPUVulkanTest.framebuffer_clear_depth`
**What still needs to be addressed**
When a command buffer is rendering it cannot do any pipeline
barriers. For clearing attachments this isn't needed, but when
we address drawing we might need to register drawing resource
dependencies to the dependency list of the begin rendering node.
This will be solved when drawing will be implemented. [#121648]
The begin rendering node is large as it has to store data for
framebuffers with 8 color attachments as well. This might
become an overhead and we could solve this by splicing the
data of larger nodes into 2 lists. This will be addressed
after we are able to draw a screen so we can collect data
on this topic. [#121649]
Pull Request: https://projects.blender.org/blender/blender/pulls/121073
Sets missing context menu region in popovers that is required to handle drag collapse
event.
Also fix layout panel header but events handling.
| Main | Fix |
| -------- | -------- |
| <video src="/attachments/03409a9f-751d-4b4c-b464-d62a65b9b477" title="2024-05-08 12-21-14.mp4" controls></video> | <video src="/attachments/a50be151-8d5e-485d-bc47-3e2c7292c063" title="2024-05-08 12-18-08.mp4" controls></video> |
Pull Request: https://projects.blender.org/blender/blender/pulls/121594
This function returned the duration in frames for a keyframe, but
for keyframes that are implicitly held until the next keyframe,
it makes more sense to return 0.
For `insert_frame` a duration of 0 also creates an implicit hold
so this is more consistent with this API and removes a few checks
elsewhere.
EEVEE-Next world volume are infinite like Cycles. EEVEE-Classic world volumes
end at the clip_end of the camera/viewport. This can lead to confusion as
it would render different then expected.
This PR adds an operator to convert a world volume into a mesh volume. The
operator can be found in the shader editor (world mode) and in the properties
panel/World/Volume.
**Why an operator?**
As this alters the content of the scene we want the artist to be in control of
the conversion. Doing it automatic lead to a lot of complexity and cases that
might not be expected by the user.
Pull Request: https://projects.blender.org/blender/blender/pulls/119734
Debug crash when undoing the selection of layer group. `active_node`
points to garbage memory in this case.
In release mode, undo does not select the group due to missing
`should_be_active`.
Noticed this during !121611
Pull Request: https://projects.blender.org/blender/blender/pulls/121615
The code didn't check if the `bezt` property on `FCurve`s is `null`,
which it can be when it has been turned into samples.
Also fix an out of bounds error on `bezt` access
Pull Request: https://projects.blender.org/blender/blender/pulls/121650
I missed some review comments in #120428 that were relevant to the
split-off PR #121517 that recently landed, so am addressing those
comments now as a separate commit:
- Some of the test cases were unnecessarily using ASSERT, and are
better expressed with EXPECT.
- One of the test-case failure messages needed to be re-wrapped.
Pull Request: https://projects.blender.org/blender/blender/pulls/121528
Currently the image layout was fixed when creating pipeline barriers.
This PR determined the image layout an image is in based on its access
mask.
This extends the usage of the render graph and its pipeline barrier
generation for render attachments. In future it can be extended to
support other layouts.
Pull Request: https://projects.blender.org/blender/blender/pulls/121646
In the near future the legacy framebuffer/renderpass/pipeline drawing
will be replaced by dynamic rendering. Dynamic rendering provide a
flexible API to reuse pipelines between framebuffers if they share
the same image formats.
Dynamic rendering is provided by `VK_KHR_dynamic_rendering` extension
and is supported by all platforms we support (Intel since HD4000, NVIDIA
since 700, AMD since GCN2 and llvmpipe).
Functions provided by extensions are loaded in a struct inside
`VKDevice`.
Pull Request: https://projects.blender.org/blender/blender/pulls/121642
Instead of using "box" layouts for these import/export operators, use
panels instead.
Motivation for doing so is two fold.
Firstly the use of panels instead of boxes is more consistent with other
parts of Blender and with other IO addons implemented in Python (FBX,
glTF, 3ds, etc.)
Secondly, in the case of an Import invoked from drag-n-drop or Export
configured on a Collection, the large number of options often exposed
results in very long layouts. Panels allow us to close some sections by
default and allows the user to open/close panels based on their own
needs in general.
Along the way some effort went into standardizing the layout and wording
used as much as possible.
USD is a bigger change and requires some additional coordination. It
will be submitted and reviewed separately.
Pull Request: https://projects.blender.org/blender/blender/pulls/121557
When exporters use layout panels, it was possible for their panel ids to
conflict if more than 1 of the same exporter was configured on the same
collection. The result would be that opening/closing a panel in one
exporter would open/close it for all other exporters of the same type.
This fix changes the layout to avoid the issue entirely by using a list
and only having only one exporter drawn at a time.
A few alternate designs were considered but they would either cause
intrusive changes to each location where a layout panel was used or
would result in tricky disambiguation code inside the UI system itself.
Pull Request: https://projects.blender.org/blender/blender/pulls/121555
Now the Transform Geometry node either has individual components (location,
rotation and scale) or a matrix as input. In many cases that is just more
convenient when working with matrices. Often this is identical to splitting
the matrix into it's individual components. However, if the matrix contains
shearing, information is lost when splitting it into individual components.
Pull Request: https://projects.blender.org/blender/blender/pulls/121438
This PR ensures that the .sculpt_face_set attribute is created on the
mesh before a Trim operation is applied to it in Sculpt Mode.
Pull Request: #121604
The function `cdf_invert` was not doing linear interpolation
between the correct values. This fixes the issue and
make sure that `x` is never perfectly 0 nor 1.
Fixes#117755
Disabling tile_copy method for shadow update for
stability in scenes with large geometry counts
which may exceed parameter buffer size.
This pass can be re-used in future if the workload
distribution for shadow updates is changed to
better suit this method.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/121623