This PR adds basic overlay support for `OB_GREASE_PENCIL`.
Currently it only renders the points and their selection status based on the ".selection" attribute.
Pull Request: https://projects.blender.org/blender/blender/pulls/108511
Painting weights in Grease Pencil with the auto-normalize option enabled,
gave unpredictable results when vertex groups with a weight of zero
were involved.
This patch resolves the issue. Vertex weights of zero are excluded from
auto-normalization. Which is a better fit for the Grease Pencil workflow,
where weights are mostly painted from scratch since the 'parent to
armature with automatic weights' operator doesn't give good results.
Pull Request: https://projects.blender.org/blender/blender/pulls/108524
No functional changes.
This commit reorganizes the transform mode functions by bundling them
into a struct called `TransModeInfo` in the file.
This structural change enhances the readability of the transform code
and simplifies the process of adding or removing modes.
Furthermore, this refactor allows for the inclusion of other essential
mode-specific values, such as 'input', which cannot be separated from
the code.
Overall, this commit improves the maintainability and extensibility of
the transform functionality.
Pull Request: https://projects.blender.org/blender/blender/pulls/108467
Steps to reproduce were:
- Open File Browser, set it to Thumbnails display mode, disable filters
- Navigate to a directory with documents that have no preview
- Change Preferences > Themes > User Interface > Icon Colors > File
Folders to light and dark colors
- See how the type icons on top of the white document icon image get
changed unexpectedly. Only type icons drawn on top of folder icon
images should change.
When drawing the document type icons on top of the folder or document
image in the center of thumbnails, they would always use the folder icon
color (Preferences > Themes > User Interface > Icon Colors > File
Folders) to determine if they should be drawn with a light or a dark
color. It should only use that when drawing on top of a folder icon
image, and the color for document icon images otherwise.
This PR changes the ranges of some of the operators in the Graph Editor to be more logical
The following operators have been modified to with a range of -1/1 with the default of 0
* Blend to Neighbor
* Breakdown
* Ease
This is a breaking change because python calls to these operators will now yield different results
(e.g. Blend To Neighbor at 0 does nothing now, while before it did blend to the left neighbor)
Pull Request: https://projects.blender.org/blender/blender/pulls/107173
When doing the second undo, the image wasn't properly marked for full
update.
There reason was that in some cases the partial_updater was
totally reconstructed: `first_changeset_id` and `last_changeset_id` were both 0.
While the `user_imp->last_changeset_id` was still its last value (e.g., 3).
The fix is to have the partial updater validator to check for the
last change set as well (it was only checking for the first change set).
This way we cover both scenarios when user_imp->last_changeset_id is out
of the range of the partial update history.
Pull Request: https://projects.blender.org/blender/blender/pulls/108533
This change will register a callback to Vulkan debug messaging
allowing us to filter out messages and log them using CLog.
This change only provides the initial changes, and more tweaks
are expected to on formatting and filtering.
Pull Request: https://projects.blender.org/blender/blender/pulls/107635
Failure to load an image-buffer during animation playback would exit,
display a text warning instead because it could potentially
exit during user interaction/playback.
No functional changes.
`TFM_TIME_DUPLICATE` is basically the `TIME_TRANSLATE` or `TRANSLATE`
modes.
The difference is that `TFM_TIME_DUPLICATE` merge duplicates keyframes
at the end of the operation.
It is an unexposed mode in python and promotes code duplication.
It has a similar initialization to `TIME_EXTEND` which redirects to
`TIME_TRANSLATE` or `TRANSLATE` depending on the spacetype.
As it is dependent on other modes (as well as `TIME_EXTEND`), it makes
things a bit more confusing.
There's no real benefit to creating a new internal mode just to
indicate this small change (merge duplicates).
So indicate in another way (by properties) that you want to merge
duplicate keyframes.
Pasting MTex referenced Texture & Object data-blocks without any
check for their validity.
This isn't ideal as it doesn't handle re-allocated ID's,
it just prevents a crash referencing freed data-blocks.
There are no relevant functional changes.
This commit removes the `Resize` fallback from `Shrink/Fatten`
operation.
This fallback is supposedly executed when the operation is called in a
mode other than mesh editing.
But even the `poll` of the `transform.shrink_fatten` operator restricts
its operation only for edit mode.
Furthermore, the fallback scenario is hardly encountered. To trigger
the fallback, the user would need to explicitly define, in the global
keymap, the `transform.transform` operator with the `Shrink/Fatten`
mode on and call it in a mode other than mesh editing.
(Although `transform.resize` could be used instead).
Therefore, considering the lack of benefits in using this resource, it
is better to remove it and prevent its use. Thus, simplifying the code.
References to data-blocks in a material were stored in-memory and could
crash if the data-blocks referenced by the material no longer existed
when pasting.
Resolve by using a blend-file for material copy/paste, matching how the
clipboard works in the 3D view-port.
Currently there is no support for including indirectly linked
data-blocks when pasting the material. Instead, data-blocks are restored
by name, by inspecting the current file.
This also fixes a crash where the `SpaceNode::nodetree` could point to
freed memory when pasting a material.
Ref !108496.
Includes contributions by @mont29.
When the temporary File Browser uses a maximized editor, it reuses the
File/Asset Browser under the cursor. When the file browsing action is
confirmed, the old editor state is restored but the file-list cleared,
so it fails to find the active asset and the ID it represents in
context.
Work around this by getting the ID before spawning the File Browser from
the operator.
When the loose edge and vertex status are cached in the source mesh and
the combination of selection domain and mode don't add loose elements,
copy the cache status to avoid recomputation. In a test with a 1 million
face grid:
- All: 23 -> 30 FPS
- Only faces: 22 -> 23.5 FPS
- Only edges and faces: 24 -> 27 FPS
Also remove unnecessary includes and fix a build error introduced in
the last commit to this area from an inconsistent forward declaration.
Excessive memory pool bloating could occur for certain workloads in
Metal. Particularly those which continuously allocate increasingly
large buffers with minimal re-use of existing buffers.
New logic added to the memory pool flushes old buffers if they
have not been used for a set period of time. Timing is calibrated
against system resources and overall memory pressure.
Metal memory pressure will run higher than OpenGL, however,
this is an active decision to provide significant performance
improvements for scenarios which allocate lots of memory and
for keeping frames queued in flight without stalling on pending
GPU work.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/108083
Certain textures require explicit HOST READ support for reading
data back to CPU. Given the compute based texture read path may
be used for this, if format conversion is required, this flag should
also imply general texture read support.
This resolves a bug with GreasePencil fill which relies on this.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/108463
The user count decrement and unassigning the action were split
between two different conditionals, which weren't guaranteed
to both execute/not-execute together.
Add loop selection identical to the behavior of ALT+Click in Edit Mode.
* ALT click: select loop
* ALT Shift click: add loop while retaining current selection
* ALT Shift Ctrl click: deselect loop
Pull Request: https://projects.blender.org/blender/blender/pulls/107653
Replace the implementation of the separate and delete geometry nodes
for meshes. The new code makes more use of the `IndexMask` class, which
was recently optimized. The main goal is to make more of the work scale
with the size of the result mesh rather than the input. For example,
instead of keeping a map from input to output elements, the maps used
to copy attributes go from output to input elements.
The new implementation is generally 2-4x faster, depending on the mode
and the number of elements selected. The new code is also able to skip
more work when nothing is removed.
This also allows using more existing attribute interpolation code,
allowing the overall removal of over 300 lines. Some of the attribute
utilities from a similar change for curves (f63cfd8e28) are
reused directly.
The indices of the result changes, so the test file needs to be updated.
Pull Request: https://projects.blender.org/blender/blender/pulls/108435
Using unique_ptr is typically the better practice since it makes memory
management automatic and makes ownership clear. Also use references
when retrieving items from the span, and don't unnecessarily specify
specific lambda captures.
Pull Request: https://projects.blender.org/blender/blender/pulls/108510