This follows the other CMake "modernization" commits, this time for
`bf_intern_openvdb` and the OpenVDB dependency itself.
The difference with this one is that `intern/openvdb` becomes an
"optional" dependency itself. This is because downstream consumers often
want to include this dependency rather than openvdb directly, so this
target must also be optional. Optional, in this case, means the target
always exists but may be entirely empty.
Summary
- If you are using BKE APIs to access openvdb features, then use the
`bf::blenkernel` target
- If you are only using `intern/openvdb` APIs then use the
`bf::intern::optional::openvdb` target (rare)
- For all other cases, use the `bf::dependencies::optional::openvdb`
target (rare)
context: https://devtalk.blender.org/t/cmake-cleanup/30260
Pull Request: https://projects.blender.org/blender/blender/pulls/137071
This PR removes validation of saved bookmarks and system paths in File
Browser. The act of checking validity of a path can result in a timeout
that can last many seconds. Blender will have a very long startup time
if any such items are disconnected, invalid, offline, or removed. Even
if these paths are not used during the Blender session, like network
shares used only at work, web storage for some non-Blender use, a
shortcut to a USB drive, etc. Items will not be greyed out, and
clicking on one will result in a timeout _at that time_ but this seems
like expected behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/138218
This type was the same for every socket type supported by Geometry Nodes.
It's always `SocketValueVariant` now. Therefore, it was unnecessary to s
tore an explicit pointer to it.
Pull Request: https://projects.blender.org/blender/blender/pulls/144458
In the `Strip` panel in the scene template ID, the "new/duplicate"
operator would duplicate the active scene in the window instead
of the selected scene in the strip.
Pull Request: https://projects.blender.org/blender/blender/pulls/144453
The issue was that an rna function was called on `Bone`
that expected an `EditBone`. Because the pointer was just casted,
this means it would write into wrong bytes on the struct.
Caused by a43359eb88
Pull Request: https://projects.blender.org/blender/blender/pulls/144447
When search popups are created at the bottom of the screen, they are
repositioned to stay within the bounds of the main window. This
can cause the cursor to hover over one of the search results, causing
it to become active.
Since some searches put recently searched items at the top of the
result list, the first search result should always be active by default.
This is achieved by ignoring the mouse event after the creation of
the popup by checking if the mouse has actually moved.
Pull Request: https://projects.blender.org/blender/blender/pulls/144296
For HDR (float) content, previously the Histogram scope was displaying
-0.25..+1.25 value range. Negative range display is not really useful,
and the upper bound of 1.25 is not really large enough for HDR.
Change the histogram to:
- Display 0..12 range for HDR content, with the same amount of
uniformly distributed histogram bins (256 bins for 0..1 range, so
3072 bins for HDR range). Larger amount of bins does not affect
histogram calculation performance in a measurable way.
- Histogram scale is so that horizontal image range is 0..1 (LDR) part
of the histogram; HDR part extends to the right. When displaying the
histogram, the preview area zoom aspect ratio is not locked, so the
user can arbitrarily change it. Frame All/Selected operators,
while showing the histogram, frame the entire range.
- Draw maximum R/G/B values as semitransparent vertical lines in the
histogram.
- Display each bin as a rectangle, instead of lines joining next and
previous bin values. This feels better especially for isolated bins.
- For vertical grid lines, make the line stop below the text label,
instead of going through it.
Images in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/143537
This PR moves the responsibility of destroying discarded resources to
the submission thread. Previous implementation could be blocked and
would not always run.
This solves memory leak when rendering in background and keeps the
overall memory usage lower as all is done in a single location.
Pull Request: https://projects.blender.org/blender/blender/pulls/144440
This patch extends the support for menu sockets in the compositor to
also include pixel nodes. Menu sockets are not yet used in any node, so
this has no apparent effect.
Pull Request: https://projects.blender.org/blender/blender/pulls/144436
Commit 798f85a710 changed the way the languages menu is generated in
order to improve the items' descriptions. This revealed that items in
`bpy.app.translations.locales` used this description instead of the
identifier, resulting in them looking like:
'Locale code: ca_AD. Translation progress: 100%'
instead of:
'ca_AD'
To use the language code, this commit uses the menu item's identifier
instead of description.
-----
This should be backported to 4.5.
Pull Request: https://projects.blender.org/blender/blender/pulls/144366
If an item name (and ID) is provided, never successfully match only
based on the item index.
This can lead to matching to a complete different ID than the intended
one, which can be catastrophic for the integrity of the next resync.
Also, do not require sucessful match on both source and destination
data, this will always fail in case e.g. an item is removed from a
collection, and can prevent detecting required resync from that
collection then.
This commit also enables new 'harder' test in unittests, added in
previous commit, which is now expected to pass.
Pull Request: https://projects.blender.org/blender/blender/pulls/144429
Recursive resync would validate hierarchy info of all IDs in Main, when
it should only handle the ones in its currently processed 'library level'.
Otherwise, it could incorrectly clear hierarchy info from 'more local'
liboverrides that were still to be resynced, leading to issues like
left-over 'orphaned'/unused liboverrides, needless renames, etc.
Also contains a few 'logical mistakes' fixes in the resync code, though
these did not seem to have any known practical effect.
With 5.0 we start requiring this extension for GL and VK.
All of our target hardware supports it with up to date
drivers.
Some old drivers were disabling this extension because of
buggy behavior. We simply drop support for them in 5.0.
This allows us to remove a lot of code and the last
shader create info override done at startup. This will
unlock more refactoring of the shader create info into
static classes to reduce binary size and other benefits.
## TODO:
- [x] Remove checks for ARB_shader_draw_parameters
- [x] Remove checks for ARB_clip_control
- [x] Check for the extension on startup for OpenGL
- [x] Check for the extension on startup for Vulkan
- [x] ~~Add user facing popup message about minimum
requirements not being met.~~ Done using the same
popup as old hardware.
Pull Request: https://projects.blender.org/blender/blender/pulls/142334
Simplify ANIM_unit_mapping_get_factor() by returning early and reducing
cognitive complexity. This will make it significantly simpler to expand it
for other RNA property (sub)types.
Also I added a unit test for rotation conversion between radians and
degrees.
No functional changes.
This is intended as a cleanup for !143880.
Taken over from #144140
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/144427
This PR will swap device local memory to system ram. It relies on
VK_EXT_external_memory and VK_EXT_pageable_device_local_memory
extensions to be supported by the system.
Most platforms support these extensions.
Pull Request: https://projects.blender.org/blender/blender/pulls/144422
Technically a regression in [0] however even before this commit
there where no check to prevent an intersection being used which
is far outside triangle the vertex is sliding towards.
Resolve by only using the line-line intersection if the intersection
points lie within a conical region defined by the edge pair the user
is sliding towards (see code-comment for details).
Ref !144418
[0]: 49ab0bb844
Changing a node tree item property (such as the default value) was using a very
broad and generic "tag" function which invalidates the runtime items cache.
This also invalidates any python iterators due to the API using the runtime
cache. Changing node tree items in a loop will then crash.
It's not necessary to invalidate the runtime items cache when the actual item
pointers have not changed. Most RNA updates only change superficial properties,
or at most require a recursive node tree update due to change of identifiers or
types.
This PR introduces a simpler "tag" function to only tag for tree updates by not
rebuild the entire runtime items cache. It also renames existing functions and
docstrings to better explain what each of them does and should be used for.
The `NodeTreeInterfaceChangedFlag` is removed completely because it is only ever
used as a simple boolean indicator of "item changes" that require a cache
rebuild. It is replaced with an atomic bool like flags used for runtime caches.
Pull Request: https://projects.blender.org/blender/blender/pulls/143932
Previously the baking job is not properly ended when not baking in
background, this means when the bake is called from the script, the
interface lock is not properly reset, then parts of the interface can
stay locked afterwards. This fix adds `lineart_bake_endjob` to the
foreground code path so the interface will be unlocked properly.
Pull Request: https://projects.blender.org/blender/blender/pulls/144405
There are stability issues with the vulkan backend. Some scenes indicate
that there is no space left to allocate the next descriptor buffer. For
stability reasons we will disable descriptor buffers and look into a
better solution.
Pull Request: https://projects.blender.org/blender/blender/pulls/144421
Strokes would lose their deform group values after moving them to a
different layer, because `vertex_group_names` weren't transferred to
the newly created `CurvesGeometry` inside `execute_realize_curve_tasks`.
This commit adds another version of `copy_vertex_group_names` for
Curves, and separates the duplicate code into `copy_vertex_group_name`,
which is used by both meshes and curves.
This also fixed strokes losing deform weights in multiple situations, such as:
- When performing a layer merge.
- When applying generative modifiers like Mirror or Array
Pull Request: https://projects.blender.org/blender/blender/pulls/142881
This simplifies the bake API used by Geometry Nodes by using `SocketValueVariant`
instead of raw pointers. This is possible now, because all socket types use
`SocketValueVariant` under the hood.
Pull Request: https://projects.blender.org/blender/blender/pulls/144410
Now that every socket type uses `SocketValueVariant` since #144355, the
parameter access code can be simplified a bit.
This also adds a new `GeoNodesMultiInput<T>` type that's used to access the list
of inputs value multi-input sockets.
Pull Request: https://projects.blender.org/blender/blender/pulls/144409
Parallelizes implementation for computing the NURBS basis cache.
Removing the unnecessary linear 'find span' search. Due to formulation
of the span find implementation, breakpoints are now evaluated in the
following span rather then in the previous. This does not affect the
point evaluation results, but adjusts how they are computed in the
basis cache.
On top of the threading improvement, removal of the linear search
also means the computational complexity goes from O(n^2) to O(n).
For a very large NURBS curve (250K points), performance is increased
by roughly 40 000 times, and is now interactive!
For cases with large number of small curves. Tests with 25K curves
and 10 control points per curve also indicated a slight performance
improvement, with roughly a 13% reduction in execution time.
Pull Request: https://projects.blender.org/blender/blender/pulls/144000
Though this is always non-null currently AFAIK, there's no reason
not to add a null check for some safety in the rare case that no
logging evaluation happens before displaying the UI.
Fixes missing isolated vertices in `mesh_apply_spatial_organization` by
ensuring non-added vertices (ones not forming a face) are appended to
new_vert_order, preserving correct vertex ordering for meshes with
disconnected geometry.
Pull Request: https://projects.blender.org/blender/blender/pulls/144388
One thing to keep in mind is that while `ob->actcol` is one-based (if
materials are assigned), `active_material_index` is zero-based so we
have a couple of places to make sure whenever materials are assigned,
we should always be in the range of `1..totcol` for `ob->actcol`.
In the particular case of the report, the last remaining material slot
was removed (`ob->actcol` gets rightfully zero then), but assigning a
material from the `template_ID` then calls `BKE_object_material_assign`
with zero as the active index.
The internal `act` number was corrected [ `std::max<int>(act, 1)` ],
but did not end up in `ob->actcol`.
`BKE_object_material_resize` [which all code assigning/removing/...
materials eventually comes down to] used to do the "sanitizing" actually
(but exited early when `totcol` didn't actually change).
There were other places to, clamping to a proper upper or lower bound.
So to resolve, move the code for sanitizing into its own function and
use it after `BKE_object_material_resize` (and from a couple of places).
Ref !143196
Move the existing USDZ export test from C++ to Python for better
validation. The resulting file is now run through the `usdchecker`
system and we also check the contents of the resulting archive for the
expected texture file. This helped uncover a pathing issue in the
resulting archive where the 'textures' directory was misnamed on win32;
though it was still functional.
Pull Request: https://projects.blender.org/blender/blender/pulls/144176