When in grease pencil drawing mode, user could pin material or vertex
color to a specific brush or fill tool, but when switching tools, the
display and the logic of how those pinned material/vertex color are used
is inconsistent, leading to confusion.
The main cause of such problem is that the new GPv3 brush/fill tool is
not respecting pinning status, on top of that, user interface display
logic is also wrong. This PR makes sure that:
- Brush/fill tools respect pinning status.
- Buttons on the tool bar always display correct pinning status.
- Brush cursor will use correct color based on pinning status.
Pull Request: https://projects.blender.org/blender/blender/pulls/130968
When point/stroke/segment selection is enabled and few elements are
selected, perform operation on them instead of entire range of editable
points. For that, pass a `is_selection_mask` boolean to
`apply_color_operation_for_mode` then get indexmask of selected points if
boolean is true.
Pull Request: https://projects.blender.org/blender/blender/pulls/130789
There is a different operator in the graph editor for jumping between
frames. This operator lacked the correct update tags and functions that
is in screen_ops for the other timeline editors.
Pull Request: https://projects.blender.org/blender/blender/pulls/130924
Layer tracking allows modifying specific layers of a bound texture to a
different layout. This was only supported when suspending/resuming was
not needed. However when using complex scenes EEVEE can trigger suspend/
resume rendering scopes. This resulted into several validation warnings
as images where in the incorrect state.
Fixes validation warnings:
- rain_restaurant.blend
- classroom.blend
Pull Request: https://projects.blender.org/blender/blender/pulls/130957
Inside legacy GP -> GPv3 conversion, legacy vertex group `def_nr` was
incorrectly guarded by the group count of each vertex, which can lead to
missing groups since not all vertices will have weights in all groups.
This fix use the total vertex group count to guard invalid `def_nr`
values.
Pull Request: https://projects.blender.org/blender/blender/pulls/130886
This PR renames `ActionSlot::name` to `ActionSlot::identifier` for both DNA and
RNA, and also renames related methods, functions, constants, and comments.
The purpose of this rename is to help make it clear that this is not a "name"
in the traditional sense, but rather is a composite of the slot name + id type
for lookup purposes.
Ref: #130892
Pull Request: https://projects.blender.org/blender/blender/pulls/130740
Grease Pencil `interpolate_between_curves` call will correctly sample
and interpolate curves, but it doesn't add any vertex group names in the
resulting curves, some other systems that rely on `defgrop` will not
work correctly even when those vertex group attributes are in place.
Copying vertex group names to result curves solves this problem.
Pull Request: https://projects.blender.org/blender/blender/pulls/130954
`AnimData`, NLA strips, and action constraints all have an
`action_slots` field in RNA. The purpose of this field is to list
the slots of the currently assigned action (if any) that are suitable
for the relevant ID.
However, this is not clear from the naming. In particular, given that
there is another field `action_slot` that represents the currently
assigned slot, the name `action_slots` could be easily misinterpreted
as a way to assign multiple slots at once, which is not possible.
To help clarify its actual purpose and meaning, this PR renames the
field to `action_suitable_slots`.
As a bonus, this also ends up decluttering the Python autocomplete when
looking for things related to `action_slot`.
Ref: #130892
Pull Request: https://projects.blender.org/blender/blender/pulls/130754
Grease pencil build modifier additive mode has two problems that is
causing crashes and wrong build result when drawing in additive mode:
- Not assigning `dst_to_src_curve` for previously built curves.
- The way `previous_drawing` was acquired was wrong, this gives a zero
stroke count for additive build mode, which prevented the crash while
not in drawing mode (not on key frame), but is in fact incorrect for
the algorithm.
This PR handles these problems and additive mode now works correctly
and without crashes while drawing new frames.
Pull Request: https://projects.blender.org/blender/blender/pulls/130952
Currently `VkCommandBuffer` are allocated with `vkAllocateCommandBuffers`,
however when the commands are submitted pointer are just reset, these leaks
are visible with just play back animations.
This frees commands buffers resolving the leaks.
Ref: #127225 Although related we should check the result as there could be more causes.
Pull Request: https://projects.blender.org/blender/blender/pulls/130203
`gpModelMatrix` needed to be set by reference.
Reference needed to be float4x4.
float4x4 cannot be inside C allocated struct (alignment).
Move the `object_bound_mat` to the instance struct
to workaround this issue.
Joining and Docking tag the source and target areas for redrawing. But
there are times when areas are split and recombined as part of the
processes. In some cases areas that are not either source or target
must also be tagged for redraw. Especially for Outliner and 3DView as
they try to avoid full redraws with RGN_DRAW_NO_REBUILD, but needed
here.
Pull Request: https://projects.blender.org/blender/blender/pulls/130801
#126806 stopped the drawing of horizontal scrollbars when the areas
were very short. However this still left their hit areas still
active. This PR properly removes the scrollbar in this situation by
also changing the v2d.scroll flags.
Pull Request: https://projects.blender.org/blender/blender/pulls/130764
These are useless now that PointerRNA has explicit default values, and
become a problem when real constructors are added to this struct. Simply
use the default empty value initialization instead.
Pull Request: https://projects.blender.org/blender/blender/pulls/130927
When the recent files list is shown on the Splash screen, the
horizontal size is constrained and so longer items will have their
names truncated. This PR adds the file name as the first item in the
popup tooltip.
Pull Request: https://projects.blender.org/blender/blender/pulls/130875
This replaces the existing C API of `BLO_Write_IDBuffer` with a C++ API. This
helps because:
* No need for explicit freeing.
* Can use more generic `DynamicStackBuffer` utility instead of having a separate
implementation of that.
Additionally, the API is changed so that a new `BLO_Write_IDBuffer` is created
for each `ID` instead of reusing the same for multiple IDs. This simplifies the
code quite a bit and allows for better use of the RAII pattern.
I expect the performance to be the same as before. In theory, there could be a
small speedup, because the `BLO_Write_IDBuffer` is not allocated separately
anymore, but that should be negligible.
No functional changes are expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/130452
The converter is an abstraction that takes a base mesh to be subdivided
and provides its topology information to the OpenSubdiv library. It does
this with one level of indirection: first extracting the base mesh
topology with a virtual function call per element to local arrays,
then giving the information in those arrays to OpenSubdiv.
That level of indirection also handles cache invalidation for the
intermediate data structures which optimize repeated subdivisions of a
changing base mesh with constant topology. However, these days the mesh
data is stored with simpler to compare data arrays, and we also have
implicit sharing which provides another way to detect unchanged
shared data.
As a very first step to a design where we use OpenSubdiv more directly
and don't store duplicate topology arrays for the base mesh, this PR
provides the converter with the mesh's face offsets array directly
rather than using function calls. For multires reshape the temporary
format is changed to match.
Next steps will do the same thing for face vertices ("corner verts" in
Blender lingo), edges, and creases. Then we can remove the "converter"
indirection completely, then we can work on a better cache invalidation
strategy using implicit sharing. That's a ways off though. On its own,
this PR should just reduce function call overhead a bit.
Reference #130917.
Pull Request: https://projects.blender.org/blender/blender/pulls/130241
Implements #130836:
interpolate_*_wrapmode_fl take InterpWrapMode wrap_u and wrap_v arguments.
U and V coordinate axes can have different wrap modes: clamp/extend,
border/zero, wrap/repeat.
Note that this removes inconsistency where cubic interpolation was
returning zero for samples completely outside the image, but all other
functions were not, and the behavior was not matching the function
documentation either.
Use the new functions in the new compositor CPU backend.
Possible performance impact for other places (e.g. VSE): measured on
4K resolution, transformed (scaled and rotated) 4K EXR image:
- Nearest filter: no change,
- Bilinear filter: no change,
- Cubic BSpline filter: slight performance decrease, IMB_transform
19.5 -> 20.7 ms (Ryzen 5950X, VS2022). Feels acceptable.
Pull Request: https://projects.blender.org/blender/blender/pulls/130893
Ensure no bezier curves for offset modifier, this makes it consistent
with the rest of the grease pencil modifiers for now and we will make
bezier support for the rest of the modifiers later.
Pull Request: https://projects.blender.org/blender/blender/pulls/130901