For points with locked material, add them to `src_to_dst_points`
as in they are outside the eraser ring to avoid deleting these points.
A new function is introduced to deal with it.
For stroke eraser mode, pass true in Indexmask `strokes_to_keep`.
Pull Request: https://projects.blender.org/blender/blender/pulls/133137
The name `id_root` was not descriptive, and was just a hold-over from the
equivalent (now deprecated) property on the Action itself. `target_id_type`
is more clear, reflecting that this is the type of ID the Slot is intended
to animate.
This PR also renames the corresponding `id_root_icon` to
`target_id_type_icon`.
Note that this PR updates the GLTF import/export core addon to adhere to
these name changes as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/133164
Did a pass through the code base to make sure the uses of `Action.idroot`
are correct in the context of layered actions.
I found and fixed one issue in Grease Pencil v2 -> v3 conversion code
where the idroot was being set to a non-zero value without checking if
the action was layered or not first. Other than that, I also cleaned up
a couple of dodgy-looking things I found.
Pull Request: https://projects.blender.org/blender/blender/pulls/133205
This was true for Opacity or Tint modifiers where influence vertexgroups
were having an effect on strokes, but were ignored for fills.
This was also the case for GPv2 / 4.2, but there is no apparent reason
for not doing this on fills (if we are doing it for strokes).
NOTE: it was actually in use if "Use Weight as Factor" was used (but
that only means weights should be used directly, otherwise [when used as
influence], weights should be multiplied).
Pull Request: https://projects.blender.org/blender/blender/pulls/133306
`Reset color attribute` operator currently removes the `vertex_color`
attribute from geometry. If selection exists, reset the color value to
1.0 instead of clearing the entire attribute.
Pull Request: https://projects.blender.org/blender/blender/pulls/133249
`apply_color_operation_for_mode` only deals with the selection mask if
vertex color mode is `Stroke` (or the attribute domain is `Point`).
Use similiar logic for `mode=Fill`(domain=`Stroke`).
Pull Request: https://projects.blender.org/blender/blender/pulls/133256
The File Output node no longer works inside node groups since the
introduction of the new CPU compositor. This is explicit in the code, so
we just consider all file output nodes recursively to fix this issue.
Randomization of stroke color(H/S/V), opacity, radius and rotation was
implemented using this formula:
`value = original_value * random(0~2)` (1)
Which was different from before Grease Pencil v3 rewrite:
`value = original_value + random(0~2)` (2)
This leads to different looks of the stroke. This PR fixes the problem
by implementing formula (2) for the randomization mixing to restore
original behaviour.
Also makes sure the values are correctly clamped to the expected ranges.
Pull Request: https://projects.blender.org/blender/blender/pulls/133032
Use BLI_uniquename_cb to check and fix naming conflicts, and keep track
of the potentially modified node names in a map.
Reserve the material name, so that later the output node can be renamed to it
without conflicts. Also make sure there are no conflicts with names auto
generated by MaterialX, by always naming nodes ourselves.
Pull Request: https://projects.blender.org/blender/blender/pulls/133234
The weights were only used when "Use Weight as Factor" was used (this is
wrong though, that button uses the weights directly, otherwise the
Factor has to be multiplied by the weights -- as done in all other
modifiers [and in 4.2])
Pull Request: https://projects.blender.org/blender/blender/pulls/133297
Code at the XR actionmap level is using calloc/free, but later when
conditions trigger WM_operator_properties_alloc in
`windowmanager\intern\wm_operators.cc` it is using MEM_new, which is
the mismatch. XR actionmap code needed to be modified to be compatible
with the allocators it is using.
Pull Request: https://projects.blender.org/blender/blender/pulls/133274
This error would occur because the quadratic equation solving code didn't
check for `a` being non-zero. Fixed by adding the additional check. This
can be tested and reproduced using the `ShrinkwrapTargetNormalProject2`
`modifiers` test.
Pull Request: https://projects.blender.org/blender/blender/pulls/133273
Resolve an error where the brushes from the image/3D viewport
where shared but the tool was not. Causing the brush not to match
the appropriate tool when both an image & 3D viewport were displayed.
Resolve the issue by adding support for a "pending" tool,
a tool ID which is to be used.
This accounts for cases where it's not known if the requested tool
exists and uses the same code paths for initializing tools as is done
for initializing on file load for e.g.
Ref !133085
API was defined only for movie strips. Define is also for Scene, image
and sound strips.
This required minor refactoring of how RNA collection type is defined.
Pull Request: https://projects.blender.org/blender/blender/pulls/133103
Enabling `use_snap_rotate` in 3D viewport caused rotation in sequencer
to apply snapping. Rotation snapping was using mixed snapping functions,
which aren't implemented in sequencer.
Ignore affect rotation/scale tool setting property and force increment
snapping to be used with these transform modes.
Pull Request: https://projects.blender.org/blender/blender/pulls/133272
Instead of the old time cursor, this will now show a progress bar in the
OS taskbar or dock, as well as the main window status bar. Along with the
job name and cancel button.
Pull Request: https://projects.blender.org/blender/blender/pulls/133174
When first starting the Mesh Bisect operator, the Status Bar shows
"LMB: Click and drag to draw cut line". This PR just changes that to
show the message with an icon instead. And adds "Cancel".
Pull Request: https://projects.blender.org/blender/blender/pulls/133244
When drawing strokes in Grease Pencil, some (custom) attribute values
stayed uninitialized. This was due to a tiny bug in the Draw operator
initializing only some attribute values of newly drawn stroke points
to their default value and not all of them.
This PR fixes that.
Pull Request: https://projects.blender.org/blender/blender/pulls/133216
In Sculpt, Vertex Paint, and Weight Paint, the operator used while
painting (`SCULPT_OT_brush_stroke`, `PAINT_OT_vertex_paint`, and
`PAINT_OT_weight_paint`) can currently be executed in python as they
define `exec` methods. However, each of them has a implicit dependency
on the `OperatorStrokeElement` struct containing a `location`
corresponding to the object space location of the stroke daub.
This limits the usefulness of the operator in non-interactive
situations, as determining the actual location of a stroke on a 3D
object requires access to the Paint BVH to perform a raycast and project
the mouse from 2D region space into object space.
To allow users to define a stroke in region space coordinates, this
commit adds a new parameter to the associated operators,
`reproject_stroke` which indicates whether or not the current `location`
data should be discarded and replaced with newly calculated positions.
Ref: #132960
Pull Request: https://projects.blender.org/blender/blender/pulls/132974
Currently tooltips on gizmo parts can pop up while holding your mouse
down, unlike other UI elements. And they don't disappear until a few
pixels into a drag. This PR solves both by removing tooltips on mouse
down on a gizmo part.
Pull Request: https://projects.blender.org/blender/blender/pulls/132576
Compilers do not seem to agree on valid printf format for `int64_t`,
recent clang 19 on linux requires `%ld`, while older compilers like the
buildbot ones of clang 15 on OSX ask for `%lld`.
So instead, cast the value to `int32_t`. Other solution may have been to
use `PRId64`, but this is fairly bad for readability.
Two things not behaving as in GPv2:
- points outside the influence vertexgroup were getting zero opacity (as
opposed to 1.0 in GPv2)
- Opacity Factor was multiplied in (even though it shouldnt and is
rightfully greyed out)
I assume the a misunderstanding in c02f3c94d9.
Pull Request: https://projects.blender.org/blender/blender/pulls/133208
No functional changes intended.
Some functionality from the brush asset system will be reused by the pose library.
To avoid duplicating code, the relevant functions are extracted to a common place.
All functions are moved as is, except for `visit_library_catalogs_catalog_for_search`.
For that I changed the `bUserAssetLibrary` argument to a `AssetLibraryReference`.
That is because in the follow up PR I am using this function with non user libraries as well.
This is a refactor PR extracted from #132747.
To get a full picture of the use case see that PR.
Part of #131840
Pull Request: https://projects.blender.org/blender/blender/pulls/132857
Some doxygen outputs would become invalid with this, e.g. XML output
would be `index to use when
<emphasis><computeroutput>index_dim</emphasis> > 0</computeroutput>`,
so the closing tags were placed in invalid order.
Check done by PartiaWriteContext writing code to ensure there is no
library ID written which filepath is the same as the destination
blendfile path of the context, was flacky in case there would be
multiple library IDs with that same path.
While this is not expected situation currently, it will likely change in
the future, so handle that properly, and generate a CLOG warning.
The handling of library for IDs added to a PartiaWriteContext in 'make
local' mode (i.e. to make them local in the written blendfile) was
flacky, leading to invalid removal of the ID name from the library ID
namemap in G_MAIN.
Now simply esure there is a local copy of the library too when adding an
ID to the context, even if it will be made local there.
Images used to be tracked with ownership in order to reset swap chain
images to its original layout. This isn't used anymore as we always mark
them in VK_IMAGE_LAYOUT_UNDEFINED to make the first pipeline barrier a
nop.
This change reduces unneeded complexity and safe a few CPU cycles.
Pull Request: https://projects.blender.org/blender/blender/pulls/133197
As established in issue #129849 , there are references to older versions of Grease Pencil that aren't needed.
This PR is meant to remove such references or, in places where otherwise `GreasePencil` is referenced
but `GPencil` is not, it changes the reference as for it to reference the v3 implementations in PaintMode.
It also removes `GreasePencil` from the list of options when declaring `PaintMode`.
Pull Request: https://projects.blender.org/blender/blender/pulls/131065