Previously when drawing curves and using surface project, the strokes
would snap to gizmos like lights and camera objects. This is not what
most people expect when projecting to surface objects, so disable them
from the depth check.
Pull Request: https://projects.blender.org/blender/blender/pulls/121530
Fixed layout widths would previously be ignored, resulting in incorrectly sized
grid view items. This is especially relevant for displaying grid views in
popups, where these fixed width are commonly used.
Necessary for the brush assets project which adds a popup version of the asset
shelf, see #116337.
This adds a new `Axes to Rotation` node which creates a new rotation.
In many cases, the primary and secondary axis inputs are a normal and
tangent of a mesh or curve. This provides a simpler and more direct way
to create this rotation compared to using two `Align Rotation to Vector` nodes.
This more direct way of computing the rotation also allows us to optimize
the case better.
The node rotates one axis (X, Y or Z) to the given primary axis direction. Then
it rotates around that primary direction to align the second axis to the given
secondary direction. Ideally, both input axes are orthogonal. However, the node
still creates the "best" rotation when they are not orthogonal. If one or the axes
is zero or both are (close to) parallel, the resulting rotation is unstable. There is
not too much the node can do to make it more stable.
Pull Request: https://projects.blender.org/blender/blender/pulls/104416
The optimization to only add grid view items to the layout that are actually in
view relied on View2D information on scrolling. Popups don't use View2D, so
with this change the optimization will be skipped when View2D is not used.
Necessary for the brush assets project which adds a popup version of the asset
shelf, see #116337.
Fix#120566 case.
Moved initial `lod_bias` calculations from `Light` struct to
`ShadowDirectional` and `ShadowPunctual` classes to avoid value
runaway during subsequent syncs. Changed internal functions to
use member variable instead of parameters.
Pull Request: https://projects.blender.org/blender/blender/pulls/121541
As part of #121565.
To avoid using drawing indices outside of the internal grease pencil API,
this refactor adds the functions `GreasePencil::get_eval_drawing` to replace
the `get_eval_grease_pencil_layer_drawing*` functions.
Pull Request: https://projects.blender.org/blender/blender/pulls/121567
Rename layer property `active` -> `active_layer` to distinguish
between active layer and active layer group.
The active group property was introduced in d1710f723239998b19295438aff67f8630a64216.
Pull Request: https://projects.blender.org/blender/blender/pulls/121563
This allows node groups to have a description that is shown in the add menu
or when hovering over the node header.
This new description is stored in `bNodeTree.description`. Unfortunately, it
conflicts a bit with `ID.asset_data.description`. The difference is that the latter
only exists for assets. However, it makes sense for node groups to have
descriptions even if they are not assets (just like `static` functions in C++ should
also be able to have comments). In some cases, node groups are also generated
by addons for a specific purpose. Those should still have a description without
being reusable to make it easier to understand for users.
The solution here is to use the asset description if the node group is an asset,
and to use `bNodeTree.description` otherwise. The description is synced
automatically when marking or clearing assets.
A side benefit of this solution is that appended node group assets can keep their
description, which is currently always lost.
Pull Request: https://projects.blender.org/blender/blender/pulls/121334
Text strips in VSE got:
- Configurable shadow angle and offset (previously shadow location relative to
text was fixed). Currently the shadow position is rounded to integer pixel
locations; sub-pixel positioning might come later.
- Optional shadow blur amount.
- Optional outline, with color and outline width controls. Outline is
implemented using jump flooding algorithm.
Images and more detail in pull request.
Pull Request: https://projects.blender.org/blender/blender/pulls/121478
Introduce new `active_group` pointer and get/set api functions.
Use RNA to change active group in on_activate() function, similar to
layer selection: 4c128015324d8c98a12826a84d81a41ae81728b0
Pull Request: https://projects.blender.org/blender/blender/pulls/121524
This (experimental, for now) node retrieve's voxel values
at specific voxel indices for a grid input. It's similar to the
Sample Grid node (77cba3d5518d8b75da78), but there is
no interpolation, and it uses indices instead of positions.
Pull Request: https://projects.blender.org/blender/blender/pulls/118690
The node uses multiple transform operations, each using its own sampling. Using bicubic sampling in the translate node causes undesired offsets.
These changes were intentional (see test updates in `c4e1be73`), but the offsets were thought to be too small for users to notice.
Pull Request: https://projects.blender.org/blender/blender/pulls/121495
When building with asan enabled on windows tools such as
msgfmt will run before the install phase which normally
copies the required asan dlls next to the binaries preventing
msgfmt from stating and causing a build error.
This change adds the MSVC path to the PLATFORM_ENV_BUILD_DIRS
so when we run the various tools the asan shared libs can
be found.
Skip modifier, when using strip as a mask that ends before specified
timeline frame. To make behavior of missing mask more consistent,
modifier is also skipped, when strip produces blank output due to
missing data.
Skipping modifier due strip boundary only works, when "Mask Time" is set
to Relative mode. This is because absolute mode ignores strip offsets.
Pull Request: https://projects.blender.org/blender/blender/pulls/121498
Was caused by float imprecision and storage precision
conversion. Use same fix as combined pass but
more selective as the alpha channel can contain
other data for AOVs.
Fix#118494
Previously in
```
edge_y = edge_step(current_vertex_y, edge_y, ¤t_vertex_y);
while (!BM_elem_flag_test(current_vertex_y, BM_ELEM_TAG))
```
With hidden faces this code enters in an infinite loop by returning the same null
edge in edge_step() and the same current_vertex_y causing Blender to crash.
The current fix solves the infinite loop and provides a solution when faces are hidden.
This causes the hidden faces to be merged into one for unsubdivided per original dev's implementation.
At minimum the crash is identified and a solution proposed.
Attached is a video of the fix
Pull Request: https://projects.blender.org/blender/blender/pulls/121086
Added `BLENDER_EEVEE_NEXT` engine ID to polling code called during
"drag search". Main ADD menu routines already had this ID.
Fixes#121026 missing `Shader to RGB` node.
`Specular BSDF` node had similar problem, fixed as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/121231
An earlier commit accidentally removed too much code. This is now
restored, so that when keyframe insertion fails, at least on stdout it's
logged which F-Curve caused this failure.
8dbd167e80217dd0ad97113f16dd184224c52fa5 did improve the error
reporting, but even that does not explicitly mention which F-Curves
caused those errors (for good reason, as cluttering the UI would be very
simple then).
Pull Request: https://projects.blender.org/blender/blender/pulls/121527
This affects only transparent materials. Ideally, the shader
compilation should trigger a tag update on the object but
that's bad level call.
Instead, we just discard all shadows after finishing recompiling
a transparent material. This is overly conservative but it fixes
the issue.
Fixes#119624
Displaying an operator in the context menu that would access the asset
via context would fail.
3 issues here in fact:
- 798219225d removed code to attach the asset to the button's context.
Brought this back.
- If the `AssetShelf.get_active_asset()` method (in Python) isn't set,
`AssetViewItem::should_be_active()` would always return false, making
it impossible to lookup the active item. Instead it should return an
empty value so the view's internal active state is used instead.
Mistake in a700c90ec3.
- These kind of context queries can't rely on cursor coordinates, it's
not well defined what state they are in. In fact `wmWindow.eventstate`
is unset in debug builds to help enforce this. Also an issue from
a700c90ec3. With the above two corrections this change can be
undone so the query doesn't depend on cursor coordinates anymore.
This is caused by #121137 as the bug disappear if
`can_use_default_cb` returns false.
The issue is caused by the material binning system.
`ShaderKey` uses the `GPUMaterial` to differentiate between
material. But with #121137, different materials can reuse the
same `GPUMaterial`.
The fix is to not reuse the shader for the prepass (even if opaque)
for transmission enabled shaders.
Fix#121343
This parameter was introduced to mitigate shadow tracing
artifacts. These are no longer present since #121317 and
leaving this parameter breaks PBR rules which opens other
issues with shadow disconnected from shading.
Due to recent changes geometry without any vertices could lead to
a division by zero when copying motion vectors.
This PR fixes this by skipping the copy step when there are no
vertices to copy.
Pull Request: https://projects.blender.org/blender/blender/pulls/121516
Caused by 598af4545912
Above commit added respect for the NLA strip offset (rightfully so, by
using `ANIM_nla_mapping_apply_fcurve`).
However, when no closest frame was found, the code moved on to the next
FCurve without restoring to the original FCurve --
`ANIM_nla_mapping_apply_fcurve` needs to be called in pairs.
To resolve, now always restore to the original FCurve.
Pull Request: https://projects.blender.org/blender/blender/pulls/121483
The history here goes from c0bd240ad0a1 through 89ae4a7a2a9a (which were
still good), but then with 81b56f8bbc0d we have gotten to a point were
tracks were placed **before** overrides in case no local tracks were
found.
Now corrected.
Pull Request: https://projects.blender.org/blender/blender/pulls/121395
This changes the following keyframing functions to return
`SingleKeyingResult`, which is in turn used for better failure
reporting in the higher-level functions that call them:
- `KeyframeStrip::keyframe_insert()`
- `insert_vert_fcurve()`
As a side effect, this also means that
`rna_KeyframeAnimationStrip_key_insert()` can no longer return an
`FCurve *`, and now instead returns a bool indicating success.
This is part of an ongoing progressive refactor to improve error
messages and failure handling in the keyingframing code.
Pull Request: https://projects.blender.org/blender/blender/pulls/121517
The goal of this PR is to remove the per face, NDC space
tracing for shadow maps.
This requires custom occluder extrapolation but in return
removes quite a lot of complexity in other areas, namely:
- No more per face transform before the tracing
- No more per face jittering (fix#119565)
- No more frustum padding (increased maximum precision)
- Better use of 32bit precision shadow map
- Fix#121343
This improve softness at relatively low step count (default 6
is better) and reduces light leaking at very low sample
count (sharper). It makes it more intuitive now that
higher sample count is smoother.
Pull Request: https://projects.blender.org/blender/blender/pulls/121317
For metric units the depth was being rounded to the nearest meter
(in the range of 10-100 meters), increase the precision from 2 to 4
so it's possible to see centimeter precision.
This enables the new lazy module loading behavior introduced in OIDN 2.3,
without breaking compatibility with older versions of OIDN (using separate
code paths).
Also, the detection of OIDN support for devices is now much cleaner, and
devices do not need to be matched by PCI address or device name anymore.
Pull Request: https://projects.blender.org/blender/blender/pulls/121362