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
Depend only on `getcwd` and `chdir` rather than attempting to also
consider the `PWD` environment variable.
There's situations where these differ, and most easily seen when running
the Python tests. Calling `pathlib.Path.cwd()` will return something
like `/home/blender/git/blender-vexp/build_asserts/tests/python` while
PWD is `/home/blender/git/blender-vexp/build_asserts`. In this case,
calling `getcwd` will match what Python shows.
Additionally, this now matches what Windows and Mac do for these
affected APIs.
Pull Request: https://projects.blender.org/blender/blender/pulls/144235
* GHOST is an implementation detail, Blender environment variables should
have the BLENDER_ prefix.
* Don't put links in command line help output. We don't do this for other
arguments either, and it's trivial to search for this online.
* Make description more straightforward and line wrap.
* Use CLOG for logging.
Ref #143049
Pull Request: https://projects.blender.org/blender/blender/pulls/144349
- Make PTCACHE_COMPRESS_ an actual enum
- Clarify that while it looks like bitmask, it really is just an enum
- Make ptcache_file_compressed_write take similar arguments as
ptcache_file_write (item count and item size)
- All callers of ptcache_file_compressed_write were doing compressed
result memory allocation in exactly the same way; just make it happen
inside the function itself. This also makes it no longer need
the callers to do "is this zstd?" check around the call.
- The lzma "props" buffer was dynamically allocated for no good reason,
just make it a simple array, and clarify the variable names.
- Remove BLI_assert_unreachable() from ptcache_file_compressed_read;
asserts are for "impossible" situations; this one just happens any
time one opens a 4.x file with caches in 5.0.
Pull Request: https://projects.blender.org/blender/blender/pulls/144193
Looks like this was caused by 3de916ca25.
Steps to reproduce were:
- Switch to the Scripting workspace
- Paste:
`C.screen.areas[5].spaces[0].rna_type.properties['show_region_asset_shelf'].`
- Press tab
The RNA property getter should always return a value, even when empty.
That's what other such getters do as well.
The File Output node does now allow empty names for its sockets, so
doing things like flat RGBA pass in an unnamed layer is impossible,
which was possible before the recent redesign of the node. To allow
this, socket items accessors now have an option to allow empty names.
Implementation wise, the non-default variant of BLI_uniquename_cb was
used to make the empty name replacement optional. Incidentally, the new
function is more CPP friendly, so the MAX_NAME length limitation was
lifted.
Pull Request: https://projects.blender.org/blender/blender/pulls/144334
The code path isn't well defined when there aren't any faces, causing
the vert, face, and corner normal caches to call each other, potentially
trying to lock the same mutex twice.
Duplicating a strip that references an ID like the scene strip would not
duplicate the scene. This is wanted in some workflows.
To align with the rest of Blender, this changes the behavior for how
strips are duplicated:
* `Shift + D` ("duplicate"): Duplicate the strip and also duplicate the
IDs referenced by the strip. Currently this only affects `Scene`,
`MovieClip`, and `Mask` strips.
* `Alt + D` ("duplicate linked"): Duplicate the strip, but reference the
same IDs. This is the current behavior in `main`.
Part of #144063.
Pull Request: https://projects.blender.org/blender/blender/pulls/144138
This is similar to #144199. It needs a few more changes because more places
handle geometries in a special way compared to data-block sockets.
It might be that there are more usages of `GeometrySet` as value for geometry
sockets instead of `SocketValueVariant`. Unfortunately, there isn't really an
automated way to find these. So far I found all the places that needed fixing
through tests.
This is the last socket type that did not use `SocketValueVariant` yet. So
afterwards, it's likely possible to simplify a bunch of code to use
`SocketValueVariant` instead of `void *`.
Pull Request: https://projects.blender.org/blender/blender/pulls/144355
During a short period (Blender 500 sub 33) the legacy custom data
struct was saved in an invalid state. This adds a check to
avoid crashing when loading a file that was saved during that time.
Pull Request: https://projects.blender.org/blender/blender/pulls/144337
Use signed range and indices to avoid dereferencing tokens
before the start of the Token array.
# Conflicts:
# source/blender/gpu/glsl_preprocess/shader_parser.hh
The --debug-ffmpeg flag now is the same as --log video, and only exists for
backwards compatibility. The ffmpeg verbosity can now be controlled with
--log-level.
Pull Request: https://projects.blender.org/blender/blender/pulls/143447
This PR proposes to add an environment variable for forcing vsync to
be on or off. My primary use case was to disable vsync for forcing
viewport rendering performance tests not to be capped at the display
refresh rate when #142984 is used for removing animation frame rate
limits.
I initially added the environment variable "GHOST_VSYNC_OFF", but
found "GHOST_VSYNC=0/1" to be more easily understandable.
Usage:
- GHOST_VSYNC=0 => Vsync is forced off
- GHOST_VSYNC=1 => Vsync is forced on
Pull Request: https://projects.blender.org/blender/blender/pulls/143049
This was only affecting the shadow pass because it is the
only one to use multiview.
The `drw_ResourceID_iface.resource_index` was incorrectly
set up in the vertex shader to the already shifted index,
resulting in double shift which resulted in resource index
being 0 in fragment shader.
Candidate for backport to 4.5 LTS
Pull Request: https://projects.blender.org/blender/blender/pulls/144341
When using the resize dyntopo operator the overlay helping to choose
the new size didn't work properly on AMD GPUs. The cause was that only 2
components of the line displacement was initialized.
Also fixes: #83623
Pull Request: https://projects.blender.org/blender/blender/pulls/144338
The remapping from old to new linked IDs was done one by one, with all
the related pre/post processing. In particular for objects, this could
easily lead to quadratic cost (need to loop over all objects for each
object)...
Solved by reworking the remapping logic in relocation code to process
all linked data in a single call.
From quick tests locally, it makes relocating a library with 10k object
got from 50s to about 5s.
A 40k linked objects case goes from 'way too long to measure' to about 4
minutes.
So there is likely still some things that could be improved here
(processing time still does not seem to be O(n)), but at least it's
usable now.
Pull Request: https://projects.blender.org/blender/blender/pulls/144207