Fixed use of lists using multiple arguments - `list` only
support a single argument.
Noticed working with fake-bpy-module - providing multiple
arguments to `list` resulted in typing error (e.g. "Too many type
arguments provided for "list"; expected 1 but received 2").
Pull Request: https://projects.blender.org/blender/blender/pulls/134663
The main issue was that the code was using
`foreach_editable_drawing_with_automask` which shouldn't have been
the case since there is no "masking" to be done when pasting strokes.
Additionally the code was computing the view position of every
pasted point and then computing the offset to move the points to the
mouse position.
Instead, we compute the center of the 3d bounds of the pasted strokes
and then project only the center to the view. From there we can offset
all the points to move them under the mouse cursor.
It's a bit weird to do this projection of the center to the view and
I believe we mainly do it to reuse the `DeltaProjectionFunc`.
There are cases where the projection of the center to the view will fail
which can lead to unexpected behavior on the user end. For now we
just leave the pasted strokes where they were copied from, which
isn't ideal. But this can be improved later.
Pull Request: https://projects.blender.org/blender/blender/pulls/134589
The vulkan backend was implemented with async in mind, however the one place
where Blender uses for async was implemented blocking. This PR splits the
readback into flushing the command and waiting for readback.
**Performance**
Improvement of animation playback performance of shader balls.blend is around 10%.
Shader balls.blend frame: 1-100, 10 x animation playback
| Branch | Total time | Average time |
| -------------------- | ---------- | ------------ |
| blender-v4.4-release | 26851 ms | 2685 ms |
| This PR | 23675 ms | 2367 ms |
Pull Request: https://projects.blender.org/blender/blender/pulls/134227
This ends up being very simple because point cloud has
no connectivity information and each element is just one
position.
Also implement the 3D transform gizmo.
The geometry deformation system isn't implemented in this
commit. That can be tacked later.
Avoid calling `GPU_indexbuf_add_line_verts` and the triangle
version of that function. It's faster to avoid function calls and
just write to the data arrays directly. I did some very rough tests
and observed about a 10% improvement in runtime for the
entire index buffer creation process.
The warning to check if two numbers are nearly equal when comparing
floats didn't take negative numbers into account, causing -1.0 & 0.0
for e.g. to be considered not equal but close.
This also resolves a divide by zero.
Unlike to view containers like span, or implicitly shared containers like virtual array, this is simple container which is unique owner the memory. So its copy here also lead to N/8-bytes copy.
Pull Request: https://projects.blender.org/blender/blender/pulls/134617
Select All operator and boiler plate for future point cloud operators.
The selection code is basically copied/inspired by the curves selection
code. A lot of it could probably be moved to shared attribute selection
functions.
Note, while this patch is working well, there are some caveats
to test it:
* Shortcuts are being defined (you can see them in the Preferences). Yet
they are not working for whatever reason.
* There is no way to visualize the selection. I've been testing it by
using a Nodes tool that changes the material based on selection.
Pull Request: https://projects.blender.org/blender/blender/pulls/134450
Caused by 0b891a68b1
In certain cases, we need to perform a whole-geometry update to the
underlying mesh data. The prior commit cleared the paint BVH but did not
tag the depsgraph for geometry updates, causing incorrect data to be
used while rendering.
Pull Request: https://projects.blender.org/blender/blender/pulls/134597
Slight adjustments to the spacing of items on the Status Bar. Mainly
to reduce the distance between adjoining icons. Small decrease in space
between icon and text. Slight decrease in text size inside the event
icons. Proportionally wider gap between items.
Pull Request: https://projects.blender.org/blender/blender/pulls/134534
This shouldn't really affect the release since original point cloud data is hidden
but it might and the fix is trivial anyway: everything is selected when there's no
attribute, just like curves.
And replace nullptr arguments for tooltips in UI button
creation functions with std::nullopt. Though the distinction
between "no tooltip" and "empty tooltip" doesn't seem to exist,
it seems safer to keep the distinction since it existed with null before.
The missing sharing info shouldn't cause crashes currently, but since this
is the one place that CustomData is built "manually" it's better to do the
standard thing and create it.
With ba9417470e we are assigning keyboard accelerator shortcuts to
menu items containing toggles. This PR makes the assignment to these
new items not occur on the first pass of doing so. This is less
disruptive in that first-letter shortcuts will remain the same from
prior versions, with only mid-word shortcuts possibly changing.
Pull Request: https://projects.blender.org/blender/blender/pulls/134526
When copying (`Ctrl+C`) some ranges of points in the same stroke,
the points would still be copied as one stroke and not split into
multiple strokes.
This was a regression in behavior from 4.2.
Now we use the `remove_points_and_split` to split the selected
points into individual strokes.
The issue is that the existing curves did not have an explicitly set radius.
When adding new curves with an explicit radius, the radius of the old curves was
initialized to 0 and thus becoming invisible. This patch changes it so that all
the existing curves do get a default radius. The `radius_for_write` methods is
currently only used in places that overwrite the entire array, so adding the
default there shouldn't affect anything unintentionally.
Pull Request: https://projects.blender.org/blender/blender/pulls/134445
Now all creation, deletion and API is embedded in the struct. The
public API is only a thin wrapper around the struct API.
Previous code was mixing C and C++ code in confusing ways, and was
causing issues with changes worked on in blender/blender!134463, aiming
at better sanity and safety of our data allocations/creations and
freeing/deletions.
NOTE: There could likely be much more refactor fo this code, current
changes are kept to a (reasonable) minimum, to avoid spending too much
time on it.
Pull Request: https://projects.blender.org/blender/blender/pulls/134504