This patch specializes the symmetric separable variable size blur code
for different types. Additionally, now-unused generic type functions
were removed, and unused GPU specialization was removed since they are
no longer free due to CPU support. Gives a 2x improvement.
This patch specializes the symmetric separable blur code for different
types. Additionally, now-unused generic type functions were removed, and
unused float2 specialization was removed since it is no longer free due
to CPU support. Gives a 2x improvement.
Line Art modifier `runtime->object_dependencies` can be empty when first
loaded, this can be triggered when loading as library overrides. This
fix guards this kind of situation.
Pull Request: https://projects.blender.org/blender/blender/pulls/131591
The string `msl_patch_default` can have been read
partially uninitialized or initialized multiple
time and read uncomplete during multithreaded
compilation.
This should fix the GPU tests randomly failing on mac.
While this would never fail when blender runs from the UI (since
UI shaders are init in single threaded manner and always compile
before EEVEE shaders), this race condition could happen when running
EEVEE through background rendering or running tests.
Pull Request: https://projects.blender.org/blender/blender/pulls/131580
It was pointed out that the notification added in #131406 was incorrect
as it added a notification for an intended area rather than the type
of change. This adds a ND_KEYFRAME_AUTO, set on auto keyframe change.
Timeline header already listens for all NC_ANIMATION and tags redraw.
Pull Request: https://projects.blender.org/blender/blender/pulls/131454
The text colors used on the tooltips are hard-coded and calculated
based on that widget's text color. But this is done in such a way that
the colors lose their saturation when used on light themes. This PR
calculates them in a way that allows the active color (light blue) and
the alert color (red) to work with light theme colors.
Pull Request: https://projects.blender.org/blender/blender/pulls/131515
With the brush system refactor in 4.3, the mesh filter tool was changed
to remove the `no_orig_co` `FilterCache` property. This change and
subsequent refactors had the unintended effect of breaking the filter
tool "repeat" functionality. The expected state of most filter modes
is to use the current position, not the original position.
To fix this behavior, in all modes except Sharpen, Smooth, and Relax
that used the original position data, this commit removes resetting
the transform by the distance from the original position, instead
updating this only when the modal is operating.
Unfortunately, the smooth filter is rather complicated in how it
expects this data, when running as a modal, we always use the original
data, but when the repeat parameter is being used, we need to instead
use the current position on any step that isn't the first one as the
undo step is not "committed" until the user is finished tweaking the
panel.
Additionally, many of the filter modes clipped the resulting posistions
based on the original position data instead of the new, transformed
position, this was also fixed.
Pull Request: https://projects.blender.org/blender/blender/pulls/131469
When the node changes handle types of a segment from Vector
handles to free handles, the number of evaluated points changes
which means the topology needs to be tagged dirty.
By default OIDN has a `setAffinity` option set to `True`. This allows
OIDN to set it's own CPU affinity, and on most systems this resulted in
it only running on one thread per CPU core.
This setting was overwritten in Cycles and the CPU compositor
to allow Blender to control CPU affinity, allowing OIDN to use all
threads on a system. However this wasn't done for the CPU denoiser
in the GPU compositor.
This commit fixes that by setting `setAffinity` to `False` in the
CPU denoiser in the GPU compositor.
Performance:
I found no measurable improvement to performance on a AMD Ryzen 9 5950X
Pull Request: https://projects.blender.org/blender/blender/pulls/130360
In 4.3, the PBVH was refactored to include a variant to specify the type
of node that the tree contains. In certain circumstances, this now leads
to a crash when the data in the PBVH does not match the data in the undo
step. In versions prior to 4.3, these operations also did not work, they
were effectively no-ops, but did not crash.
To avoid the crash, we exit early in the `restore_list` function if we
detect we are in this weird state.
Pull Request: https://projects.blender.org/blender/blender/pulls/131522
The complaint shows the background of the box widget drawn over top of
its contents, the color picker. This is resolved by flushing the widget
cache so that other content draws after.
Pull Request: https://projects.blender.org/blender/blender/pulls/131525
Missed in 9945d511a9
The previous commit fixed files that had not yet been saved in 4.3,
however, the versioning code was not bumped which means that a user who
had a file in a version prior to 4.2 that then saved with the full
release of 4.3 would not have the corrected versioning applied for their
texture paint workspaces.
This commit re-applies similar versioning code and bumps the version
to ensure files are up to date.
Pull Request: https://projects.blender.org/blender/blender/pulls/131337
Make use of our sparse value writer in more places. Namely, when using
animated Camera or Light properties, this will prevent a needless stream
of unchanging values being written into the USD file [1]. Skeletons and
armatures benefit too but less so as typically the primary benefit only
applies to the comparatively small `scale` transform attribute, which
typically remains unchanged from frame to frame.
The newly added `set_attribute` common code can, and eventually will, be
used to reduce boilerplate elsewhere where we do the same sparse writing
dance.
Ref #130759
Pull Request: https://projects.blender.org/blender/blender/pulls/131333
While adding tests for subd import I discovered that our vertex crease
data was imported incorrectly.
This PR adds tests and fixes:
- We tried to read crease sharpness data as ints instead of floats. This
caused the import process to early-return, meaning we never load any
data at all
- Empty USD data would still cause us to create the `crease_vert`
attribute unnecessarily
- Sharpness data needs clamped to 0-1 to handle USD's SHARPNESS_INFINITE
value of 10.0
- We need to fill the `crease_vert` span with 0's since incoming USD
data may not have values set for all the verts
Pull Request: https://projects.blender.org/blender/blender/pulls/131516
If a strip mask was used several times in the same frame, and it needed
to do byte->float conversion (e.g. mask is produced by a byte-color
strip, but then used in both a byte-color strip, and later on in a
float-color strip), then that byte->float mask image conversion was
introducing two inconsistencies:
- It was making mask alpha channel affect the result, which was not
happening with regular byte mask images, and
- It was converting float mask to scene linear space, which was
resulting in different image than with a byte mask.
Fix those issues by ensuring that all VSE modifiers can take either
byte or float mask as-is, without extra conversions. Previously, some
of the modifiers were done in a way where they only handled "(byte
image + byte mask) or (float image + float mask)" cases.
Pull Request: https://projects.blender.org/blender/blender/pulls/131355
When rendering animation without baking dynamics first, rigid body
objects/shapes might be set up for the fist time (see
`rigidbody_update_simulation`).
Here is my take on what happens when we run into the reported crash:
In `rigidbody_validate_sim_object`, `rigidbody_validate_sim_shape` can
be called (which -- amongst other things -- can call `RB_shape_delete`).
It does not set `RBO_FLAG_NEEDS_RESHAPE` nor calls
`RB_body_set_collision_shape`. It only sets `rbo->shared->physics_shape`
(which only seems to to update the "blender side of things", but not the
"bullet side of things").
Then later (still in `rigidbody_validate_sim_object`),
`RB_dworld_add_body`/ `btDiscreteDynamicsWorld::addRigidBody`>
`btCollisionWorld::addCollisionObject` > collisionObject->getCollisionShape()
is called, but confused because we called `RB_shape_delete` before.
Also see the TODO(Sybren) comment from 98a0bcd425 (which might even be
removed with this PR, but not I havent verified "collision shape being
created twice" is now not happening anymore).
One might think that flagging `RBO_FLAG_NEEDS_RESHAPE` might be enough,
but reacting on that only happens later in `rigidbody_update_simulation`
(so not early enough to not run into the issues of `RB_dworld_add_body`
above).
So to resolve, call `RB_body_set_collision_shape` in
`rigidbody_validate_sim_shape` if we actually made a new one.
Fixes#130991
Pull Request: https://projects.blender.org/blender/blender/pulls/131039
Initialise the Action's `last_slot_handle` field to its default value.
The DNA 'defaults' system doesn't do this automatically when versioning
legacy Actions, so now it's done explicitly in the versioning code.
It's fine to only apply this to the existing versioning code, and not as
a new versioning rule. Existing slotted Actions should just keep that
field to whatever it is now.
The default value was introduced in be921b8ddb
Pull Request: https://projects.blender.org/blender/blender/pulls/131498
Reduces the number of times a graphic context needs to be paused/resumed.
The scheduler reorders the nodes to put these initial data transfer nodes
to the start of the nodes that are about to be submitted.
Pull Request: https://projects.blender.org/blender/blender/pulls/131502
When the overlay engine is used to draw over the image engine it uses
incorrect framebuffer configurations. It can attach and sample both the
depth buffer at the same time.
This PR fixes this by separating the output framebuffer into two. One
with and one without a depth buffer. And bind the correct one when
needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/131489
- Gives O(1) access to string length in more cases
- Convenient string manipulation functions
- Clarify difference between "no string" and "empty string"
- Avoid the need for raw pointers in the API
- Shows which API string arguments are optional
Pull Request: https://projects.blender.org/blender/blender/pulls/131473
Move the Gamma Correction pass of blur nodes into its own algorithm to
avoid code duplication and optimize pixel access, since gamma is now
applied for each pixel in the filter window. Gives a 15% improvement.
Pull Request: https://projects.blender.org/blender/blender/pulls/131480
When setting layer parent, if the parent is an armature object, then the
child bone matrix needs to be taken into account for doing inverse
transformations. This fix allows grease pencil layer to be parented to
a bone correctly.
Pull Request: https://projects.blender.org/blender/blender/pulls/131432
This patch restructures `object_convert_exec`, separated conversion
calls for different source/target object type combination for better
readability, keeping each route relatively simple and easy to navigate.
Resolves#130653.
-----------
NOTE:
- Grease Pencil part is still WIP, the Grease Pencil -> Curves -> Mesh two stage conversion is not included in this new code yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/130668