Move keymap for brush radius/strength out of `km_grease_pencil_brush_stroke`.
Poll function of it skips primitive tools (see:`keymap_grease_pencil_brush_stroke_poll`)
Pull Request: https://projects.blender.org/blender/blender/pulls/132589
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
Use operator context of 'INVOKE_DEFAULT' for object.data_transfer and
object.datalayout_transfer in menu VIEW3D_MT_make_links so that they
work correctly when called from popup menus.
Pull Request: https://projects.blender.org/blender/blender/pulls/133228
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
Numerical instability mainly comes from adding values together which have very
different magnitude. There are algorithms to keep the error small like "Kahan
Summation", however those are also slower because of additional code in the hot
loop. This patch implements a simpler approach that is slightly less accurate,
but still seems to solve the cases that people commonly run into while being
simpler and faster. The approach is to simply compute a couple partial sums
first, and to add those up in the end. The individual partial sums can also be
computed in parallel. Care has to be taken to maintain determinism with floating
point values.
If accuracy is still not enough for some use cases, we can revisit this later
and e.g. use doubles or a better summation algorithm.
Pull Request: https://projects.blender.org/blender/blender/pulls/132759
This uses the following accessor methods in more places in more places:
`is_group()`, `is_group_input()`, `is_group_output()`, `is_muted()`,
`is_frame()` and `is_reroute()`.
This results in simpler code and reduces the use of `bNode.type_legacy`.
Pull Request: https://projects.blender.org/blender/blender/pulls/132899
Using the `BKE_id_owner_get` during the node tree update can avoid having to
iterate over lots of data-blocks in common cases. Previously, the code had to
iterate over all potential owners of node group to find the correct one.
Pull Request: https://projects.blender.org/blender/blender/pulls/132903
Generally, checkbox labels are not grayed out when they are not checked. Better
be consistent with other parts of the UI here. When I saw this, I was first
confused because it looked like I can't enable the values that are not checked.
This was introduced in #112393.
Pull Request: https://projects.blender.org/blender/blender/pulls/132180
Using `CLOG_INFO` and then reporting critical error is not very coherent,
nor practical, since INFO messages are not even displayed by default in
the console.
This was useful in the beginning to ensure we supported most surface
configurations. However it seems that there are not that many surface
configurations to support.
Pull Request: https://projects.blender.org/blender/blender/pulls/133186
`object_is_paint_mode()` returns true for objects that are not in active
interaction mode. This results in drawing of overlays for each Grease
Pencil object. Now fixed with adjusted condition.
Pull Request: https://projects.blender.org/blender/blender/pulls/132159
When calling bpy.utils.expose_bundled_modules(), these modules are
added to sys.path.
This provides a solution/workaround to two problems:
* Using bpy together with packages like usd-core is problematic. Besides
crashing due to C++ symbol conflicts, it's just impossible to import
different versions of the same module, or to have distinct environment
variables for both. (#127132)
* Blender add-ons using these VFX modules do not currently work with
the bpy module.
This adds about 15MB to the bpy package.
Pull Request: https://projects.blender.org/blender/blender/pulls/133082
The newly added "tangent_pair" calculation functions meant the names
didn't read well in some cases, use this style of naming for clarity:
- BM_face_calc_tangent_from_*
- BM_face_calc_tangent_pair_from_*
It was possible two quads at right-angles to each other would accumulate
a "tangent" that was co-linear with the it's normal.
Resolve this by calculating two tangents for each face, then using the
accumulated tangent that's least co-linear with the accumulated normal.
Normalize the calculated values in createSpaceNormalTangent in
preparation for additional error checks that require the values
to be normalized earlier on.
- createSpaceNormalTangent now normalizes the resulting normal & plane.
- createSpaceNormalTangent_or_fallback has been added that initializes
the matrix even if the tangent or normal aren't usable
(this was previously being done inline).
- createSpaceNormalTangent now returns false if the final tangent
is zero length (this was previously unlikely but possible).
- Remove redundant vector normalize calls.
- Use "r_" prefixed return arguments, order them last.