Using `UI_but_func_tooltip_custom_set()` to create a custom tooltip
would completely disable the quicker label tooltip, even when explicitly
set using `UI_but_func_tooltip_label_set()`. Instead the quick label
should show first, and then the full tooltip once the usual tooltip
timer is reached.
**How to reproduce:**
1. Add Cryptomatte Node
2. Enable 'Object' render passes
3. Connect Cryptomatte to output (composite or viewer node)
4. Optional: set matte ID
5. (Do not connect input image)
6. Render
7. Observe invalid output image (or assert in debug build)
(see also PR for an example blend file)
Only CPU is affected. The solution follows the behavior of the GPU backend, where the input color of the single value input image is multiplied with the matte result to produce a non constant output.
Pull Request: https://projects.blender.org/blender/blender/pulls/135786
Add an explanation to the keyframe insertion function
`animrig::insert_keyframes()` as to why it does not use
`ID_RECALC_ANIMATION`:
Animation flushing would be quite annoying in the following case:
- Key Cube's loc/rot/scale.
- Go to another frame.
- Translate, rotate, and scale the cube.
- Hover over the loc/rot/scale properties and one by one press 'I' to
insert a key there.
If `ID_RECALC_ANIMATION` were used, keying the location would immediately
cause a flush of the animation data, popping the rotation and scale back
to their animated values.
No functional changes.
**How to reproduce:**
1. Add Cryptomatte Node
2. Enable 'Object' render passes
3. Connect Cryptomatte to output (composite or viewer node)
4. Optional: set matte ID
5. (Do not connect input image)
6. Render
7. Observe invalid output image (or assert in debug build)
(see also PR for an example blend file)
Only CPU is affected. The solution follows the behavior of the GPU backend, where the input color of the single value input image is multiplied with the matte result to produce a non constant output.
Pull Request: https://projects.blender.org/blender/blender/pulls/135786
When saving a file, move the catalog service from the runtime asset library into the new on-disk
asset library. This makes all catalog data like the undo history and deleted catalogs be preserved.
The fact that a new asset library type gets allocated is an implementation detail that shouldn't
affect behavior.
Once the service is moved, an undo push is added (so this state can be restored to), and if the new
.blend file location can be associated with a catalog definition file, its catalogs are merged in.
Includes unit tests.
Pull Request: https://projects.blender.org/blender/blender/pulls/135589
This removes the use of `system_gpu_context_mutex`
which was making render command submission threadsafe.
The only issue is the concurent usage of GPUShader objects.
To fix this, we only guard the submission section which
are the only parts that uses the GPUShaders.
Removing this critical section all together requires some changes
in the GPUShader. See #135406
Rel #134690
Pull Request: https://projects.blender.org/blender/blender/pulls/135595
Material user count in duplicated ob.data is not updated. Separate layer
operation later iterates over all the material slots thenremoves unused
slots from respective objects. Since id.us=1 for individual material, if
material is used by one object but not the other, count is decremented
to zero. If we use `USER_DUP_GPENCIL` then user count is properly
handled in `grease_pencil_foreach_id/id_copy_libmanagement_cb`.
Pull Request: https://projects.blender.org/blender/blender/pulls/135769
When a layer channel is clicked to select inside dopesheet editor, this
sets the flag `GP_LAYER_TREE_NODE_SELECT` (i.e. is_selected() to true),
It prevents separate layer operation to create a new object for this
layer.
Pull Request: https://projects.blender.org/blender/blender/pulls/135765
This PR enabled GPU based subdivision on Metal.
Most work is done in #135296.
- Metal max storage bindings for compute shaders were never set.
Some performance figures: Suzanne 6 subdivision levels
| Machine | CPU Subdivision | GPU Subdivision |
| --------------- | --------------- | --------------- |
| M1 Studio Ultra | 7fps | 12 fps |
| M2 Air | 3fps | 11 fps |
Pull Request: https://projects.blender.org/blender/blender/pulls/135628
This PR enabled GPU subdivision on Vulkan backend. Measured
performance is slower compared to CPU on my system. But it is
expected that other bottlenecks should be solved in order to
fully benefit from this feature.
We enable it so we keep track of the performance bottlenecks.
Pull Request: https://projects.blender.org/blender/blender/pulls/135777
Update the animation filtering code so that the shape key properties
`.eval_time` and `.interpolation` are properly shown in the Shape Key mode
of the Dope Sheet editor.
Pull Request: https://projects.blender.org/blender/blender/pulls/135748
Adjust the "Remove Empty Animation Data" operator so that it properly
handles slotted Actions. It was still investigating the legacy F-Curve
list, and thus always considered Actions as "empty".
Pull Request: https://projects.blender.org/blender/blender/pulls/135740
Add a new RNA function `ActionSlot.users()` that returns the
data-blocks that are animated by this slot.
This covers direct assignment of the action & slot, but also use in
the NLA and in Action constraints.
```python
>>> D.actions['SuzanneAction'].slots['OBSuzanne'].users()
[bpy.data.objects['Suzanne']]
```
This was implemented as a function, and not a collection property,
because Blender's bookkeeping of the slot users can be marked 'dirty'.
In that case the slot user list needs to be rebuilt, which happens for
all Actions and all their slots simultaneously. This was considered
too broad a data-changing action to 'hide' inside a getter of a
property. Also it needs a `bmain` pointer, which is not available in
getters, but is available in functions.
Pull Request: https://projects.blender.org/blender/blender/pulls/135734
`GPU_vertbuf_update_sub` is used by GPU based subdivision to integrate
quads, triangles and edges. This is just an implementation to make it
work as we are planning bigger changes to improve performance of
uploading data to the GPU.
Pull Request: https://projects.blender.org/blender/blender/pulls/135774
It appears that 8 bit `blend_color_softlight_byte` call used a wrong
blending routing (overlay), while `blend_color_softlight_float` is
correct. Seems that this was never caught. The correct fomula should be
`dst = 2ab + a^2 * (1 - 2b)`.
Pull Request: https://projects.blender.org/blender/blender/pulls/135382
- When called from Python, the operator would always return
success even on failure.
- Errors are now reported to the operator or to the job-systems
wmJobWorkerStatus::reports.
- Failure now returns OPERATOR_CANCELLED;
- Replace magic numbers with an enum.
When the QuadriFlow was called with immediate execution `G.is_break`,
if the user had pressed Escape, the value could be set to true and the
operator would immediately exit reporting the operation was canceled.
WM_report was originally added for special cases however new code
has been using this in operators for example, where reports should be
sent to the operator via BKE_report, so the caller can handle,
and so Python can catch the errors.
Rename the functions to make them less easily confused with BKE_report
and add a code-comment on why their use should be avoided.
Properly pad the action scrollbar by calling
`ED_time_scrub_clamp_scroller_mask` which was overlooked. Also hide it
when the entire view is visible. Adds versioning code to hide console
and info scrollbars as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/135142
Mouse and action zone interaction for scrollbars depend on `v2d->vert`
and `v2d->hor`, which are updated through `view2d_masks`. However,
scrollbar drawing through `UI_view2d_scrollers_draw` calls
`view2d_scrollers_calc`, which pads these sizes further, meaning that
drawn scrollbars are slightly out of sync with their hotspots. This is
noticeable at track edges for shrinking scrollers or when tracks are
opaque. Fix by moving the extra (noticeable) padding code from
`view2d_scrollers_calc` to `view2d_masks`.
Pull Request: https://projects.blender.org/blender/blender/pulls/135021
Introduced in 0dd326592a
As written, the macro was not actually filtering out changes for the
Brush ID type when used inside `ed_undo.cc` due to operator precedence
issues.
This commit simplifies the macro by using `ELEM` to avoid similar errors
in the future.
Pull Request: https://projects.blender.org/blender/blender/pulls/135754
Various intermediate calculations would overflow inside both
`imb_save_openexr_float` and `imb_save_openexr_half`.
Additionally, use a raw array for the half conversion since `vector`
will perform an unnecessary zero-initialize on a large amount of memory.
Refer to: #135648
Pull Request: https://projects.blender.org/blender/blender/pulls/135678
Increase the default OIIO limit for uncompressed image buffers. Without
this Cycles could, among some other operations, encounter the following
type of error:
```
E0307 19:21:38.489921 2588 tile.cpp:634] Error opening tile file t:\temp\blender_a26776\cycles-tile-buffer-34740-2157603138768-0-0.exr
OpenImageIO exited with a pending error message that was never
retrieved via OIIO::geterror(). This was the error message:
Uncompressed image size 33645.6 MB exceeds the 32768 MB limit.
Image claimed to be 42000x42000, 5-channel float. Possible corrupt input?
If this is a valid file, raise the OIIO attribute "limits:imagesize_MB".
```
Users are able to bypass this themselves in two different ways if
the limit does not meet their needs.
The primary downside of this change is that it increases the memory
consumed if the file is actually malicious. Perhaps well beyond what
most consumer devices have available with physical+swap.
An alternate design would be to expose a System-level preference
for this limit and keep the default 32gb.
Refer to: #135648
Pull Request: https://projects.blender.org/blender/blender/pulls/135676
We are showing full paths to the library file on some tooltips, like
for brush assets. This PR checks to see if the asset is in the
BLENDER_SYSTEM_DATAFILES/assets folder. If so it just shows it as
"Built-in Asset:" and with the last portion of the path.
Pull Request: https://projects.blender.org/blender/blender/pulls/135593
When users make changes to certain settings from the editor (e.g.
changing the Proportional Edit or Snapping settings), an undo step is
created in the undo stack that has no effect when undone. These steps
should not be created, therefore this commit clears the `STRUCT_UNDO`
tag from the `ToolSettings` struct and any structs that it contains.
A prior commit, 0dd326592a, introduced filtering on the `STRUCT_UNDO`
flag for changes being applied from the UI.
Pull Request: https://projects.blender.org/blender/blender/pulls/134836