When using EEVEE on high resolution monitors the light buffers might not
get initialized as there are range checks that pass in the first try.
- number of tiles needed is larger than the max_tile_count_threshold
- total_word_count is smaller than max_word_count_threshold as it is
never set (still initialized to zero.
Solution is to not exit on the first try. In a later stage we might want
to use something that doesn't require any looping.
Fixes: #117128
Pull Request: https://projects.blender.org/blender/blender/pulls/117164
Add `ATTR_WARN_UNUSED_RESULT` to the
`BKE_animsys_eval_context_construct` and
`BKE_animsys_eval_context_construct_at` functions. They are pure
functions, and without using their returned value they are pointless.
No functional changes.
If a scene sequencer strip references a scene with no composite output,
it will crash due to null image buffer output. This patch fixes that by
allocating an empty buffer in those cases.
Pull Request: https://projects.blender.org/blender/blender/pulls/117135
Now that the select engine data uses non-trivial objects in its global
data, storing it at the global scope causes trouble due to arbitrary
construction and destruction order. Instead use the construct on first use
idiom to make the order clear. Though this struct probably shouldn't be
static at all, it does simplify memory management as well, it's nice to
remove the need to manually clear the arrays.
Pull Request: https://projects.blender.org/blender/blender/pulls/117147
Before we always did a float conversion of the colors even if we
wouldn't use the result.
Because the float conversion does alpha premultiplication, we can
use some shortcuts to skip a lot of computations
In a edit with a lot of fully transparent pixels, I observed a reduction
in total render time from 1m 31s to 1m 17s.
Pull Request: https://projects.blender.org/blender/blender/pulls/117134
Sharing of the normals cache between copied meshes was missing from
89e3ba4e25, which under-represented the benefits of the
change. In a simple file where geometry nodes causes a re-evaluation
without changing the normals, this increased FPS from 2.6 to 14.
Recent and ongoing efforts have changed many properties to be stored
contiguously in memory, e.g. mesh attributes. This patch updates
rna_raw_access to make use of this and copy the entire contiguous block
of memory when the property is stored contiguously.
This is faster and scales much better with larger arrays.
Pull Request: https://projects.blender.org/blender/blender/pulls/116015
Part of overall "improve filtering situation" (#116980) task:
* Add Bicubic filtering option to strip Transform "Filter" setting.
Previously this option only existed in Transform Effect "Interpolation"
setting.
- With this addition, it feels like the transform effect could
possibly be marked as legacy/deprecated, since the regular Transform
that is on all strips can do everything that Transform Effect did?
* Speed up bicubic filtering (used now in VSE, but also in CPU Compositor,
image paint, etc.) by slightly simplifying the code and using some SIMD.
Upscaling 96x54 image to 3840x2160 resolution, using Bicubic filtering:
- Windows (VS2022, Ryzen 5950X): 35.5ms -> 15.1ms
- Mac (clang 15, M1 Max): 29.6ms -> 24.4ms
* Add gtest coverage for bicubic functionality.
Pull Request: https://projects.blender.org/blender/blender/pulls/117100
Fix an issue where, after deleting the active bone collection, the
incorrect bone collection became the active one.
The solution was to store the active bone collection index before
deletion, instead of after.
After the replacement of auto smooth with a modifier, sharp edges are
always used, so the "shade smooth", "shade flat", and "smooth by angle"
operators cleared the attribute. However, often users spend significant
time manually tagging edges sharp, and the operators make it too easy to
lose that data.
To keep the old behavior by default, add an option called "Keep Sharp
Edges". Though this can make the operators "ineffective" at their goal
of changing the way the meshes look, or result in redundant data stored
on the mesh, it's a much safer default, especially as users get used to
the new workflow.
Pull Request: https://projects.blender.org/blender/blender/pulls/117069
Ensure attachment states and load/store configs don't get out of sync
with the framebuffer layout.
In theory, a Framebuffer could have empty attachments interleaved with
valid ones so checking just the attachments "length" is not enough.
What this does instead is to ensure that valid attachments have a valid
config and that null attachments either don't have a matching config or
have an IGNORE/DONT_CARE one.
Pull Request: https://projects.blender.org/blender/blender/pulls/117073
This is due to `BLI_findstring` returning wrong id from passed name.
Two IDs can have same name before making them unique so it can return
wrong id. To fix this, pass id argument instead of id_name to
`BLI_libblock_ensure_unique_name` and skip the use of `BLI_findstring`
Pull Request: https://projects.blender.org/blender/blender/pulls/116246
Caused by e968b4197b / 67e23b4b29
Since culprit commits, we are not running `MANTA::initGuiding` /
`fluid_alloc_guiding` if guiding is meant to be pulled from other
domains (it does work with effectors though). This is because atm. only
the `FLUID_DOMAIN_ACTIVE_GUIDE` flag sets `mUsingGuiding` to true
(activated in `update_obstacleflags`, so only for effectors).
So to fix this, we have to ensure that `MANTA::initGuiding` runs (also
if guiding is pulled from domains), but also make sure we dont run into
the crashes from T102257.
It seems that the real reason we were getting crashes in T102257 is that
67e23b4b29 made it so that resetting the cache (including a call to
`fluid_modifier_reset_ex`) in `fluid_modifier_processDomain` happens
**after** `FluidDomainSettings.active_fields` have been updated (this
happens in `update_flowsflags` & `update_obstacleflags`).
But `fluid_modifier_reset_ex` also resets
`FluidDomainSettings.active_fields`. If we then update pointers later in
`fluid_modifier_processDomain`, we never get anything in the guiding
related pointers for the new `mCurrentID` (specifically `mPhiGuideIn`
will be a nullptr). This is the real reason `initGuiding()` runs a
second time (it does once for `fluid_modifier_init` then again as a
consequence of the call to `manta_guiding`).
This patch proposes to move the resetting process from 67e23b4b29
**above** the refreshing of the `FluidDomainSettings.active_fields`,
this way these field stay intact, we do get the first run of
`initGuiding()` from `fluid_modifier_init`, manta pointers get updated
with intact fields afterwards (so we then get a valid `mPhiGuideIn`),
which then prevents the second run from `manta_guiding` to actually call
the python script again.
The fix from e968b4197b is then not needed and reverted in this patch.
This should be good for LTS I think.
Pull Request: https://projects.blender.org/blender/blender/pulls/117067
Generated copies of GLSL sources are kept in a std::string and
it was always accessed by a long living StringRefNull which lead
to potential read from unallocated memory as std::strings are
not null terminated.
Pull Request: https://projects.blender.org/blender/blender/pulls/117120
This commit tweaks some unit names:
- Remove `name_alt` for square mile "sq m" and cubic mile "cu m" as
they could easily be confused with meters.
- Correct plural forms for the ton units: rename "ton" to "tonne" for
the metric ton, and "tonnes" to "tons" for the imperial (short) ton.
Identifiers are unchanged.
- Swap `name_short` and `name_alt` for metric ton, hour, and second,
as `name_short` is used for UI display and should use the official
symbol. Keep the other form as `name_alt` for input.
- Use "t" and "tn" respectively as short names for the metric and
imperial (short) ton.
- Rename radian's short name "r" to "rad", keep it as alt name.
- Introduce alt names for km/h (kph), arcminutes (amin),
arcseconds (asec), for convenience.
References:
- https://en.wikipedia.org/wiki/Ton
- https://en.wikipedia.org/wiki/Tonne
Ref: !116762
- Move functions to C++ namespace
- Use two functions with simpler responsibilities instead
- Use C++ math functions
- Remove arguments structs left over from before C++ transition
- Return ray distance precalculation by value
Transition retiming keys move as if they are mirrored across a point.
It is possible to allow them to cross this point instead of limiting
transition duration.
This change itself doesn't really improve usability, but it is needed
for "Add transition and change its size" operator.
- Remove unlimited mip level.
- Make computation of sampling region simpler.
- Add correct mirroring of UV and border region.
- Fix crash when world probe is smaller than lightprobes.