While this is a rather fragile fix, the alternative also seems fragile.
We can instead check the operator name inside `push_begin_ex` to see if
the operator is transitioning into Sculpt Mode and initialize the
StepData.type to a custom "Mode Change" type instead of using "None"
Pull Request: https://projects.blender.org/blender/blender/pulls/124640
This commit adds SculptBoundaryPreview to reduce the scope of variables
that the SculptSession has access to when displaying the preview for
using the Boundary brush. Further changes in this area will be made once
more of the relevant flood_fill and boundary code is refactored.
In particular, the main algorithm does not need the edge position data.
Pull Request: https://projects.blender.org/blender/blender/pulls/124759
This fixes a few issues and clear up some confusion
in the code.
Note that this changes the behavior of render region;
they now reduce the internal render size. This is
matching the new design documentation.
- Data passes have correct accumulation.
- Adhere to naming conventions for extents, film and render pixels.
- Jitter over final pixels first before doing random sampling
in order to speed up convergence.
- Ensure enough sample to cover at least all the film pixels once.
- Always include the four neighbor pixels in case one is nearer.
- Fix projection matrix computation to align overscan pixels.
Pull Request: https://projects.blender.org/blender/blender/pulls/124735
EEVEE can bind layers of a texture that is also used as an attachment. When binding
the image layout of these specific layers can be different that the image layout of
the whole image.
This fixes the known synchronization issues inside EEVEE. wasp_bot, tree_creature and
wanderer scenes can be rendered without any synchronization issue reported by the
Vulkan validation layers.
Design task: #124214
When beginning to render the attachments are being evaluated. If there is an arrayed
texture (with multiple layers) the individual layers of that texture can be tracked
during until the rendering is ended.
When the same texture is bound to a shader it will be a different layer (otherwise
there is a feedback loop, which isn't allowed). The bound layers will typically need
a different layout the transition to the new layout is executed and recorded. When
the rendering ends, the layers are transitioned back to the layout the texture is
expected in.
It can happen that a layer is used multiple times during the same rendering. In
that case the rendering should be suspended to perform the transition. Image layout
transitions are not allowed during rendering.
There is one place where a layer needs to be transited multiple times that is when
EEVEE wants to extract the thickness from the shadow. The thickness is stored inside
the gbuffer_normal which is also used as an attachment. Eval then samples the thickness
from the gbuffer_normal as a sampler. To work around this issue we suspend the rendering
when a `GPU_BARRIER_SHADER_IMAGE_ACCESS` is signaled.
Pull Request: https://projects.blender.org/blender/blender/pulls/124407
Retiming draw order changes in d0cf4a4a8b accidentally broke VSE
thumbnails. The order of drawing became "for each strip: draw thumbnail,
draw retiming continuity".
But the "draw retiming" bit was changing the projection matrix, which
placed all the later thumbnails at nonsensical locations.
Fixup it so that:
- First all thumbnails are drawn, then all retiming continuities.
- Retiming continuity drawing sets up matrix just once, instead of
doing all that work for each strip.
- And it also restores the previous projection matrix after it is done.
- Also, can_draw_retiming now says "false" when no retiming keys are
present. Previously, code was going into possibly expensive drawing
setup for any strip, even when the is nothing to draw.
Pull Request: https://projects.blender.org/blender/blender/pulls/124780
When trying to delete keys from a layered action in the viewport
using ALT+I and no keyingset is set, no keys would be deleted.
That is because the code hasn't been updated to work with layered actions yet.
The fix is to check if the action is layered and iterate the
FCurves depending on how they are stored.
For this to work nicely I had to extract the function `delete_key_fcurve`.
Pull Request: https://projects.blender.org/blender/blender/pulls/124619
All the arrays in the new Action DNA are named singularly (`layer_array`,
`fcurve_array` etc). `channelbags_array` was the only plural one. For
consistency, this is now also singular.
Note that this is a backward-incompatible change, and will effectively
erase all animation from layered Actions. No effort is taken to handle this
rename as the feature is still in its experimental phase.
Action and slot assignments are not affected by this change.
Apart from the lack of backward compatibility, no functional changes are
expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/124768
If a strip had effect strips applied on it, and using the reset
retiming operator caused the strips to increase in length, the effect
strips would become overlapped with any strips they hit, unless the
"Expand" overlap mode was used.
This is because the "effect chain" strips weren't included
in #strips.
Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124750
This was originally fixed in 8ecccddf1c but for some reason
the merge to main didn't include those changes
merge commit: 2e03ca4a5b
The issue was that the wire width was not passed to the shader when using curve objects.
This PR is just the cherry picked changes from the original commit.
Pull Request: https://projects.blender.org/blender/blender/pulls/124774
For very small hotspot regions when trying to select handles on adjacent
strips, selection can sometimes jump to the strip farthest away from the
current mouse cursor position. This happens regardless of "Tweak
Handles" setting, but is most noticeable when it is off.
In the case that two strips are selected at once (which is possible
because internally strip handles are shifted away from the strip body by
a third of the handle size), `mouseover_strips_sorted_get` attempts to
sort these strips to maintain priority, but the logic was backwards --
fix the glitch by sorting strips such that the first strip in the
`Vector` is always the strip closest to the mouse cursor.
Pull Request: https://projects.blender.org/blender/blender/pulls/124708
Was using the old, not the modified name of the brush to build the brush
asset reference, that is used to identify the active brush asset.
The new brush was actually activated, but some of the UI like the asset
shelf would display it as such.
The fix contains two parts:
1. Grease Pencil v3 now stores stroke `init_time` as a float attribute,
it's not enough precisiton for unix timestamp. Now the time value is
truncated to allow better precision. It's still stored in seconds.
2. The previous logic for calculating stroke gap time of the build
modifier isn't correct, it used to only count two starting times as
gap time. Now it's fixed with correct delta time.
Pull Request: https://projects.blender.org/blender/blender/pulls/124350
MNEE tests were disabled on Metal due to the feature not being
supported in macOS < 13.
This commit enables MNEE tests on Metal GPUs if they are using
macOS >= 13, otherwise leave it disabled.
Pull Request: https://projects.blender.org/blender/blender/pulls/124709
The motivation is to be able to catch issues like #124705 early on,
by relying on asserts.
The not-so-obvious part of the change is the change in the order of
includes, which is needed for the types.h to have definition of the
kernel_assert().
Pull Request: https://projects.blender.org/blender/blender/pulls/124729
This commit removes the extra initial_pivot_position variable from
SculptBoundary as well as the PBVHVertRef in favor of a single float3.
This value is effectively const for the lifetime of the struct in the
current state, as this value is only calculated and used at the
beginning of the brush stroke.
Pull Request: https://projects.blender.org/blender/blender/pulls/124755
This commit replaces the PBVHVertRef with specific float3 positions for
the edges. To ensure data is displayed correctly, we also remove the
conditional check on updating this data when drawing the cursor to
force recaculating the edge positions on the start of every brush
stroke.
Pull Request: https://projects.blender.org/blender/blender/pulls/124754