This is being added straight to 4.2, prior to the `make license` command
which will use this to generate a more complete license file.
Licenses information and ambiguities worked with Dalai Felinto.
Part of !129018.
When selection type is set/and for gesture selection tools, Instead of
current attribute, all three selection attributes (`.selection`, `left_handle`,
`right_handle`) are reset in every iteration of for loop.
Pull Request: https://projects.blender.org/blender/blender/pulls/129147
In grease pencil draw mode, enable the Draw, Erase and Utilities
catalogs by default for the asset shelf, meaning they will show up as
tabs in the shelf. For grease pencil sculpt mode it's the Contrast,
Transform and Utilities mode (consistent with mesh sculpt mode).
This makes the assets of the corresponding types easily available, even
without requiring the "Filter Brushes by Tool" asset shelf option
enabled. It also makes the catalogs and the contained brushes more
discoverable as an organization helper.
These catalogs were added in 09bd5a5777.
Disables the "Filter Brushes by Tool" toggle of the brush asset shelf
options by default.
After further feedback, we want to keep this option disabled by default.
It's useful to be able to access all brushes from the asset shelf,
regardless of what the active tool is. In many cases you'd see the asset
shelf with only one brush, which wastes space and isn't a good look
design quality wise. The following commit will also enable some more
asset catalogs by default which should be useful for filtering brushes,
and reduce the need for filtering by active tool.
So all things considered, while having this option is useful, it can
remain disabled by default.
The interpolation tool in edit mode would create an empty keyframe if nothing in the
`from_drawing` and `to_drawing` was selected. This is not how the tool behaved in GPv2
so this is unexpected.
The fix checks that if `only_selected` is used, there also is a selection in both of the
drawings in the pair, and otherwise fallback to interpolating all the strokes.
This is consistent with how the tool worked in 4.2.
Pull Request: https://projects.blender.org/blender/blender/pulls/129206
PR #128051 made some improvements to code by cleaning up properties and
simplifying logic.
However, the default tool in most spaces is box select. By switching to
box select default, there should be more front-facing consistency across
spaces while still retaining near-identical behavior.
This patch would fix the small bug listed in #128671 while keeping the
simplified code benefits from #128051.
Also:
- Move selection keymap items up in the Sequencer (Global) keymap so it
is more visible (similar to Node Editor ordering).
- Split `side_of_frame` property for ctrl press keymap item into a
separate keymap item on ctrl click for both LCS and RCS to avoid
clashing with ctrl+drag for box selects in RCS.
Pull Request: https://projects.blender.org/blender/blender/pulls/129028
When starting a docking operation from an assigned shortcut, the source
area will be incorrect if the Status Bar is not currently being shown.
This PR just adds defaults that are never valid window coordinates.
Pull Request: https://projects.blender.org/blender/blender/pulls/129187
This property was available for `layers` but was missed for layer groups.
Adds a `parent_group` property for layer groups that returns the
parent group if the group is inside another group.
For groups that are inside the root, returns `None`.
Pull Request: https://projects.blender.org/blender/blender/pulls/129168
If ifdef for `WITH_ANIM_BAKLAVA` accidentally removed the `else { ... }` branch
around `name = RNA_struct_name_get_alloc(...)`. For data-block names,
`BKE_id_full_name_ui_prefix_get` is used above which adds 3 extra letters before
the data-block name. This are removed again by the bug. Later code removes them
again leaving potentially an empty string.
Pull Request: https://projects.blender.org/blender/blender/pulls/129153
During the painting operation, the `GreasePencilDrawing` is updated in-place.
Previously, we simply tagged the whole drawing for a topology update.
This meant that the triangulation and curve normals were recomputed
for (pretty much) every new input sample.
Since the draw tool only creates one new stroke, we can copy the
triangulation of all the other strokes and only recompute the triangulation
of the newly drawn stroke(s).
First, a new `triangle_offsets_cache` is added that is lazily computed.
The computation for this should be pretty cheap.
Then, a new function `Drawing::tag_topology_changed(const IndexMask &curves_to_update)`
is added. This function takes an index mask of curves and only updates
their triangle cache. The cache for the other curves is copied.
In a test file with around 400k points, recomputing the triangle cache
(every input sample) took around 45ms. This meant that there was a noticable
drop in frame rate. With this patch, the time for each sample goes down to
less than 0.1ms. The frame rate feels much better.
But, drawing a longer and longer stroke still makes this time go up,
because the triangulation for the single stroke becomes more and
more expensive. This will have to be improved further.
Part of #124149.
Pull Request: https://projects.blender.org/blender/blender/pulls/129115
Changes would be lost (or worse things can happen, see below), so this
is now prevented by polishing the polls for these operations.
Behavior of Materials in override objects was considered shaky as well (lost
on reload, no undo or crash on undo, see #127605, #127606, #101552 in
general) , so conclusion was to prevent this on linked as well as liboverride
objects.
Pull Request: https://projects.blender.org/blender/blender/pulls/129064
From feedback: "Update Asset" sounds more like receiving a new version
of the brush, while this actually saves the changed brush to the asset
library. "Save Changes to Asset" is more clear and fits well with the
labels of other menu items in the menu.
The leak happens when there is a muted group node in a shader node tree which is
rendered. For rendering, the drawing code "localizes" the node tree which also
means duplicating the node groups used by each group node (might even duplicate
the same group more than once if it's used by multiple nodes). Generally, this
works fine, because all of these duplicates are freed when the tree is
flattened.
However, there is a preprocessing step which deletes all muted nodes from the
tree. This code path did not free the groups recursively.
Pull Request: https://projects.blender.org/blender/blender/pulls/129124
Design of the essentials asset library is to treat it as part of
Blender (as if it were compiled into the binary), so the location and
state of these assets is clear and can be assumed in code. User edits
are not expected.
Because of that we should only look for this asset library in the
installation ("system") location, not in the user configuration which
would take priority if present. On some devs machines this location
would actually be present, making the essentials unavailable and causing
confusing/misleading warning prints, see #128420.
When trying to select bones that are inside other bones which are not selectable,
the selection would fail. This is inconsistent with object mode, where unselectable
things are just ignored.
This patch fixes it for pose mode and edit mode.
Note that there are two areas for edit mode that were modified.
The one in `ed_armature_pick_bone_from_selectbuffer/202` is never actually reached,
but I added the code there for completeness.
The code in `get_nearest_editbonepoint` had to be modified some more to
implement a similar logic as `armature_select.cc/220`
Pull Request: https://projects.blender.org/blender/blender/pulls/129120
The "Set Handle Type" operator didn't check the curve types
(not if the curves are editable for that matter).
This fix retrieves the edtiable bézier curves and only changes
the handle types of those.
Running in a headless weston session was asserting, then crashing,
causing WITH_UI_TESTS to fail.
Resolve by accounting for a wayland sessions without a seat.
`rna_Particle_Material_itemf` was using the context object for getting
the materials.
This is OK when doing it through the UI (the context object is correct
in the Properties Editor, also when pinned), but might not be correct
when doing this from python.
So now do similar as in `rna_Particle_change_type`, iterate all objects
to find the one matching the `ParticleSettings` (but only do this if the
context object does not have a matching `ParticleSettings` already).
NOTE: `rna_Particle_change_type` could be sped up as well with this
method (checking context object first), might be for a separate PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/129101
In the case of weight, tilt or radius (these dont don't change [handle]
positions), dont change the handle types.
See the doc for `BKE_nurb_handles_test` ("Use when something has changed
handle positions")
NOTE: a siilar check is done in `createTransCurveVerts`
Pull Request: https://projects.blender.org/blender/blender/pulls/129056
The root cause is that the editor functions
(`retrieve_editable_and_selected_points` etc.) use the evaluated object,
while the operator poll which checks for the active layer uses original
data. The geonodes modifier removes all GP layers. The operator runs
anyway because the original data has an active layer, but then crashes
layer when trying to access the layer in evaluated data.
The fix here is to use original data throughout, which is usually the
data we want to look at for edit/sculpt/paint tools. There is a caveat
that the internal functions like `calculate_view_positions` still should
be using evaluated data for some things, like finding intersections with
other visible strokes. This isn't distinguished clearly atm and might
cause further bugs down the line.
Pull Request: https://projects.blender.org/blender/blender/pulls/129109
In Pose copy/paste case, (almost) all dependencies of the armature
object are cleared during the copy phase (only its obdata Armature is
kept). This would also clear ID pointers from the liboverride data if
the source object is a liboverride.
While manual handling of such cases is possible, it's simpler here to
simply make the data in the pastebuffer fully local, since only the Pose
part of it is used anyway.