The armature modifier calls `BKE_armature_deform_coords_with_mesh` (and
thus `BKE_id_defgroup_list_get`) for legacy curves as well, these are
only "riggable" via envelope weights though (this situation could be
made a bit clearer when parenting -- which is for another commit
though).
So to avoid the (rightful) assert in `BKE_id_defgroup_list_get`, only
call it in case vertex groups are supported (and possibly used later on
-- which is never the case for legacy curves).
Note: this was reported in chat by @LazyDodo because the CurveArmature
test was failing in debug
Pull Request: https://projects.blender.org/blender/blender/pulls/128792
The RNA function doc string / generated bpy documentation for the
`WM_cursor_modal_set` function was being overridden by the documentation
of `WM_cursor_modal_restore` due to a missing `func =`assignment.
Making the `cursor_modal_set` use the documentation of `cursor_modal_restore`,
and leaving `cursor_modal_restore` with no documentation.
Pull Request: https://projects.blender.org/blender/blender/pulls/126227
When using vertex displacement EEVEE didn't compile the generated
functions into the vertex shader. This could result in errors when
compiling materials.
**Notes**
- Should be back-ported to Blender 4.2
Pull Request: https://projects.blender.org/blender/blender/pulls/128525
When using OpenGL on Intel ARC the driver reports a max 3d allowed size
of 2048. The volume probe will create a texture that doesn't fit in this
dimension when selecting a probe size of 512 or 1024 MB.
This PR will reshape the volume pool atlas texture until it found a shape
that is optimal and fit on the device. When reshaping selects a different
pool size a warning message will be displayed as it might change the
visual quality.
When reshaping the smallest row size will be selected in order
to improve the occupancy. Reshaping will only happens when a
different setting is set in the `Performance->Memory->Light Probes Volume Pool`.
Pull Request: https://projects.blender.org/blender/blender/pulls/128518
In C++, in most cases empty braces (aka value initilization) are
the best way to initialize to 0/null (or the default values if
specified in the class/struct declaration).
This probably should always have been the value used, really.
Now, instead of reporting `Qualcomm Technologies Inc`, it reports the more informative `Snapdragon(R) X Elite - X1E78100 - Qualcomm(R) Oryon(TM) CPU` on a Thinkpad T14s Gen6 device.
Pull Request: https://projects.blender.org/blender/blender/pulls/128808
Replace 3x arguments and a return value with a structure
that stores the neighboring edges & loops.
Also call add_without_duplicates from a loop instead of inlining.
A new parameter, topology influence, is added that causes the
join_triangles operator to prioritize edge joins that create quads with
sensible geometry relative to existing quads, instead of selecting the
'flattest' and 'squarest' next pair and then leaving leftover triangles
with no partners to merge with.
This produces its best results with the face and shape thresholds set to
180 degrees (no hard limits as a restriction against merging) and
topology influence somewhere between 100-130%, depending on the mesh.
Too low and many parallelograms and triangles are left, too high and the
algorithm tries too hard and starts making errors.
Note that both quads already present in the selection, as well as the
quads that are generated during the operator, will influence the
topology around them. This allows the modeler to manually merge a few
quads in key areas of the mesh, as a hint to the algorithm, indicating
what result they way they want to see, and the algorithm will then take
those quads into account and try to build around them according to the
modeler's guidance.
A new checkbox to leave only the remaining triangles selected has also
been added. This helps users visualize what remains to be fixed.
Ref !128610
Previously, passing a falsy `std::function` (i.e. it is empty) or a null
function pointer would result in a `FunctionRef` which is thruthy and thus
appeared callable. Now, when the passed in callable is falsy, the resulting
`FunctionRef` will be too.
Pull Request: https://projects.blender.org/blender/blender/pulls/128823
Fixes an issue with the new node insertion feature where, after a link drag search,
the main input of the new node is connected to, regardless of which one was chosen.
Pull Request: https://projects.blender.org/blender/blender/pulls/128640
OpenEXR has many compression codecs exposed, with some of them arguably
not very useful. Generally, for lossless compression you want ZIP or PIZ,
and for lossy compression you want DWAA/DWAB. Reorder the dropdown
entries so that these are at the top just below "No compression".
Previously the not-really-great choice of Pxr24 was the first.
Add tooltips to all the compression codecs too, trying to explain
what each of them does in once sentence.
Remove "(lossless)" labels and keep only "(lossy)" -- this is much easier
to visually parse, since both of them were very similar to each other before.
Pull Request: https://projects.blender.org/blender/blender/pulls/128787
Second part to fix#128420.
On startup, the Blender File Outliner mode would show empty libraries
linked, pointing to the brush essentials files. This was because some
grease pencil versioning code would call
`BKE_paint_ensure_from_paintmode()`, which would link in the default
brushes. Then a bit later, brush assets versioning code would remove
local brushes from the default starup file, so the library link became
empty.
Initializing paint data shouldn't necessarily include importing default
brushes. In an earlier version I made this optional with a boolean, but
it's easy enough to separate out entirely.
Now `BKE_paint_ensure()` just initializes paint data, and
`BKE_paint_brushes_ensure()` has to be called to ensure that active
brushes are available.
Pull Request: https://projects.blender.org/blender/blender/pulls/128801
Replace 'over-allocation' by a standard `blender::Vector` storage for
the `wmGizmoProperty` target properties of the gizmo. This simplifies code somewhat, and
makes the code ready to manage non-trivial types of data.
Explicit default values are also given to all data of `wmGizmoProperty`,
as it appears that the default constructor will not nullify values in
the (trivial) embedded `custom_func` struct.
NOTE: There is much more that could be done in the wmGizmo area to make
it use modern C++ features. The scope of this refactor is strictly
limited to allowing C++ construction/destruction of the wmGizmoProperty
data, as it embeds a PointerRNA pointer that will soon become
a non-trivial C++ struct.
Pull Request: https://projects.blender.org/blender/blender/pulls/128763
This refactor contains the following changes:
* Each `PanelDeclaration` contains its direct children. Previously, it only knew
how many children it had. That added complexity to wherever we iterate over
the node declaration.
* Adds a new `DeclarationListBuilder` that is a base class of
`NodeDeclarationBuilder` and `PanelDeclarationBuilder`. It makes sure that the
same API for adding sockets, panels and separators exist for both.
* Modified declare functions for group, group input and group output nodes to
use the normal node builder api instead of doing something custom.
No functional changes are expected.
The main reason for this refactor is to simplify working with nested panels in
node declarations which is useful when we want to support nested panels in the
node editor. The node drawing code is not simplified in this patch, but that
should be easier afterwards.
Pull Request: https://projects.blender.org/blender/blender/pulls/128799
EXR DWAA and DWAB are conceptually similar to lossy JPG compression,
with a tunable file size vs image quality parameter. However, previously
Blender always used the fixed default setting, which is kinda similar
to very high quality (like 97) for JPG.
Internally EXR DWA/DWB quality parameter is inverted scale, i.e. 0 is
best/lossless quality, and increased setting value means decreased
quality. However the rest of Blender UI uses 1-100 JPG-like quality
scale, where values above 90 are "visually lossless", 100 is lossless,
and going below something like 50 would be visually quite lossy. So map
that to internal DWA setting:
- blender 100 -> DWA 0
- blender 97 -> DWA 45
The rest is linear relation based on those two points.
Pull Request: https://projects.blender.org/blender/blender/pulls/128790