Since VSE HDR preview was implemented (18110744a2), the preview image
is put into RGBA 16F format "color texture", and the overlay
(checkerboard, grids etc.) is put into RGBA 8U format "overlay texture".
This was rendering the color image as NON premultiplied alpha in
the viewport color texture, which is not what happens in other places
(e.g. image space).
Later commit (c279d894db) fixed transparency of the overlay texture,
in order to make pure emissive (color non zero, alpha zero) colors
from EXR files show up in VSE preview. However that exposed the issue
that underlying color texture is not premultiplied.
Fix this by premultiplying the output color in gpu_shader_display_transform
that is used by VSE preview. This is done at the end of the shader
isntead of using fixed function blending, since premultiplication needs
to happen in a way that preserves pure-emissive colors.
Comparison images in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/147892
We have icons that represent specific individual collections. like
Icon_Outliner_Collection for a default (uncolored) collection, and
Icon_Collection_color_x for ones with colors. For "collections" as a
general thing though we have icon_group. Sometimes we confuse the two,
for example the list of tabs to show in Properties uses a different
icon than the actual category icon. This PR fixes the complaint by
using the correct icon for each of these purposes.
Pull Request: https://projects.blender.org/blender/blender/pulls/147942
The previous commit 80e8493c11 was incorrect. I must have
tested it incorrectly, because `BLI_path_contains` only tests the
beginning of the path. Instead just make the shorter asset path
native, and explicitly use StringRef for the test.
The RNA property had an incorrect update callback assigned. The
update callback assumed the RNA pointer data was a node rather
than a node's viewer item.
I think the special handling for string input node, added in #139478,
was broken by #146033. The early check for src_value (`if (!src_value)`)
caused the string-specific logic to be skipped. This PR moves the
string-specific handling before the src_value check.
Pull Request: https://projects.blender.org/blender/blender/pulls/147697
Snap translation to the world grid when absolute grid increments is
enabled. Previously, absolute increment snap shifted in perspective
view, causing objects to misaligned with the world grid.
Resolves regression introduced since 3.6.
Ref !147246
Resolve regression in [0] which hid transform overlay in the image view.
The indicator now displays when overlays are enabled in the UV editor.
[0]: 1df4a09539
The flag that skips objects for snapping (`BA_SNAP_FIX_DEPS_FIASCO`) is
set for all objects that have a `DEG_OB_COMP_TRANSFORM` relation.
However, when the **Affect Only Parent** option is enabled, children
are not transformed and therefore could still be snapped to.
Despite this, the `DEG_OB_COMP_TRANSFORM` dependency remains present on
them.
To address this, a new callback was introduced that skips
Transform-to-Transform dependencies while preserving
Transform-to-Geometry dependencies in this scenario.
This approach may introduce some false positives, leading to spurious
dependency cycles (e.g., when constraints are involved).
Nevertheless, the trade-off favors accepting these false positives
rather than disabling the feature altogether.
Also make non-functional change that just removes a flag before the snap
loop, thus avoiding checking if the flag exists inside the loop.
Ref !142007
There was a bug in the move_weld_profile_planes function where
it would only move the profile plane involved in a "weld" if
certain vectors were not too small (less than BEVEL_EPSILON in
length). The intent of the code was just to avoid problems with
zero length normals (post normalization), and the normalize_v3
function indicates that with an exact 0.0f return, so there was
no need for an epsilon test.
The example file in the issue had a small-scale model (100 times
smaller than typical), which ended up causing the old code to
prevent moving the profile plane to where it belongs.
Pull Request: https://projects.blender.org/blender/blender/pulls/147898
Disabling (at least temporarily) the fading animations shown during and
after some area maintenance routines (like splitting, joining, closing)
as this causes memory leaks during automated testing. This doesn't
occur during regular usage, just when the window is closed within the
animation time. We'll look for an improved solution in the future.
Pull Request: https://projects.blender.org/blender/blender/pulls/147890
Some tooltips pop up up instantly with just a word or two and then
expand later to show more information, for example for the Properties
categories. This type of tooltip is not considering padding when
clamping to the window bounds, making it possible for them to be
positioned in such a way that clips some content. This PR just adds
padding to the window bounds.
Pull Request: https://projects.blender.org/blender/blender/pulls/147835
eevee_geom_world_vert.glsl and eevee_geom_volume_vert.glsl do not
support shadows, but the shader validation pipeline still compiles the
shadow variant of these shaders. This results in the fragment shader
reading from inputs that are not written to as vertex shader outputs.
On the Intel Windows OpenGL driver, this leads to a shader linking
failure. This PR avoids the issue by writing zeros to the interface
variables when MAT_SHADOW is defined.
Pull Request: https://projects.blender.org/blender/blender/pulls/147821
With changes to the playhead to correctly draw when separated from the
vertical line (for time stretching) some parts are slightly misaligned.
This PR corrects the vertical alignment of the top of the triangular
part to the number box. It also corrects horizontal alignment of the
vertical line to be pixel-aligned based on the interior, not the shadow
exterior.
Pull Request: https://projects.blender.org/blender/blender/pulls/147825
eevee_geom_world_vert.glsl and eevee_geom_volume_vert.glsl do not
support shadows, but the shader validation pipeline still compiles the
shadow variant of these shaders. This results in the fragment shader
reading from inputs that are not written to as vertex shader outputs.
On the Intel Windows OpenGL driver, this leads to a shader linking
failure. This PR avoids the issue by writing zeros to the interface
variables when MAT_SHADOW is defined.
This function is used to add undo steps. It includes a message, for
use in the Undo History menu. This label uses the "Operator" context
for translation.
This commit adds automatic extraction of two functions `ED_undo_push`
and `ED_undo_grouped_push`, as well as manual extraction for many
strings not declared in the function calls.
In order to extract those messages using the proper context, the
extraction logic had to be changed so that a custom context could be
specified. The regexes can now be either a pattern, or
a (ctxt_override, pattern) tuple.
Pull Request: https://projects.blender.org/blender/blender/pulls/147581
Tooltips could crash where callbacks receive the wrong argument.
This is because the swap function was missing the `custom_tip_func` callback,
but was swapping the callback argument.
Pull Request: https://projects.blender.org/blender/blender/pulls/147806
This seems like an out of memory issue where the storage
buffer could not be allocated but still used as a destination
for a copy. After an out of memory issue memory can be fragmented
and any allocation can still fail.
On `AMD Radeon(TM) 890M Graphics Advanced Micro Devices AMD`
`24.30.58` I got to multires subdivision level 2+6 using the steps
described in the report. 2+7 is failing for me. 2+6 already requires 16GB
of memory using large chunks.
OpenGL and Vulkan work with other limits and memory models and can
have different behavior. This PR only improves the mentioned issue, but
can still fail in other areas.
Pull Request: https://projects.blender.org/blender/blender/pulls/147713
In certain scenarios, the Node Editor lacks the `RGN_TYPE_ASSET_SHELF` &
`RGN_TYPE_ASSET_SHELF_HEADER` regions.
That is because the versioning code from 0a0dd4ca37 only creates these
for Node Editors that are Compositors.
That does not seem right. The thing is, if you change a non-node Editor
(e.g. an Image Editor) to a Compositor editor, all is fine (`SpaceLink
*node_create` gets called, the regions set up correctly), but changing
an **existing** node editor (e.g. Shader or Geometry Nodes) to a
Compositor, no new Space gets set up (rightfully so) and we are then
missing the regions.
I dont really see an issue with having the versioning setting up shelf
regions for **all** node editors (the shelf polls will already take care
of it only showing in the Compositor) which is what this PR does.
Now we are in the unfortunate situation that people might have saved
their `startup.blend` (or other files affected by that) in the meantime,
so versioning will not kick in anymore, so we probably have to do
another versionbump (which will happen in `main`).
Pull Request: https://projects.blender.org/blender/blender/pulls/147689
The `ScreenAnimData` which is saved to the animation timer on the
screen during playback stores a pointer to the scene that is playing.
When deleting a scene, the next time the timer is triggered this will
result in an invalid pointer de-reference.
This fixes the crash by stopping the playback when a scene is deleted.
Pull Request: https://projects.blender.org/blender/blender/pulls/147687
Compositor crashes when connecting a menu output to a float input, this
is because no implicit conversion is supported between the two, and no
handling was done in this case. To fix this, we fallback to a default
value for unsupported implicit conversions.
Pull Request: https://projects.blender.org/blender/blender/pulls/147801
This seems to be a Mesa driver error.
Discarding the buffer before the area drawing fixes the
issue.
Given this is an expensive operation, we try to only do it
where it is needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/147733
Root cause is, that reverse playback would not call
`BKE_sound_play_scene()`, however `BKE_sound_stop_scene()` was called
always.
There was some weird logic in `ED_screen_animation_play()` where
condition for what sound scene was to be stopped exactly was inverted
for sequencer and duplicated for non-sequencer scene. This may also
be incorrect if somebody manages to start playback in active scene, then
create sequencer scene and stop it there.
Fortunately `ScreenAnimData` keeps pointer to scene which started
playback, so this is used to also stop the playback.
To make this code bit more readable, the function was split into
functions starting and stopping the playback, so the logic can also be
simplified a bit.
Finally, `sound_device_use_end_after()` was modified to do sanity check.
If the number of users is already 0, it does nothing and returns.
There assertion to catch this in debug builds.
Pull Request: https://projects.blender.org/blender/blender/pulls/147613
On certain platforms Blender can crash on startup after the update of
VMA. This was because we want to select the correct memory area based on
requirements/preferences, but the overall flag was set to auto.
These options are mutual exclusive. This PR changes the flags to use the
requirements/preferences.
Pull Request: https://projects.blender.org/blender/blender/pulls/147781
This read as if it enabled window decorations.
Clarify & update the doc-strings of windowing arguments to be consistent.
Also order their inclusion in --help more logically.
Bug report #146812 shows areas being vertically resized incorrectly
when there are multiple areas at minimum height adjacently aligned
at the bottom with the lower one being a SPACE_ACTION-type editor.
So timeline minimized at the bottom with another minimized area
directly above it and then window height is increased. Our code that
scales area vertices has specific code to keep a minimized timeline
at minimum height when at the bottom with increased window height. We
also have code that ensures that all areas are at least minimum height.
These two things conflict in this specific case because they are both
done while relying on area->winy, which is not updated between
operations. This PR uses screen_geom_area_height instead, which uses
screen vertex distances.
Pull Request: https://projects.blender.org/blender/blender/pulls/147764
The Selection to Active operator failed when the selected object was
parented to the active object. Fix by allowing child objects to move to
the active object unless "Offset" is enabled.
Ref !147204
A combination of a linear gradient with the 'Sphere' distance curve
preset could cause NaN values due to evaluating the sqrt of a negative
value. To avoid this, clamp the input value to a lower bound of 0.0f.
This fixes the Smooth, Sphere, and Inverse Square presets.
Pull Request: https://projects.blender.org/blender/blender/pulls/146693
Mesh invariants imply that edges and faces must be unique, so things
like reversed edges or duplicate faces with equal vertices are invalid.
For this reason, every time we generate new elements we have to ensure
that all new elements are unique between each other and already existing
elements. The recent refactor (ea875f6f32) introduced a new
algorithm to generate new mesh elements, and deduplication of new
elements was also a part of it. The problem is that the deduplication
only guaranteed that the original elements and new elements don't
overlap; deduplication between each new elements is not complete.
To solve the problem both new triangles and new edges have to be
deduplicated, even if there is no duplicates. Just to know this we have
to build a hash sets.
Triangle deduplication is a special part of the triangulation code,
but edges already handled elsewhere in the code base.
This refactor fixes this by replacing the original approach with one
which guarantees distinct faces and edges in the result.
Unfortunately, this fix increases runtime of the node 10x for a simple
cube with 500-vertex sides. It should be possible to make the
performance better again, but that requires more work.
Other work had to be done to enable this, so this depends on:
- [x] 157e7e0351
- [x] fa8574b80b
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/147634
These grid creation functions can return a grid without data when
certain parameters are invalid. The "set_output" function of the
geometry node execution parameters asserts that the data is
not null, so I assume this is invalid and causes crashes later on.
Pull Request: https://projects.blender.org/blender/blender/pulls/147741
Caused by ae2034e6c5
The extra code to handle different domains and types for the ID
attribute didn't handle the case where the field just referenced
the same array as the existing attribute on the goemetry. The generic
"capture field on geometry" utility does handle this, and using it is
preferrable anyway since optimizations can be reused.
Fixes part of #147694
Pull Request: https://projects.blender.org/blender/blender/pulls/147736
The final image produced by the compositor can have domain translation
on it (e.g. caused by a Translate or Transform node). Similar to how
the regular compositor viewer node remembers the output domain
translation, do the same in the compositor modifier.
Bubble back that translation up to VSE rendering code, where it is
then added to regular strip transform.
In order to make this "bubble up" part easier, refactored modifiers
so that instead of soup of parameters they all get a struct
ModifierApplyContext with all the relevant data.
Added a new VSE render test that covers various compositor
transformation nodes (translate, rotate, transform, corner pin).
Pull Request: https://projects.blender.org/blender/blender/pulls/147695
Caused by null de-reference when accessing `sequencer_scene`.
Return false if sequencer scene is null to indicate, that the path to
strips or modifiers can not be created.
Pull Request: https://projects.blender.org/blender/blender/pulls/147594
The Radial Tilling node crashes in the compositor in GPU mode. This is
because the compositor does not yet support 2D vectors in shader code
generation, but properly supports and expects them in the interface,
which the Radial Tilling node declares. This results in a bad shader
which crashes Blender.
To properly fix this, we need to:
- Support 2D vectors in compositor GPU material shader code generation.
- Support 2D vectors in shader node GPU stack construction.
- Adjust the interface of radial tilling to actually use 2D vectors.
This seems risky for 5.0, so this patch temporarily drops support for
the node in the compositor in 5.0. Then once 2D vectors are supported,
it can be enabled again.
Pull Request: https://projects.blender.org/blender/blender/pulls/147627
- Add an explicit check with a better error message than "Out of memory"
- Initialize SDefVert so the later null checks don't try to free
uninitialized data.
Pull Request: https://projects.blender.org/blender/blender/pulls/147723
This fixes the root cause of #147541. However, the file in the report is still
in a bad shape. It needs to be resaved after this patch so that appending the
node group works as expected.
The issue was that making a data-block local did not clear the
`ID_FLAG_LINKED_AND_PACKED` flag.
Pull Request: https://projects.blender.org/blender/blender/pulls/147603