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
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
Dropping files could crash ~10% of the time on some systems,
although I wasn't able to reproduce the error.
The ownership of GWL_Seat::data_offer_dnd wasn't handled correctly,
where the value could be handled by both wl_data_device_listener::leave
& drop callbacks.
Resolve by ensuring the data-offer is handled by the drop callback.
In a Curves (not Curve) object, the MeshSequenceCache modifier is not
available from the "Add Modifier" dropdown.
However, the Alembic importer adds such a modifier onto the Curves
objects it creates. It is also possible to transfer such a modifier from
another object, regardless of its type.
Thus, this seems not to be an issue of compatibility of the modifier
with the Curves object type, but an UI/UX oversight.
`BKE_object_support_modifier_type_check` already has a correct check for
this, so just adding CURVES support to the appropriate menu.
Same is true for the POINTCLOUD type, so adding that as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/128756
Removes unused GPv2 functions in blenkernel.
Notes:
- Functions for layer masks are still in use, but annotations never
have layer masks in the first place. Would be good to remove the data
structures so we can remove the functions too.
- Some multi-frame edit functions are also still nominally used, but
multi-frame editing is not an active feature for annotations. This
should also be removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/128709
This allows the files to be re-used between x64 and amd64 builds
for Windows.
This adds 500 kilobyte of files, but they almost never change, they
are required for releases anyway, and having them in the repo solves
all sort of synchronization problems.
A new graphics is now used, as it was long requested by the UI and
release/PR team.
Pull Request: https://projects.blender.org/blender/blender/pulls/128588
getpwuid for accessing home wasn't used when looking up the path
for older Blender versions. There is no reason for the code-paths
to differ. Use a shared utility function to access home.
This introduces partial functionality of Precision mode to 'Snap to
Grid'.
However, it behaves differently from 'Absolute Grid Snap', as it lacks
smooth mouse movement.
Precision mode is now available specifically for Transform operations.
The issue occurred because the code block that read the snap flag was
out of sync with the code block that saved the flag.
The solution was to centralize snap flag handling in the
`transform_snap_flag_from_spacetype_ptr()` function. This function
retrieves the appropriate snap flag and property based on the editor
type, eliminating the need for repetitive conditional checks and
ensuring that the correct snap flag is set for each editor.
Allow Docking to work correctly if using a shortcut to the area header
context menu item. There is no longer a need to set the source or
target area locations.
Pull Request: https://projects.blender.org/blender/blender/pulls/128730
Reset the 'hierarchy index' runtime `temp_index` value for all library IDs.
This prevent the assert to be triggered when trying to rebuild libraries
hierarchy and there are some orphaned (i.e. not used by anything) library IDs
around.
After pushing down the Action to the NLA, it needs to be tagged for
reevaluation. The code was using `adt->action->id` for this, but since
the nature of the operator is that it un-assigns the Action itself, that
would always be a null pointer.
Pull Request: https://projects.blender.org/blender/blender/pulls/128707
The API did not initialize the `curve_type` for the newly created strokes resulting in unwanted behavior.
Set the curve type to the expected default: `POLY`.
The API would return `None` if the number of strokes in the drawing was `0`.
Instead this should return a slice that has a length of 0 to be consistent.
Adds an additional precheck to identify if the app cache dir is correct.
Reduces placing cache files all over the place when the app dir isn't
correct.
Adds a SPIR-V cache that skips frontend compilation for shaders
that are already compiled in a previous run of Blender.
Initially this was postponed to 4.4 but it was observed that
the vulkan backend didn't perform well on Windows in debug
builds. The reason is that the compiler would also be a debug
build which makes compiling a shader really slow. Starting
Blender on a debug build could take minutes.
So the decision was made to give this task a higher priority so
the vulkan backend would become more usable to developers
as well.
The cache is stored in the application cache dir. The SPIR-V
binaries can be used by different Blender versions so there
is no version specific cache folder.
**Sidecar**: SPIR-V files are a stream of bytes. There is no
header information that allow us to validate the stream. To
add basic validations we could add our custom header or
a sidecar. It was chosen to use a sidecar as having the SPIR-V
files unmodified allows us to load them directly in
debug tools for analyzing.
**Retention**: Shaders that are not used are automatically
removed with a retention period of 30 days.
**Shader builder**: Shader builder cannot use the SPIR-V
cache as it uses stubs that returns invalid cache directories.
This would load/save the cache to the location where you
started the build.
Pull Request: https://projects.blender.org/blender/blender/pulls/128741
Missed in 0161a19669
Unlike many other brushes, the Layer brush uses the original coordinates
of a given vertex only for the distance test when calculating the factor
and does not use it for other components such as textures.
Note that this commit looks larger than the change would imply, as it
required undoing a recent refactor that is no longer applicable with the
distance changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/128723
We no longer keep the active_vert value in a valid state when the cursor
is not over the mesh. The helper method to access this position can
thus result in incorrect behavior when storing and retrieving this
value.
In this case, we simply avoid setting the `UnifiedPaintSettings` values
related to the last stroke, so that when it is used in
`view3d_navigate.cc` it falls back to the object origin.
Pull Request: https://projects.blender.org/blender/blender/pulls/128716
Fixes a crash caused by a null pointer dereference when the Mesh Filter
tool with Erase Displacement option is used on a mesh that has no
Multiresolution modifier.
Pull Request: https://projects.blender.org/blender/blender/pulls/128632