Both the operator and the brush have an "invert" setting for the fill
tool. The operator property is toggled by both editor keymap and modal
keymap, while the brush setting is toggled from UI. Both settings are
combined (i.e. inverting both works like regular fill again).
Pull Request: https://projects.blender.org/blender/blender/pulls/126042
This issue occurred only on Mac which has to circumvent
geometry shaders lacking support for them.
This patch reverts the vertex shader for Mac devices to
how it was before f9ea64b0ba. (and uses the frag shader from before that commit)
In order to communicate that to the user I added a label
in the GUI when the platform is Mac.
Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/125967
These functions used the term `curves` when we try to use the
term `strokes` at the user level. Renaming the functions and
the descriptions to be more consistent.
This changes the behavior when deleting the last key of an FCurve on layered actions.
Previously the FCurve would continue to exist, whereas now it is deleted.
This makes it consistent with legacy actions.
I modified the "Clear Keyframes" operator in this PR as well to make it work with layered actions.
Pull Request: https://projects.blender.org/blender/blender/pulls/125327
This adds a Python file that can be loaded into GDB to improve the debugging
experience. This is similar to cfb60c98be which
contains a subset of the features provided here. While not being compatible with
other debuggers, specializing on just GDB allows us to use the GDB Python API
which is quite feature rich. Besides adding quite a few pretty-printers, this
also adds some frame filters which simplify backtraces. I've been using the
pretty-printers for quite some time myself already.
I added a basic guide on how to set it up in `blender_gdb_extension.py` but that
only covers the case when using `gdb` directly. If this is accepted, I can add
some more detailed guides on how to configure e.g. vscode to the developer docs.
The patch also contains some type hints for GDB which I wrote, which simplify
working with the GDB API.
Pull Request: https://projects.blender.org/blender/blender/pulls/126062
Support merging by distanced for UV's with shared underlying geometry.
This can be useful for welding seams & cleaning up holes without
merging nearby UV's from disconnected vertices.
Ref !124221
The preview is only supported with deform modifiers which are
only supported for Mesh sculpting, so just write that implementation.
Also remove SculptSession::vert_positions which is now unnecessary.
Part of #118145.
Remove some uses of the `SculptSession` array in favor of retrieving
positions as necessary. Because of implicit sharing, avoiding unnecessary
mutable references to data can avoid copies and increased memory usage.
There are still more places to change before sculpt mode recieves that
benefit though.
SCULPT_mesh_deformed_positions_get was equivalent to
BKE_pbvh_get_vert_positions which already contains the result
of any deform modifiers. Use the same function to access both
to make it easier to remove both `SculptSession::vert_positions`
and `pbvh::Tree::vert_positions_` in the future.
Previously some work for applying shape key positions was
repeated once per undo node which probably made undo/redo
in that case much slower than it should be.
When we use icons that are multi-color, like for Tool icons, we'll
still need the ability to change their alpha at runtime. We do this
for hover effects, and as a theme setting.
Pull Request: https://projects.blender.org/blender/blender/pulls/126063
The WM API has WM_window_pixels_{x,y,coords}` functions that returns the
window size/point coordinate in the host native pixel size.
As "pixels" in itself doesn't really mean anything the intent of
these functions wasn't really clear. To clarify this, this commit
renames their prefix from `WM_window_pixels_` to
`WM_window_native_pixel_`.
Pull Request: https://projects.blender.org/blender/blender/pulls/125994
Removes the SculptPoseIKChain and SculptPoseIKChainSegment structs from
BKE_paint.hh, substituting them for the bare minimum vertex data needed
to draw the overlay using the pose brush.
Moves the needed structs into sculpt_intern.hh, ideally they should be
local to sculpt_pose.cc, but the chain is needed in StrokeCache, so
further refactoring is needed before it can be reduced in scope.
Pull Request: https://projects.blender.org/blender/blender/pulls/126009
There were two issues. One was that the normals VBO wasn't created
with the correct size. The other was that there were empty VBOs created
which can apparently also cause crashes.
Pull Request: https://projects.blender.org/blender/blender/pulls/126041
Moves SculptBoundary out of BKE_paint.hh and into sculpt_intern.hh
Like other cached data, this ideally should not be this exposed, but
reducing its inclusion in any other file that uses BKE_paint.hh is a
good start.
Pull Request: https://projects.blender.org/blender/blender/pulls/126010
Ever since b6a76243cd there was some redundant math
that just ended up with the value 1. Factor that out to simplify the code,
making future refactors cleaner.
This decreases BSDF_ROUGHNESS_SQ_THRESH so that the microfacet
roughness has a cutoff at much lower values and fixes a precision
issue in the bsdf_sample code that prevented this previously.
Pull Request: https://projects.blender.org/blender/blender/pulls/125919
SEQ_transform_sequence_can_be_translated, SEQ_transform_single_image_check,
SEQ_can_use_proxy can all trivially take const Sequence argument.
Made SEQ_give_frame_index take const Sequence too, by removing the
"modify seq strobe to be at least 1.0" code. The strobe itself is only
ever used inside the same function, and is already guarded by
"is strobe > 1.0" check.
Original code seems to be coming all the way from 2009 with
commit message "2.5. 12k lines of sequencer back!" (03fc5696dc).
Pull Request: https://projects.blender.org/blender/blender/pulls/126021
Prevent VSE cache returning image when running render job.
Previously, before render job was started, cache was cleared, but since
disk cache is not cleared, it returned an image. Now cache is not
cleared, but it does not return or store images when rendering.
Pull Request: https://projects.blender.org/blender/blender/pulls/125947
Previously, values for `ID.flag` and `ID.tag` used the prefixes `LIB_` and
`LIB_TAG` respectively. This was somewhat confusing because it's not really
related to libraries in general. This patch changes the prefix to `ID_FLAG_` and
`ID_TAG_`. This makes it more obvious what they correspond to, simplifying code.
Pull Request: https://projects.blender.org/blender/blender/pulls/125811