Mitigates #93726.
With this asset previews will no longer flicker in the asset browser
on actions like undo, redo or when using "Adjust Last Operation" if
the asset library doesn't contain assets from the current file.
Previews of assets from the current file would have to be cleared on
undo & redo, because their memory location can change then. However the
file browser's data model didn't allow clearing just these previews, so
previews from external assets would have to be reloaded from disk too,
causing the flickering.
Noticed we can trivially skip clearing of previews if there are no
assets from the current file anyway. This mitigates the issue quite a
bit until preview handling is rewritten, see #122439.
I've hit this a couple of times and disabling it always worked fine for me. So
it's good to make it more obvious that there is an actual bug instead of a
missed optimization.
Pull Request: https://projects.blender.org/blender/blender/pulls/135467
This commit adds the `sculpt.mask_by_color` operator to the 'Mask' menu item in Sculpt Mode. This
allows users to access it via operator / property search. Additionally, the Redo panel is exposed
for general usage.
Pull Request: https://projects.blender.org/blender/blender/pulls/135210
* Adds docstrings to `bl_object.py` and `bl_sculpt.py` tests so that
failure output is more helpful.
* Renames `bl_object.py` class and function to be more inline with other
test naming
Pull Request: https://projects.blender.org/blender/blender/pulls/135417
At this point, it is unlikely that we will revert the changes made over
a decade ago to the Dyntopo edge splitting code. The old code will still
exist in the git history, but to improve readability, this commit
flattens out the blocks and removes the `#define` statements.
Pull Request: https://projects.blender.org/blender/blender/pulls/135410
This is preparation for #129495.
Currently, all of OSL is managed by the OSLShaderManager. This makes it so that the general OSL setup is handled by a general OSLManager, and both the OSLShaderManager and (in the future) the Camera can use it to manage their scripts.
Pull Request: https://projects.blender.org/blender/blender/pulls/135050
Adding a new asset will tag asset browsers to clear and reload the
assets from the current file. Since a859ed1130, such changes will also
clear all asset browsers showing the affected asset libraries. So the
clearing of current file assets would happen on an already cleared
asset/file list. This case wasn't considered before, so it would lead to
a failed but harmless assert. Handle this case properly.
Since a859ed1130, changes like adding an asset will cause all visible
asset browsers showing the affected asset library to be cleared. This
should cause the asset browser to trigger a re-load of the asset
libraries, but a logic error made only assets from the current file be
loaded instead of the full library.
While sorting reports for the "list of bug fixes for old bug reports",
occasionally triagers have encountered a report that's too difficult or time consum
ng to track down the correct information for.
In cases like this, it was decided that just ignoring the bug report
was a better option, and so this commit adds a option to do this by
adding the string `skip_for_bug_fix_release_notes` to the report.
preferable as `<!-- skip_for_bug_fix_release_notes -->` since it's
invisible.
Pull Request: https://projects.blender.org/blender/blender/pulls/135218
This patch refactors how the compositor deals with outputs that are
allocated but not needed. Previously we allowed such allocations and
implicitly release them right after operations are computed. This is a
weak design, so we now require developers to only allocate outputs that
are actually needed and assert otherwise. The release mechanism is
therefore removed.
This makes it so that we ship the test data for every major release
in its own separate archive. (In case someone wants to easily run the
tests for a specific older release without using git)
Pull Request: https://projects.blender.org/blender/blender/pulls/135293
In the Action Editor and Dopesheet, Action/Slot summaries erroneously showed
keys that were hidden in their sub-channels.
The root cause was that the functions for building Action/Slot summary key
lists, `action_to_keylist()` and `action_slot_to_keylist()`, weren't doing
animation filtering *at all*, instead just looping over all f-curves.
This PR fixes the bug by replacing `action_slot_to_keylist()` with a new
`action_slot_summary_to_keylist()` function, which calls into the animation
filtering code to determine which f-curves to include in their key list, and
also using it in place of `action_to_keylist()` at the relevant call sites.
Additionally, properly filtering the channels for the summaries requires both a
`bAnimContext` and the ID that's being animated, so this PR threads those
through to `action_slot_summary_to_keylist()`.
Note that `action_to_keylist()` is still used in some places that actually
*want* an unfiltered list of keys. Those call sites have been left as-is, and
`action_to_keylist()` remains for that purpose.
Pull Request: https://projects.blender.org/blender/blender/pulls/134922
The Z Combine node asserts if one of its outputs are unused. That's
because we compete both outputs even if they are not needed. To fix
this, we skip outputs that are not needed by splitting the shaders to
compute each output independently.
This reverts commit
48abc7aabc &
62599317dd.
Revert !126755 as it was only meant to impact document generation
but it infact made functional changes, see: !135352.
This patch refactors static cache invalidation of images by tracking an
update count. Images now store a runtime update count that is updated
every time the image is tagged for update. Cached images store a copy of
the update count at the moment they were cached, and are invalidated if
if it changed.
Compared to #134878, this is simpler and more robust, since update IDs
are isolated to images only and not to the DEG update count. Though this
only supports images specifically because they are not covered by the
copy-on-evaluation system, which means #134878 will cause multiple
depsgraph to fight over images.
Pull Request: https://projects.blender.org/blender/blender/pulls/134905
The Keying node asserts if its Edges output is unused. That's because we
compete the outputs even if it not needed. To fix this, we skip that
output if not needed.
Changing the `affected_drawings_` set in a threaded loop is not safe.
Since running the eraser in parallel over multiple drawings is unlikely to
improve performance on top of internal threading, handling layers in a simple
sequential loop is preferable here.
Pull Request: https://projects.blender.org/blender/blender/pulls/135428
The issue was that the versioning code didn't run when loading the action.
Thus it had no slots and so was crashing trying to get the first slot.
This PR fixes that in 2 ways:
* Check the slot count of the loaded action, and return/notify the user
* Actually make sure the actions are versioned
Point 1 is important anyway because actions can have no slots (though unlikely).
Point 2 ensures that old pose assets can actually be used
Pull Request: https://projects.blender.org/blender/blender/pulls/135232
The Scene Time node asserts if one of its outputs are unused. That's
because we compete both outputs even if they are not needed. To fix
this, we skip outputs that are not needed.
Quite obscure issue, seemingly caused by the fact that HIP-RT is
passing a large (about 20 MB) global array to a different library
(HIP driver, via hipModuleLoadData). Having global variables of
such size seems to be always problematic as they can not be stored
on stack and, possibly, extra mapping is involved here. It is not
clear whether it is a quirk of the HIP driver, or Linux, or, maybe,
something completely different.
It is possible to work-around the problem by making a temporary
copy of data on heap memory and pass it to the hipModuleLoadData().
This is how other areas are dealing with modules in Blender.
This change contains patch against HIP-RT and the new HIP-RT
library compiled with the patch. It seems to fix the problem
reported in the report.
This change does not resolve OIDN on HIP GPU which seems to have
the same issue. However, it is not a recent regression and the
bug with OIDN GPU denoising can be reproduced using Blender 4.3.
Pull Request: https://projects.blender.org/blender/blender/pulls/135403
Caused by 6d832ee5b3
The bone names were flipped correctly, however, we were missing the
actual FCurve BezTriple flipping.
This was caused by passing the wrong FCurve into
`do_curve_mirror_flippping` -- this function is checking for existence
of the FCurve in the `KeyframeCopyBuffer`, so we gotta pass
`fcurve_in_copy_buffer` (instead of the new fcu).
Pull Request: https://projects.blender.org/blender/blender/pulls/135381
Caused by 40ac21e5a5 [does not remember/resore the previous ScrArea &
ARegion anymore].
Without this, the operator reporting might get confused by using the
wrong area/region, so added back
NOTE: I tried to just notify `NC_SPACE | ND_SPACE_INFO_REPORT` in
`screen_opengl_render_end` (same as in `wm_operator_finished` >
`wm_operator_register`), but to no avail...
Think this is quite good pratice to leave us with the original area/
region anyways though.
Thx @brecht for improvements (restoring in `screen_opengl_render_init`
already, also taking care of restoring in some early out cases)
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/135394
For this to work, we have to take into account handles in TransVert as
well.
Behavior is the same as in legacy curves (meaning that if the control
point itself is selected, the handles are ignores).
Part of #133448 (same thing for grease pencil, which I plan to also make
part of TransVert, but better solve for Curves first, so we can share
code here).
Pull Request: https://projects.blender.org/blender/blender/pulls/134945
The compositor backdrop is still visible even after a new completely
different file is loaded. This is because compositor contexts cache
things like the backdrop, and contexts are stored on interactive
compositor renders, which are not freed until Blender is closed. To fix
this, we cleanup the interactive compositor renders that were created
upon file load.
Pull Request: https://projects.blender.org/blender/blender/pulls/135390
`OpenSubdiv_Buffer` is a wrapper that was introduced at the time
that Blender couldn't use CPP directly. It contains a pointer to
a VertBuf and callbacks to use GPU module on that buffer.
This PR replaces OpenSubdiv_Buffer with `blender::gpu::VertBuf` and
removes the wrapper.
NOTE: OpenSubdiv tests are added to blender_test executable to make the
library dependencies not to complicated.
Pull Request: https://projects.blender.org/blender/blender/pulls/135389