Allow extending the DRWState on select_bind so backface culling can be used when needed.
Note: There's still a difference in behavior with Overlay Legacy, causing backface culled flat objects to still be selectable at the edges, due to the "MeshFlat" workaround.
Pull Request: https://projects.blender.org/blender/blender/pulls/135867
Resolves several int -> uint conversion warnings. Warnings like the
following will be printed otherwise:
```
|
225 | uint shadow_type = flags & 0xF;
| ^
| gpu_shader_text_vert.glsl:17:22: Warning: some implementations
may not support implicit int -> uint conversions for `&'
operators; consider casting explicitly for portability
```
Pull Request: https://projects.blender.org/blender/blender/pulls/135890
Fix an issue when the NLA is used in conjunction with a directly-
assigned Action.
When the directly-assigned Action is also used in an NLA strip, that
strip would not be evaluated any more. This was even the case when
different slots were used, which entirely muted the strip when there
was no slot directly assigned. Now the "this has been handled already"
logic considers the action and the slot.
Pull Request: https://projects.blender.org/blender/blender/pulls/135911
The "Merge Animation" operator now properly tags the affected Actions
with `ID_RECALC_ANIMATION_NO_FLUSH` so that new 'evaluated copies' are
created. Because this was missing, the animation evaluation code didn't
see the moved channelbags yet, which caused animation playback to be
broken.
Pull Request: https://projects.blender.org/blender/blender/pulls/135906
There is a bug in OpenEXR bug where it requests at least 4096 bytes even
if the file is smaller than that. Work around it by padding with zeros.
This was fixed upstream in commit 97f857131e6b4c43ab after the 3.3.2
release, but not in any official release yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/135796
The issue was that the `FCURVE_DISABLED` flag is set when an
RNA path cannot be resolved, and that skips evaluation.
However in the specific case, that is actually something expected as
the property only exists on one ID and not the other.
Pull Request: https://projects.blender.org/blender/blender/pulls/135782
**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
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
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
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.
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
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
Rather new code to build the asset library reference from a library
didn't cover the case where the current file library is saved to disk,
and as such implemented as on-disk library.
Possibly broken by acd1b0b7f9.
Though returning a collection property from an RNA function doesn't
seem to have been used before. The mistakes are relatively obvious.
The RNA parameter list data isn't initialized so placement new and
calling the CollectionVector destructor manually are necessary.
This fix is necessary for #135734 which is targeted at 4.4.
Pull Request: https://projects.blender.org/blender/blender/pulls/135746
Incorrectly changed in 9e8c037375.
The Grease Pencil `eraser_brush` property is still accessed and set
directly from Python, we cannot remove setting access to the property in
favor of the `AssetWeakReference` without first making other changes.
For now, this patch re-adds the RNA definitions for the property to make
it editable again.
Pull Request: https://projects.blender.org/blender/blender/pulls/135743
When setting these materials, then removing the modifier, usercount
would be decreased, resulting in possible dataloss on reload
Affected were:
- all Grease Pencil modifiers material influence materials
- `LineartModifier` `target_material`
- `OutlineModifier` `outline_material`
These were all using `IDWALK_CB_USER` which ends up decrementing
usercount in `modifier_free_data_id_us_cb` when the modifier is removed
So to resolve, decrement/increment material usercount in
`rna_GreasePencilModifier_material_set` appropriately
NOTE: previously, it was also doing `id_lib_extern` on the object?!
(should be on the material, no?)
NOTE: still not 100% sure where we actually use refcounting (esp. in
modifiers) and where we dont, another alternative is to just drop it and
use IDWALK_CB_NOP` (instead of `IDWALK_CB_USER`) for these materials.
Pull Request: https://projects.blender.org/blender/blender/pulls/135729
Crash occurs due to channeltype ANIMTYPE_GREASE_PENCIL_DATABLOCK added
to the filtered list when rearranging nla strips. This channel seems
unnecessary, it has caused crashes in past as well (d943c9f128). Animation data
on object other than drawing-keys are already handled by `animfilter_block_data`.
Pull Request: https://projects.blender.org/blender/blender/pulls/135375
In Grease Pencil length modifier, if a stroke is not filtered, it
may not have a valid point count/offset. This fix ensures that we
get valid point count by copying it beforehand.
Pull Request: https://projects.blender.org/blender/blender/pulls/135733
When duplicating a scene in any way other than Full Copy, the VSE data
is (apparently) not copied along. To prevent dangling F-Curves, any
animation of sequencer strips is removed. This is now done correctly for
slotted Actions, instead of looping over the legacy `action->curves`
field.
Also the F-Curve RNA path that's being tested for is updated. Instead of
deleting all F-Curves with `sequences` in the name, the code now
correctly looks for `sequence_editor.strips_all`.
Pull Request: https://projects.blender.org/blender/blender/pulls/135576
Fix a crash when the Scene's Action has F-Curves targeting the VSE
sequencer strips, but the scene has no VSE data at all.
This issue occurs in the following way:
- Scene uses VSE, with an animated strip.
- Duplicate the scene using Linked Copy. This does _not_ copy the VSE
into the duplicate scene, but does include its animation (due to a bug
for which a fix is coming).
- Ensure the Dope Sheet is visible & showing the scene animation.
Pull Request: https://projects.blender.org/blender/blender/pulls/135576
Caused by 4bf34d9591.
Nodes within frames were ignored because previously their location was
relative to the frame, so moving both the frame and the node would cause
"double" movement. Now each node location is independent.
Grease Pencil dash modifier wasn't merging strokes from strokes that are
unfiltered, resulted in only filtered strokes being shown afterwards.
This fix joins generated strokes with what's left behind so there's no
stroke missing.
Pull Request: https://projects.blender.org/blender/blender/pulls/135705
Reduce size of last endpoint gizmo on line primitives `size_primary` 8.0f
to be the same size of `size_tertiary` 3.0f. Circle and Box primitives are
unchanged as they don't have endpoints and a bigger gizmo doesn't affect
visibility. Motivation for this change is to increase visibility of the endpoint
while drawing since the default is too big for these type of lines and it
blocks the view of it.
Pull Request: https://projects.blender.org/blender/blender/pulls/135658
The curve widget in the redo popup would sent an undo push which it
shouldn't really. Since 1bde901bf2 such undo pushes will lead to
clearing of the last operation data, which is exactly what the redo
popup displays.
Buttons in operator redo UIs shouldn't send undo pushes. 179169d6c7
disabled them for the "Adjust Last Operation" panel, but not for this
redo popup. In fact there was other code to disable undo for these
buttons, but 2d2f23de10 put this into a wrongly scoped conditional
branch, so it was only executed on the first full redraw.
We can revert 179169d6c7 too now (confirmed already), but I'll do that
separately and not in the release branch.
Confirmed that the following related issues are all (still) fixed with
this:
- #55348
- #134505
- #135655
Pull Request: https://projects.blender.org/blender/blender/pulls/135730
Since the introduction of e53ac805af, viewer and previews were not
computed when rendering, because we assumed those would only be useful
during interactive compositing. But we received multiple reports that
this is broken. So users generally expect rendering to compute viewers
and previews.
This patch makes a distinction between background rendering and F12
renders, where the latter computes viewer and previews. This should not
have significant effect on the render time, because typically viewer
results are already computed as part of computing composite results.
Pull Request: https://projects.blender.org/blender/blender/pulls/135723
Use anonymous namespace to prevent naming collision allocating
structs of the same name.
Should resolve#134419 although I was unable to redo this bug.
Ref !135726