There is an issue in the GPU depth picking that is only visible
in official AMD/NVIDIA drivers. AMD does pick objects that are
around the cursor. NVIDIA drivers include any overlay objects.
This PR will disable GPU pick selection for AMD/NVIDIA official
drivers. This will limit some selection functionality.
This PR will be reverted in Blender 4.4 to find the root cause.
Ref: #128624, #127768
Pull Request: https://projects.blender.org/blender/blender/pulls/129863
When using a lot of instances the requested and needed attributes
are merged. This process uses a lock even when no work needs to be
done.
By early exiting the merging process when no work needs to be done
the performance of navigating 60k cubes went from 17.5 fps to 18.3 fps.
Detected when researching #126391.
Pull Request: https://projects.blender.org/blender/blender/pulls/129791
This implements the "Select Linked Pick" operator, by default exposed
in the keymap with `L` and `Shift-L`. This mirrors the existing operator
in legacy-curve edit mode and mesh edit mode.
The implementation is pretty simple, we just find the curve closest to
the mouse and change the selection of the points in that curve.
Pull Request: https://projects.blender.org/blender/blender/pulls/129885
This allows to use `assert()` directly inside shader source.
The current implementation is just replacing it with a printf
that gives some information about the location of the assert.
It is not that much more helpful than a printf with a condition.
What is useful is that they are disabled by default. So they
can be sprinkle around and only turned on during debugging.
Adding shader name inside the assert report is not trivial and
could be added later (the shader name is only known at compile
time which is too late for string parsing).
Adding which drawcall produced the assert isn't trivial either.
It would require flushing the printf buffer for each drawcall
which might force synchronization and remove bugs.
Pull Request: https://projects.blender.org/blender/blender/pulls/129728
When opening the asset shelf brush selector popup in paint modes, clicking on a
catalog on the left wouldn't refresh the popup properly. Two catalog items
would be drawn as active, and the active catalog change wouldn't be reflected.
Only some mouse movements would trigger an update eventually.
Do copy asset data when copying an ID into the PartialWriteContext.
Currently there does not seem to be any use-case where this would not be
the desired behavior. This can be made an optional behavior in the
future if needed.
The NodeDeclarationBuilder::typeinfo_ is unused in release builds, but is
used in debug builds for assert.
Mark it as `[[maybe_unused]]` to silence strict compilation warning.
Pull Request: https://projects.blender.org/blender/blender/pulls/129912
This lead to infinitely small return values from
`paint_space_stroke_spacing` (since the size can become so small) which
in turn causes an infinite loop in `paint_space_stroke`.
Was considering clamping to some other measure (e.g. based on bounding
box factors), but these might not work well in all circumstances
(dyntopo on a terrain-size mesh might still need tiny spacing), so
settled to clamp to the minimal numerical value.
Pull Request: https://projects.blender.org/blender/blender/pulls/129908
This was caused by `drw_ResourceID` taking one vertex input
(at slot 15) which was then also used by material shaders.
Starting material shaders at 14 in this case avoid the overlap.
Note that this reduces the amount of supported attribute when
using the workarounds by one.
- Change variable names for consistency
- Split common code to function
- Create simple struct with curly brackets
- Avoid random access to IndexMask
- Remove obvious comments
- Use const references for float3
This commit adds a minimal, simple detection for future, incompatible
blendfiles (in case the header itself is modified).
The current available info does not allow to be more specific, but at
least this avoids telling users that it is not a blendfile.
In the future, the new header format designed in #129309 for Blender 5.0
should allow for a better report (since the first 16 bytes of the header
should always have the same meaning from there on).
Pull Request: https://projects.blender.org/blender/blender/pulls/129875
The issue was that changing the area did not immediately update the
`snode->edittree` when changing between different node editor types. That update
only happened later in `node_area_refresh`. However, by that time, the `poll`
function of the modal operator has already succeeded even though when there
operator actually starts `poll` would not succeed anymore.
Pull Request: https://projects.blender.org/blender/blender/pulls/129870
Caused by 2 issues:
- Incorrect logic when checking if added key matches last key
- FPS mismatch not compensated in `SEQ_retiming_key_speed_set()`
Also `seq_retiming_evaluate()` output was not clamped to 0-1 range. This
was not causing issues in sample .blend file, but output should be
clamped.
Pull Request: https://projects.blender.org/blender/blender/pulls/129838