- int2 and short2 filters were completely disfunctional
- Don't use threshold for integer comparisons; it's not in the UI
- Filter with geometry set name for instance "Name" column
Implements a box test to select nodes affected by Clay Strips. The ratio
of nodes selected compared to the sphere test depends heavily on the
mesh, but is generally between 50% and 70%. This results in better
performance and reduces memory usage.
Pull Request: https://projects.blender.org/blender/blender/pulls/138170
Fixes behavior for #137057 when sampling single point curves.
Previous behavior just checked the evaluated length cache size and
called fill_invalid(), it will now fill using the point value and terminate.
Pull Request: https://projects.blender.org/blender/blender/pulls/138153
Relative imports are intentionally avoided in UI code (`scripts/startup/bl_ui`) because it makes it impossible to run individual files in isolation.
Common workflow for making mock-ups and quick UI edits is to load the UI file in Blender's text editor with "Edit Source" operator, make changes, and run the script to see the changes. But in the current version it's impossible because files include relative imports, which don't allow Python to run scripts individually.
Pull Request: https://projects.blender.org/blender/blender/pulls/138246
Previously to handle unevaluated objects in line art "load all"
iteration, a `include_objects` variable is added in depsgraph
iteration settings, and this was only processed by object iterator
but not for any of the dupli objects. Now `make_duplis_collection`
will also handle `include_objects`
The only case where this border case can lead to crash is that a
line art grease pencil object is inside one of the dupli collection,
which isn't a valid use in the first place. But this fix makes it
more robust.
Pull Request: https://projects.blender.org/blender/blender/pulls/137323
When copying a brush from a linked library to the current main, the fake
user flag is set, but the user count is set to 0. This later means that
saving such a file does not persist the brush datablock, and the
associated invariants are violated.
Related to / Found in #138105
Pull Request: https://projects.blender.org/blender/blender/pulls/138243
Adjust the height of the remove icon SVG to match the add icon, ensuring consistent sizing across UI elements.
This resolves alignment issues when pairing SVG icons with text or font-based elements. A height of 1100px was chosen to vertically center the icon cleanly in Blender's UI without introducing fractional pixel offsets.
No visual differences are expected in Blender.
Pull Request: https://projects.blender.org/blender/blender/pulls/137438
This converts the public `uiLayoutSplit` function to an object oriented
API (`uiLayout::split`), matching the python API.
This reduces the difference between the C++ API with the python version,
its also helps while converting code from python to C++ code (or vice-versa),
making it almost seamless.
`uiLayout::split` now returns an `uiLayout` reference instead of a pointer.
New calls to this method should use references too.
Pull Request: https://projects.blender.org/blender/blender/pulls/138361
Behavior of select all operator invoked by shortcut was inconsistent
with menu. This was, because operator context was not set.
Also the selection in timeline is cleared when running this operator
as not doing it may cause unexpected behavior for users.
Selection invert also follows the same behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/137713
This converts the public `uiLayoutBox` function to an object oriented
API (`uiLayout::box`), matching the python API.
This reduces the difference between the C++ API with the python version,
its also helps while converting code from python to C++ code (or vice-versa),
making it almost seamless.
`uiLayout::box` now returns an `uiLayout` reference instead of a pointer.
New calls to this method should use references too.
Pull Request: https://projects.blender.org/blender/blender/pulls/138334
Regression from 368c737fe7. Forgot to fully move to using
`BKE_id_new_nomain` at some point for default materials, instead
of doing more low-level set of 'alloc liblock, initialize it with
default values'.
Enable optimizations on Debug builds for executables used for the build
process (datatoc and glsl_preprocess) and enable unity builds for
shader preprocessing targets.
Debug: From 28.9s to 5.7s
Release: From 4.9s to 3.5s
Pull Request: https://projects.blender.org/blender/blender/pulls/138274
Checking whether relations already existed was a bottleneck when building
collection -> object hierarchy relations. The duplicate checking would be
unnecessary since an object can only be in a collection once, but this function
to build relations can be called multiple times for the same collection.
To avoid the need to check for duplicates, only run the relation creation
once for each collection. The `BuilderMap` gives a simple way to do that.
Note that because a collection might be built separately as a non-layer
collection, there may still be duplicate hierarchy relations.
Building a Depsgraph for 60k simple objects became 1.86x faster, from 2.39
to 1.29 seconds.
Pull Request: https://projects.blender.org/blender/blender/pulls/137737
OpenColorIO exceptions would abort when WITH_ASSERT_ABORT is enabled.
But these do not generally indicate a bug in Blender. They may just be a
blend file using an unknown color space, or an error loading the
configuration file, which we can handle gracefully.
The current code doesn't include selection boundary points in non-
selected curves after separation, causing some segments to be lost.
Legacy curves do include those points. The second issue is with cyclic
curves. The current version leaves the separated part cyclic, though
the more intuitive behavior would be cut off the result. This is also
different from legacy curves. This commit fixes both issues.
Pull Request: https://projects.blender.org/blender/blender/pulls/135035
Previous conversion to scene linear was done in the display transform
shader. Having a separate shader to convert texture to scene linear
allows drawing input textures with different color spaces into a
viewport and apply display transform on all of them.
Currently unused, but is required for !138094. It could also be used
in the future to avoid host-side linearization in the image engine.
Internally it uses a lot of the same logic for shader caching and
binding, but the code is refactored a bit to make it easier to have
a stronger separation in the future if needed.
Ref #138094
Pull Request: https://projects.blender.org/blender/blender/pulls/138308
Fixes incorrect render of lookdev on macOS.
There might have been some other issues caused by the mistake, hard to say,
seems to be hitting some platform-specific behavior and such.
There were two issues:
* Some rna properties to access members in the layer tree were missing
`PROPOVERRIDE_NO_COMPARISON`.
* In `rna_Attributes_noncolor_layer_skip` the wrong `AttributeOwner`
was created.
Pull Request: https://projects.blender.org/blender/blender/pulls/138324
Use the safer VArraySpan instead of get_internal_span(). And remove
the size check for the output data. If the callback inside `ensure` is
called it means that recomputing the data is necessary, regardless of
the array's current size.
When creating a new action slot for a data-block, via the '+ New' button
of the slot selector, use the name of the slot that was last used by
that data-block. Previously, it would always use the name of the
data-block, interfering with slot auto-selection when toggling between
Actions.
Pull Request: https://projects.blender.org/blender/blender/pulls/138326
The goal is to make issues like the ones fixed in #138310 become visible
much earlier in the development cycle.
This PR covers the most obvious places where it could be applied. There
are probably more places, but they can be covered later.
Pull Request: https://projects.blender.org/blender/blender/pulls/138315