Fix an issue where selecting a key in the dope sheet summary line for a
channel group would deselect all corresponding keys in the F-Curves of that
group. It was caused by an accidental duplication of the `ChannelBag`.
Pull Request: https://projects.blender.org/blender/blender/pulls/127069
The issue was that slots are using `templated_selection_state_update()`
for their basic selection logic, which is used in the same places as the
`ACHANNEL_SET_FLAG` macro and was written to do the same job. However,
the logic was not properly reproduced.
Specifically, `ACHANNEL_SET_FLAG` actually *deselects* when passed
the `ACHANNEL_SETFLAG_EXTEND_RANGE` or `ACHANNEL_SETFLAG_TOGGLE`
selection mode flags. This makes no sense at all, but it turns out to
be functionally important in the case of `ACHANNEL_SETFLAG_EXTEND_RANGE`
because of how it's used, resulting in this bug.
This fixes the issue by changing `templated_selection_state_update()` to
exactly match the logic of `ACHANNEL_SET_FLAG`, in all its nonsensical
glory. I've also added a comment explaining the situation, so it's clear
why the logic is so odd.
Pull Request: https://projects.blender.org/blender/blender/pulls/126981
Use an `std::optional<int>` to return the icon from
`getname_anim_fcurve()`.
This function is used both to get the name and to get the icon of
whatever the F-Curve is animating. Sometimes the animated struct doesn't
have an icon though. In some cases we need to know whether it could
resolve the RNA path correctly or not, and checking for 'no icon' was
not enough because that may be a valid return value.
The returned icon is now wrapped in an `std::optional<int>`, and a
`std::nullopt` is returned whenever the icon cannot be determined.
No functional changes, except in the two places where the icon is
actually used. In case of error there is now always a fallback to the
struct icon of the animated ID (previously this was only a fallback when
the RNA path was there but could not be resolved; now it's also used
when the RNA path is empty, for example).
Pull Request: https://projects.blender.org/blender/blender/pulls/125666
Workbench doesn't fill all texture slots. In OpenGL it should match what
the shader is using, where some texture slots that have been defined can
be optimized away when not used. The Vulkan backend however uses all the
resources that has been defined in the shader create info.
When using a texture shader in workbench the shader would raise a
validation warning as there are slots defined that are never uploaded.
This PR fixes this by always set dummy textures in those slots.
Pull Request: https://projects.blender.org/blender/blender/pulls/127064
Add back clipping using the same GL clip planes as before.
The difference is that the clip planes are now stored in the
`GlobalsUboStorage` instead of relying on another separate
UBO.
One annoyance of the current design is that the `overlay::Instance`
has to be created with the clipping state. This could be fixed later
by making the shader module a pointer instead of a reference.
Rel #102179
Pull Request: https://projects.blender.org/blender/blender/pulls/127018
Scaling 2 points to 0 would assert. Remove the assertion
as this isn't an error.
Also ensure `anim_path_accum_length` is freed when a new
length isn't calculated.
The code for marking seams or sharp in a bevel was nonsense
for terminal edges (beveled edges that are the only beveled
edge at a vertex). It was written assuming that either the
number of segments is 1 or there is a mesh ADJ pattern, which
is not the case if there is a terminal edge with segments > 1.
The immediate fix for infinite loops is to project against trying
to execute this code for terminal edges.
Also made current code clearer and removed duplication.
It is a future TODO to make it do something sensible for terminal
edges instead of a no-op. Incidentally I notice that it also doesn't
work for mitered booleans, but it won't infinite loop in that case.
To fix both of these cases, we should try to count boundary vertices
to skip rather than edges to skip.
Caused by 03ae57dd8b
Custom preview operator uses `lib_id_preview_editing_poll`. To enable
this operator in UI, move the new condition to `lib_id_generate_preview_poll`
poll function so adding custom preview to unsupported type would
still be possible.
Co-authored-by: Julian Eisel
Pull Request: https://projects.blender.org/blender/blender/pulls/126874
This struct should be split in the future, but for now its size matters
since one is created for every BVH node for every undo step. Removing
the inline buffers for the arrays is a simple way to reduce the size
from 672 to 400 bytes.
This commit changes the raycasting code to store values as the
`ActiveVert` type instead of `PBVHVertRef` to avoid needing to check the
type of the PBVH when retrieving information.
It also fixes a case that did not reset the active vert when performing
a raycast.
Pull Request: https://projects.blender.org/blender/blender/pulls/127000
The version text shown over the splash screen image needs to always be
white regardless of the theme. With "Blender Light" this text is black
and almost impossible to read. This PR adds the ability to set a
specific color for labels without icons and does so for the splash
screen.
Pull Request: https://projects.blender.org/blender/blender/pulls/126340
This commit essentially moves allocation of KeyMaps and Operators
PointerRNA data storage to use C++ new/delet, instead of C alloc/free.
Part of the effort to make PointerRNA non-trivial (#122431).
Pull Request: https://projects.blender.org/blender/blender/pulls/126935
With c20bb31325 the `active_vert` related
methods added a check against the relevant pbvh type. In certain
situations, the PBVH is freed but is not refreshed prior to the cursor
being drawn.
In the long term, we want the PBVH to be owned by the mesh, not the
`SculptSession`, so adding more logic around ensuring depsgraph tags
with PBVH changes to implicitly regenerate the PBVH is a step in the
wrong direction.
Additionally, it doesn't make sense that we don't ensure the PBVH exists
before accessing the `active_vert`, as its context is dependent on the
PBVH.
Therefore, this commit introduces multiple changes:
* Ensures that the PBVH exists prior to doing a raycast or other cursor
related actions
* Removes the checks against the PBVH type in `SculptSession` in
favor of debug asserts to avoid crashes and assist in finding other
situations where the state of the PBVH is ambiguous.
Pull Request: https://projects.blender.org/blender/blender/pulls/126953
The Lens Distort node is different between CPU and GPU when jitter is
enabled. That's because GPU incorrectly assumed that jitter with no
dispersion would have no effect. So we fix this by adjusting the
identity condition.
Further more, the green channel was not jittered for the GPU, that's
because the jitter was only seeded by the integration steps and was thus
constant for all channels. And since the green channel is the result of
addition of two opposite accumulations, the green channel was left
unaltered. To fix this, we include the start channel of the integration
in the seed to the jitter to make sure different channels get different
jitter.
Pull Request: https://projects.blender.org/blender/blender/pulls/126993
This way we can query the brush types, e.g. to filter out eraser brushes
in the brush asset selector while the eraser tool is selected, see
https://projects.blender.org/blender/blender/issues/126032.
Technically a brush may have different brush types depending on the
mode. So we store a type for all supported modes.
Ideally the name of the custom metadata property would match the name of the
properties in RNA. They will match after #126796, the names here are the new
ones, to avoid having to version asset metadata.
Pull Request: https://projects.blender.org/blender/blender/pulls/124618
This node hashes various types into an integer. Note that hashes
cannot generally used as unique identifiers because they are not
guaranteed to be unique. It can be used to generate somewhat
stable randomness though in cases where White Noise does not
offer enough flexibility.
It uses hash functions from BLI_noise.hh. These are also used in
the White Noise node.
Pull Request: https://projects.blender.org/blender/blender/pulls/110769
IndexMask iteration from 347ec1acd7 was incorrect
in the cases where we stored temporary data in contiguous sections
per PBVH node. We now call `.local()` once per PBVH node. If that
becomes a bottleneck it's avoidable, for now it's simpler though.
This adds a new launch argument when building with
renderdoc support. It allows to trigger the capture
of a specific capture scope. This allows selective
capture of some commonly captured parts.
Pull Request: https://projects.blender.org/blender/blender/pulls/126791
Solved by not supporting complex reordering at this moment. It
is currently better to focus on quality and add back performance
later. During tests I didn't detect any user noticeable performance
degradation. Could also be because we support rendering
suspending/resuming.
Fixes artifacts in EEVEE volumes and raytracing.
Pull Request: https://projects.blender.org/blender/blender/pulls/126974
The bug was probably harmless in current codebase.
Also added some basic testing of `BKE_main_namemap_get_name` itself,
and not only higher-level ID renaming code.
The issue was that the forward compatibility writing code for channel groups in
layered actions was building a temporary legacy listbase, but was not clearing
it properly afterwards. This was then getting caught by an assert that ensured
that layered-action groups didn't have legacy data in them.
The reason the listbase wasn't getting cleared properly is because the
prev/next listbase pointers were getting cleared using a `LISTBASE_FOREACH`
loop, and thus the loop never progressed past the first item.
Additionally, this mistake wasn't just in the channel groups writing code, but
also the forward compatibility writing code for fcurves.
This fixes the issue in both places by switching the loops to
use`LISTBASE_FOREACH_MUTABLE`.
Based on discussion with @dr.sybren, this also removes the assert that caught
the issue. The situation it guards against is actually completely benign, and
the existence of the assert is contrary to the comments in the forward-compat
writing code explaining why its approach is okay.
Pull Request: https://projects.blender.org/blender/blender/pulls/126970
Previously, all errors, warnings and info messages were propagated from the node
that generates it to the top level node group. This is a good default, but may
not always be desirable. For example, someone may build a node group asset that
generates some warning that is irrelevant to the user to the asset. Now, the
asset author can selectively disable propagating warnings from that node.
Each node has a new `Warning Propagation` setting. It controls if warnings from
this node should be propagated to the parent group node. By default, everything
is propagated. One can also choose to propagate nothing, only errors or only
errors and warnings.
Note, this does not affect whether the warning is shown in the node itself, only
if the warning is propagated one level up!
Pull Request: https://projects.blender.org/blender/blender/pulls/126786
The issue was that the enum property expected a default of `Object`
which wasn't present in the default enum.
Error was: `EnumProperty(..., default='OBJECT'): not found in enum members`
Fixed it by constructing a simple `EnumPropertyItem []` with the `Object` entry.
Pull Request: https://projects.blender.org/blender/blender/pulls/126963
- Resource pools are shared between multiple swap chains to reduce
code complexity
- Fix issue where activating a new graphical context could still leave
the previous context rendering.
- Known issue: opening files with more windows require a redraw.
Reference: #126499
Pull Request: https://projects.blender.org/blender/blender/pulls/126961
Prior to this commit, variables inside `StrokeCache` used either a
`true_` prefix to indicate that the relevant position / normal /
displacement was not modified by symmetry, or a `_symmetry` / `_symm`
suffix to indicate that it was.
This commit changes all such variables to have a `_symm` suffix, as
that has fewer connotations than the `true_` prefix.
Pull Request: https://projects.blender.org/blender/blender/pulls/126902
Commit 8903205dd9 fixed incorrect math, in stream length setting part of
the code, which seemed to force most video files to use safer, but more
complicated codepath.
Even though the math was corrected, the logic was not great. It tried to
use container duration, only stream duration is not significantly (4x!)
longer. This is quite crude.
Instead, check if there is any significant difference between stream and
container durations. The threshold is kept quite high, just to be safe.
This code should be removed in futute cleanup / refactoring.
Pull Request: https://projects.blender.org/blender/blender/pulls/126866
Regression is caused by movie being rendered twice for the same frame
number, but the image is not cached after 5ecb70964e.
The image is rendered first to determine `early_out` in
`seq_render_strip_stack()`, then for the actual image output.
Since VSE cache is not to be used for render job, `ffmpeg_fetchibuf()`
can be optimized to return frame, which is already decoded instead of
re-seeking to last keyframe and decoding all following frames again.
Pull Request: https://projects.blender.org/blender/blender/pulls/126911