Miscellaneous improvements to the Statistics 3DView Overlay. Shows
internal details for selected objects while in Object Mode, including
triangles. Removes the useless "0" shown in the stats while in Sculpt
mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/104663
In readfile context, some ID pointers have to be ignored: typically the
'owner_id' pointers of embedded data.
Currently unused, but required for replacing `blend_read_lib`/
`blend_read_expand` by `foreach_id` (#105666).
The fact that this pointer may be either to a regular ID, or an embedded
one, without any way to tell it withour accessing the nodetree data,
makes it tricky to handle properly when such 'other ID' access is not
allowed. Here there can still be assumptions and heuristics based on
other data, but this remains fragile and really sub-optimal code.
Should not have any behavioral change in current code, but required for
replacing `blend_read_lib`/`blend_read_expand` by `foreach_id`
(#105666).
Call functions directly in lambdas rather than passing their
arguments in a separate void * argument. This can be changed
more in the future to move callback arguments out of smaller
structs.
Adjust the width, dash length and amount of anti-aliasing of node links
so they look the same independent of the UI scaling.
Adding another parameter to the shader exceeded the limit of 16
attributes. Therefore the parameters to describe the dashes (length,
factor, alpha) are passed in together as a vector.
Ref #102919
Pull Request: https://projects.blender.org/blender/blender/pulls/111270
This commit adds a new option flag to the lib_query foreach_id code,
which will make deprecated ID pointers to be processed as well.
NOTE: Currently there is no report to the callbakcs about the fact that
it is processing a deprecated ID. This can be easily added later if it
becomes necessary.
Part of implementing #105134: Removal of readfile's lib_link & expand code.
When choosing the new 'overwrite' option when trying to save a blendfile
from a newer version of Blender, it would cause invalid (use-after-free)
memory access.
Issue caused by the main commit (a1d7ec7139) of the new blendfile
compatibility handling. No idea how it was not detected earlier.
Many thanks to @weizhen for spotting the issue and doing some initial
investigation on it.
The stroke mode of the eraser only tests distance with segments of the strokes, so it does not take into account strokes that only have one point, and thus no segment. This patch fixes the issue by testing if the point is inside the eraser in the case of a one-point stroke.
Pull Request: https://projects.blender.org/blender/blender/pulls/111387
This is in prevision of EEVEE panoramic projection support.
EEVEE-Next is planned to add support for these parameters.
Not having these parameters in Blender DNA will make Cycles
and EEVEE not share the same parameters and will be confusing
for the user.
We handle forward compatibility by still writing the parameters
as ID properties as previous cycles versions expect.
Since this change will break the API compatibility it is crucial
to make it for the 4.0 release.
Related Task #109639
Pull Request: https://projects.blender.org/blender/blender/pulls/111310
Batches don't always provide all required resources for a shader.
This can happen when the resource is defined in the shader, but
not used in a specific variant. The definition is still there and
needs to be filled.
This PR adds a dummy buffer to fill the missing attributes.
It also fixes an issue when using vertex attributes that
uses multiple binding locations (mat4).
Pull Request: https://projects.blender.org/blender/blender/pulls/111350
On a user level this view transform provides much better handling of colors in
the over-exposed areas.
With this configuration the following display devices are available, including
AgX view transform for them:
* sRGB
* Display P3
* Rec.1886
* Rec.2020
NOTE: There is no Filmic view transform available for the newly added display
devices.
AgX also brings an implementation of False Colors view transform, which replaces
Filmic-based, and is available for all display devices.
The backward compatibility is preserved. The new files will default to AgX view
transform, which makes it non-forward compatible.
More technical details is available in the original PR #106355.
Please note that the PR has been split into more incremental changes when
was landing.
Pull Request: https://projects.blender.org/blender/blender/pulls/111099
Depending on the usage of an image/image view different image aspect
requirements need to be used. When changing the layout of an image
all aspects needs to be included. When using it as a sampler or
framebuffer attachment only one aspect can be used.
This change also remove duplicated code when creating image views.
Pull Request: https://projects.blender.org/blender/blender/pulls/111349
Since menus are created flipped (from event handling point of view), the
root layout block needs to be flagged `UI_BLOCK_IS_FLIP`.
This was missing for a couple of `uiMenuCreateFunc`, namely:
- creating worspaces menu
- modifiers extra ops
- constraints extra ops
- GP modifiers extra ops
- GP Shader FX extra ops
Same fix as f51de2246c.
Not crtitcal, but could go into LTS I guess.
Pull Request: https://projects.blender.org/blender/blender/pulls/111341
An empty string is a valid ID property name, when set, RNA's
internal lookup function (rna_path_token_in_brackets), considered
the path invalid.
Now quoted tokens are allowed to be empty.
This fixes Python exceptions being thrown in the custom property editor
with empty custom property names.
Regression introduced in 69d6222481.
In that commit the `Depth` option of the placement started to override
the snap toggle. So only the `Suface` value had snap.
This commit also changes the behavior when triggering Placement.
Previously, snapping was forcefully enabled (in the case of `Surface`)
and snapping elements other than Face were used.
Now snap is only enabled if toggle is enabled.
Crash occurs when calling with `EXEC_DEFAULT` context.
In this case `text->filepath` might be `nullptr` and cause a crash.
Fix by raising a Python error message in this case.
Rectangle of text drawn on strip could be inverted, which triggered
assert in `UI_view2d_view_to_region_rcti_clip()`.
This was because scrollbar width was added to left side of rectangle.
Since now scrollers are drawn on right side, this offset is replaced
with same offset as is used for strip handles. Both sides of rectangle
are clamped to same range, so it will not get inverted.
In 384c2e1f36 it was assumed that `VIEWOPS_FLAG_PERSP_ENSURE` only
takes effect if Auto Perspective is enabled in preferences.
But that option is still required in camera view mode.
Therefore always set `VIEWOPS_FLAG_PERSP_ENSURE` if a navigation mode
requires it.
And add a comment explaining the reason.
Part 2/3 of #109135, #110272
Defines the RNA API for the new node tree interfaces.
The bulk of the RNA definition lives in `rna_node_tree_interface.cc`. The legacy socket interfaces remain in place and will be removed later.
Since the socket items share the `bNodeSocketValueXXX` structs with the `bNodeSocket` types they also use the same RNA. The `rna_def_node_socket_interface_subtypes` function is exposed so that when defining the interface RNA it can use the same code as the regular socket RNA.
Pull Request: https://projects.blender.org/blender/blender/pulls/110952
Using this flag from linked data is always a double-edge sword, in one
end some user have been relying on it to keep around data that is not
really used as ID (like e.g. text data-blocks, node trees, see
e.g. #103687, #105687). On the other end, it often causes over-keeping
of linked data reference in production files.
From now on, when an unused linked data is to be kept around, users
should create an ID property to reference it.
Implements #106321.
Pull Request: https://projects.blender.org/blender/blender/pulls/111042
Fixes NaN in Vector Displacement node caused by the normalization of
0, 0, 0 vectors.
This fixes both visual rendering issues and an "illegal address" error
on the GPU. The "illegal address" error came from the Light Tree
Sampling code not handling the NaN normals well, leading to weird code
paths being taken, eventually leading to a kernel_assert and a
user facing illegal address error.
Pull Request: https://projects.blender.org/blender/blender/pulls/111294
Customprops to IDs are supported since years through code, but were
never exposed directly in the UI of customporperties.
This commit mainly:
* Adds a new `DATA_BLOCK` type to UI customprops types.
* Exposes the existing `id_type` settings to python API.
Pull Request: https://projects.blender.org/blender/blender/pulls/110458
This PR implements indirect drawing for the Vulkan backend. Indirect
drawing is a requirement for workbench-next.
NOTE: that this is one of multiple changes needed to get to the same
support level. With this patch only objects at the center of the world
are drawn correctly.
Pull Request: https://projects.blender.org/blender/blender/pulls/111334
This allows adding debug calls to library
sources and not trigger an error for
all shaders that reference the lib.
The particular shader that need to use
it can set `drw_debug_print_enable` and
`drw_debug_draw_enable` in their main file
and it will trigger the injection of the
debug functions.
Blender's C++ data structures have configurable inline buffers used to
avoid allocation when the needed size is small. Use them in multires
code instead of an uglier C solution.
Pull Request: https://projects.blender.org/blender/blender/pulls/111070
Recent refactors could cause movement of selection endpoints when
extending (holding shift). This ensures that only the cursor side moves
during selection extension.
Pull Request: https://projects.blender.org/blender/blender/pulls/111288