Allow our current simple confirmations to be customized and extended
with callbacks, allowing different behaviors, different icons, and
showing more information. Makes no changes to any existing dialogs.
Pull Request: https://projects.blender.org/blender/blender/pulls/104670
Blender's cameras don't have specific resolution configured to them,
instead they use the scene's resolution.
This is a problem when exporting a camera using Alembic. Other software
(like Houdini) expects the resolution parameters on the camera itself.
So now store the scene's resolution on each camera that is exported.
Since this is not part of the concept of a camera in alembic itself,
export these as `userProperties` in a way other software can read this.
Fixes#116375
Pull Request: https://projects.blender.org/blender/blender/pulls/116782
Bone collection visibility now respects their hierarchy.
A bone collection is only visible when it is marked as visible and all
its ancestors (so parents, greatparents, etc.) are visible. Root bone
collections have no ancestors by definition, and only consider their own
visibility.
The effective ancestors' visibility is stored on each bone collection,
in its `BONE_COLLECTION_ANCESTORS_VISIBLE` flag. This makes it possible
to determine the effective visibility from just the flags of the bone
collection itself.
The `BONE_COLLECTION_ANCESTORS_VISIBLE` flag is now stored, with the
other flags, in `BoneCollection::flags`. This means that it's stored in
DNA, even though it's derived data and should actually be stored in a
runtime struct. However, `BoneCollection` doesn't have any runtime
struct yet, and I don't feel that the introduction of this flag is a
good enough reason to introduce that just yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/116784
When opening the menu to set/change the
active keying set, the top entry would
show "Active Keying Set" (if there is one).
(Open the menu with Ctrl+Shift+Alt+I)
Clicking this option would unset the active keying set
though as pointed out by Nika Kutsniashvili in #115798
This PR fixes it by splitting the function that dynamically generates the enum.
The core of the function has been extracted, and only the section
that creates the entry for "Active Keying Set" has been changed.
It now reads "Clear Active Keying Set"
Pull Request: https://projects.blender.org/blender/blender/pulls/116189
Moving a bone collection to another parent is now possible in Python by
assigning to `bone_collection.parent`.
Thanks to Sergey for the implementation.
Rename `ANIM_bonecoll_is_visible(armature, bone)` to
`ANIM_bone_in_visible_collection(armature, bone)`, as that reflects the
actual functionality.
No functional changes.
The issue was that the "Affect" options from the 3D viewport
were also used for the Graph Editor.
This was discussed in the Animation & Rigging module meeting.
https://devtalk.blender.org/t/2023-12-21-animation-rigging-module-meeting/32748
The consensus was that the Animation Editors should have their own copy of the "Affect" flags.
For this commit I opted for a more immediate solution that ignores the "Affect" flag in the animation editors.
The adding of the flag can be left for a feature PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/116781
This is reusing the generic system from 128eb6cbe9 which at that time
was only done for the mesh reader and is now done for the point reader
as well.
This allows for rendering with proper motion blur for alembic points
(which of course are still imported as meshes - were just lacking the
velocity attribute) when directly rendering as points in Cycles.
Came up in #109185 (where instancing is used - which is still not
supported, this patch is just for direct point rendering in Cycles).
Unsure about the status of https://archive.blender.org/developer/D11591
but until that lands, having velocities for points sounds useful enough
to support this now.
Fixes#95945
Pull Request: https://projects.blender.org/blender/blender/pulls/116749
Previously in Audaspace there was choice between linear resampler (okay
for preview, but not great for final mix), or "extremely high quality
preset" for rendering the final mix; with nothing in between. I have just
landed "medium" and "low" resampler quality levels in upstream Audaspace
(see https://github.com/audaspace/audaspace/pull/18 with details and
quality spectograms, also comparison with Audacity resampler).
This PR updates Audaspace to latest upstream, and switches to use the newly
added "medium" quality resampler. There's no audible difference (nor visible
one in spectrograms), as far as I can tell.
Timings, rendering out frames 1000-3000 of Sprite Fright Edit blender
studio data set:
- Windows (Ryzen 5950X, VS2022): 92 -> 73 sec
- Mac (M1 Max, clang 15): 70 -> 62 sec
i.e. using a faster audio resampler makes the _whole render process_ be
10-20% faster (however, this from VSE where it combines already pre-rendered
image strips).
Pull Request: https://projects.blender.org/blender/blender/pulls/116059
This is only visible for very low resolution image strips; the math was
operating on integers as image size but doing division by two to get the
outline. For non-even image sizes the outline could be off by a pixel due
to rounding.
Images in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/116605
Bundling many tests in a single binary reduces build time and disk space
usage, but is less convenient for running individual tests command line
as filter flags need to be used.
This adds WITH_TESTS_SINGLE_BINARY to generate one executable file per
source file. Note that enabling this option requires a significant amount
of disk space.
Due to refactoring, the resulting ctest names are a bit different than
before. The number of tests is also a bit different depending if this
option is used, as one uses gtests discovery and the other is organized
purely by filename, which isn't always 1:1.
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/114604
The delay is caused by `Shortcut->Resolve(0, SLR_NO_UI | SLR_UPDATE)`
to locate potentially moved or renamed paths.
The issue was resolved by adding the `SLR_NOSEARCH` flag.
This eliminates the delay without sacrificing functionality.
Pull Request: https://projects.blender.org/blender/blender/pulls/116692
ROCm 6 brings some changes to the HIP API. This pull request is meant to be
backward and forward compatible.
That is Blender could be compiled with either ROCM 6 or 5 and run on either.
The main change is the hipMemoryType enum, which we check based on the
runtime version to use the correct enum values.
Without this, HIP will not work on Windows with upcoming 23.40 driver.
Pull Request: https://projects.blender.org/blender/blender/pulls/116713
The IES parser in Cycles would lead to heap buffer overflow error
when non-supported or invalid data is provided to it.
The error was caused by the way how stirng is copied to vector
skipping the last null-terminator. Later C-style string utilities
are used for parsing, and they expect the data to be null-terminated.
It is unclear why data needs to be stored as vector: storing it as
string simplifies initialization.
Easiest to reproduce the issue is to use Blender build with address
sanitizer enabled.
Pull Request: https://projects.blender.org/blender/blender/pulls/116752
This also fixes crash when deleting keys.
Issue was caused by incorrect implementation of batch deleting with
`SEQ_retiming_remove_multiple_keys()` function. It tried to remove data
from different strips, when it should work with one strip at the time.
Also transitions and freeze frames were treated as normal keys, but they
do need special handling.
Pull Request: https://projects.blender.org/blender/blender/pulls/116722
This change solves the following linker error:
ld: warning: __eh_frame section too large (max 16MB) to encode dwarf unwind offsets in compact unwind table
Proposed solution is to disable unwind table when building Blender with
address sanitizer enabled.
It is stated in the comment in the code, but to make it explicit there
could some side-effects of code which relies on frame walking:
- backtrace()
- __attribute__((__cleanup__(f)))
- __builtin_return_address(n), for n > 0
- pthread_cleanup_push when it is implemented using
__attribute__((__cleanup__(f)))
From the local tests it seems that backtrace() provides the same
output as prior to this change (but with classic linker used, as prior
to this change it is not possible to link Blender).
The rest of the possibly functionality is not used by Blender, but
it is a bit hard to tell if it is used by any of the dependent
libraries. However, if the libraries are compiled dynamically, there
will be no affect on them with this change.
I am unable to run the full test suit as some of the tests are
failing prior to this change with classic linker. Overall it seems
to be no unwanted side effects on Blender development.
Note that the change only affects debug builds with ASAN enabled,
so it is a low risk of causing some real problem so might as well
just give it a whirl and see if some unpredicted issue arises.
Pull Request: https://projects.blender.org/blender/blender/pulls/116745
The issues was a missing depsgraph tag after adding the hook modifier.
Because of this, the depsgraph did not make a new copy of the object,
which led to a discrepancy between the number of modifiers on the original
and evaluated object.
Along with the 4.1 libraries upgrade, we are bumping the clang-format
version from 8-12 to 17. This affects quite a few files.
If not already the case, you may consider pointing your IDE to the
clang-format binary bundled with the Blender precompiled libraries.
The refactor in cf9fcbf24e used the wrong area coordinate for the
clay brush: the original code used `ss->cache->location` as the
`area_co` passed to the bush callback, and the new code after refactor
used the `area_co` which was calculated as a displaced brush plane.
The calculation of the displaced brush area plane as `area_co` seems
to be unused, and reason for it is not really clear.
This change only restores the `area_co` passed to the brush callback
to the value it used to be prior to the refactor.
Pull Request: https://projects.blender.org/blender/blender/pulls/116738
The warning was introduced with XCode 15 and conflicted with some
assumptions in the CMake. Even without actual cyclic dependency
between targets CMake might decide to pass library multiple times
to the linker, to ensure all its users find symbols from it.
This behavior is expected to be tweaked in the upcoming CMake
version, but until it is released and became widely used by all
Blender macOS developers silence the warning.
Pull Request: https://projects.blender.org/blender/blender/pulls/116718
Render to Render workload depedency not correctly syncing
in Metal. PR adds hard pass break where GPU_memory_barrier's
occur during render workloads to ensure non-pixel-local writes
are visible to subsequent render invocations as needed. This is
required to support full pass dependencies on a tile-based GPU
architecture.
Note that these barriers are therefore expensive, so are skipped
where dependencies are local and fragment execution order is
well-represented via either blend order or explicit
raster_order_groups.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/116656
The use-after-free is triggered when the GHOST system is created
multiple timers during the application timelife which happens in
the integration tests.
The solution is to release the application delegate and set it
to nil when the GHOST system is being destroyed. This ensures that
all subsequent GHOST systems properly initialize application
delegate, and that there is no application delegate which points
to a freed system.
The original issue was noticed by a flackey behavior of the
bf_gpu_tests test which was failing at random. The issue could
be reliably reproduced by running this test with ASAN enabled.
Pull Request: https://projects.blender.org/blender/blender/pulls/116717
Replace the RNA function `bone_collection.find_index()` with a read-only
property `.index`. The functionality is the same, just exposed to RNA
differently.
Note that this property still does an array scan, and thus has complexity
`O(n)` in the number of bone collections. Since this number is relatively
small, this shouldn't be a problem.
Add a `bone_collection.bones_recursive` property that returns the set of
bones assigned to that bone collection or any of its child collections.
This property is implemented in Python, as that made it considerably
simpler to create the set semantics.
Use `bpy.ops.wm.read_homefile(use_factory_startup=True)` to load the
default 'homefile'. Otherwise Blender will load the saved-as-default file,
which can be quite different from the default startup file.
Fix issues related to NaN normals in some situations by trying
to detect when these cases might occur and just reverting back
to default normals.
As a side effect of these changes, OSL now behaves correctly
when given a non-normalized normal.
Pull Request: https://projects.blender.org/blender/blender/pulls/114960
* Different fix for Mantaflow linker warnings that works with new OpenVDB.
* Use new linker for arm64 as it no longer produces warnings with latest
Xcode. Still use the old one for x86_64 as some warnings remain.
* Fix wrong x86_64 build target in deps builder.
For the upcoming 4.1 libraries.
Ref #113157
Pull Request: https://projects.blender.org/blender/blender/pulls/116708