Code was not guarding against missing `Editing` (like we usually do for
these situations).
This also corrects usage of `CTX_data_scene` (use `CTX_data_sequencer_scene`
where needed instead) which should be needed since 1122a05cb6
Pull Request: https://projects.blender.org/blender/blender/pulls/145908
Blade cursor patch #136749 cancelled select operations if the current
tool was the blade tool. This was to prevent LCS users from being able
to select handles when the blade tool would pass-through. This however
resulted in an RCS regression.
Fix instead by cancelling split if the mode is `use_cursor_position`
and there is no valid split, preventing a pass-through.
In RCS this works nicely because users can just select using right-click
and bypass split logic. In LCS this makes it impossible to select with
the blade tool enabled, but this is expected behavior as the blade tool
does not need strips to be selected to work anyways, and tools should
ideally have different, non-overlapping purposes. For instance, the slip
tool also does not affect selection logic.
(Note: there is one small caveat to this principle, which is that the blade
tool can't currently split connected strips together unless theyre both
already selected. This issue should be fixed with a future blade tool
refactor).
This also fixes unrelated bugs:
- Blade cursor no longer shows on first/last frames, where split point
fails
- You can no longer split in the gutters between channels
Pull Request: https://projects.blender.org/blender/blender/pulls/145938
This happened because it was attempted to access or set the
non- existent pixelspace offset of these audio strips. It is fixed by
applying the "paste at mouse" behavior only for strips that would be
rendered, which excludes sound strips implicitly. This has also
benefit, that strips with effects would only change position of the
effect thus avoiding double transformation.
Pull Request: https://projects.blender.org/blender/blender/pulls/145819
Original code assumed, that if there is action or drivers, action
datablock will be copied into `Main`, which is later freed. But drivers
are not part of action datablock.
Pull Request: https://projects.blender.org/blender/blender/pulls/145677
This adds a function that can turn an existing `bNodeTree` into an inlined one.
The new node tree has all node groups, repeat zones, closures and bundles
inlined. So it's just a flat tree that ideally can be consumed easily by render
engines. As part of the process, it also does constant folding.
The goal is to support more advanced features from geometry nodes (repeat zones,
etc.) in shader nodes which the evaluator is more limited because it has to be
able to run on the GPU. Creating an inlined `bNodeTree` is likely the most
direct way to get but may also be limiting in the future. Since this is a fairly
local change, it's likely still worth it to support these features in all render
engines without having to make their evaluators significantly more complex.
Some limitations apply here that do not apply in Geometry Nodes. For example,
the iterations count in a repeat zone has to be a constant after constant
folding.
There is also a `Test Inlining Shader Nodes` operator that creates the inlined
tree and creates a group node for it. This is just for testing purposes.
#145811 will make this functionality available to the Python API as well so that
external renderers can use it too.
node_geo_mesh_primitive_cube.cc uses M_PI_2 without including
BLI_math_constants.h. Unsure why this is a problem for me locally
but not for the bots but i'm guessing its a unity build difference.
Pull Request: https://projects.blender.org/blender/blender/pulls/145950
d1962be44c removed the call to
`BKE_view_layer_active_object_get()`. It did leave some "supporting
code" around, which was necessary to make that call possible but now is
no longer needed.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/145977
This avoid using the workaround on known working drivers.
Detected when investigating shader compilation performance.
These new drivers where forced to not use threaded compilation.
Candidate for backport to 4.5 LTS.
Pull Request: https://projects.blender.org/blender/blender/pulls/145969
When an asset in the current file is loaded from a user asset library,
weak references to it will have `asset_library_type` set to
`ASSET_LIBRARY_CUSTOM` and not `ASSET_LIBRARY_LOCAL`. Its
`relative_asset_identifier` will, however, be relative to the current
file (`Object/Cube`) instead of to the asset library's root
(`cube.blend/Object/Cube`). This combination makes loading such assets
from a weak reference fail, leading to a null dereference when using the
Capture Screenshot Preview operator.
To fix this, make such assets be loaded with `asset_library_type` set to
`ASSET_LIBRARY_LOCAL` instead.
Pull Request: https://projects.blender.org/blender/blender/pulls/145967
The link buffer was not free on exit.
Previous implementation was freing it with the
gpu::Batch which is registered as preset.
This commit introduces buffer registration
to free them on exit.
Pull Request: https://projects.blender.org/blender/blender/pulls/145921
This was happening because the strip modifier types register
their panels when the editor is created, but the poll functions
of these panels did not check for the view type.
To fix this, add a condition to the `modifier_ui_poll`
that checks if the view type is not `SEQ_VIEW_PREVIEW`
when the panel is added to a sequencer space.
Pull Request: https://projects.blender.org/blender/blender/pulls/145964
When deleting the last key of an F-Curve, the F-Curve itself also gets
deleted. This is now done via the same code as deleting F-Curves from
the channel list.
Before this fix, a deletion function was used that's not capable of
deleting from Actions in NLA strips, which is why it crashed.
Pull Request: https://projects.blender.org/blender/blender/pulls/145929
This was found to be a bottleneck in #136477. Before this conversion would
always convert the entire attribute. However, the caller only required a single
index. Now the attribute is interpolated lazily when specific indices are
requested later.
Pull Request: https://projects.blender.org/blender/blender/pulls/145934
Previously, when a node was muted, all automatically hidden sockets suddenly
became visible. This is because of a rule where inputs that are never ever used,
are not-hidden (only sockets where the usage depends on some condition are
allowed to be hidden automatically). Since the inputs without internal link in a
muted nodes are never used, they become visible when a node is muted.
The solution is to ignore whether a node is muted in the case when the socket
usage for node-editor-drawing is computed. In nested nodes, muting should not be
ignored.
Pull Request: https://projects.blender.org/blender/blender/pulls/145729
Add the option to align the vertices to the maximum or minimum of all
of the selected UV's when using the Horizontal or Vertical options in
the Align operator.
Ref !139569
Arranges selected Islands along a selected Axis.
Islands can be aligned to center/left/right/top/bottom.
Initial Implementation of #78408
Ref !139658
Co-authored-by: Campbell Barton <campbell@blender.org>
Introduced in f4e670af2c
The `use_negative_slope` parameter was effectively ignored when `brush`
was also passed in as a parameter, always defaulting to a positive
slope (ascending from left to right).
Additionally, the `use_negative_slope` property was incorrectly
specified for many properties: In general, most brush properties have
positive slope as they correspond to a pressure value being modulated.
This commit fixes the behavior and updates the corresponding
properties so they continue to work.
Pull Request: https://projects.blender.org/blender/blender/pulls/145823
The `relative_path` operator property on USD import was never wired up
completely. As such it would always write absolute paths when creating
MeshSequenceCache modifiers or Volume object file paths.
Obey this property and create relative paths as necessary.
Pull Request: https://projects.blender.org/blender/blender/pulls/145899
Caused by a745d6cc69, which removed store/restore mechanism for
`move_strips` operator property, but failed to modify condition for
setting strip position to mouse cursor. Because of this, the strip was
always placed to mouse cursor, even when drag and drop was used.
Pull Request: https://projects.blender.org/blender/blender/pulls/145810
Extends obj importer for importing NURBS directly as Curves,
avoiding importing and converting legacy curves. This change
only affects geonode importer, and will not be a change in
behavior for users (import operator will still create legacy curve).
Pull Request: https://projects.blender.org/blender/blender/pulls/145850
Other code that needs to operate on "the Action that's shown in the
Dope Sheet" now accesses the newly-added
`bAnimContext::active_action`, which is now also used by
`context.active_action`. I've also added
`bAnimContext::active_action_user` in case the ID that is animated by
this Action is needed. That's either the active `Object` or the active
`Key`, again depending on the mode of the Dope Sheet editor.
The active Action can also be obtained via
`ANIM_active_action_from_area(scene, view_layer, area)`. This is a
faster method than the usual `ANIM_animdata_get_context(C, &ac)` and
it doesn't need the entire `bContext`.
The "Stash Action" and "Push Down Action" to the NLA were also
implemented by writing to `SpaceAction::action` via RNA. They now use
`ANIM_animdata_get_context()` to get the active action owner ID, and a
direct call to `blender::animrig::assign_action()` instead.
The remaining use of `SpaceAction::action` was for display &
manipulation of Scene/Action markers. This required some work to get
addressed, as there was quite a bit of spaghetti and duplicate logic
to churn through. More can be improved there, but I had to limit the
time I spent on this.
Python code that was still using `context.space_data.action` to find
the currently-showing Action has been migrated to
`context.active_action`.
Related: #119626
Pull Request: https://projects.blender.org/blender/blender/pulls/145672
Drop all support for animation data from Blender versions 2.49 and
older.
- The `IPO` DNA struct is deleted, as is the `IDType_ID_IP` type
definition.
- Versioning code has been removed in its entirety.
- Loading a pre-2.50 blend file will issue a warning, stating that any
animation data that was there is now lost, and that the file should
be loaded & re-saved with Blender 4.5 to properly port the data.
Note that versioning of Action assignments (as in, picking a slot)
still uses the tagging + updating all tagged assignments as a
post-processing step. This is necessary because picking the right slot
is only possible after all Actions (also those from libraries) have
been versioned. We might be able to address this as well, by upgrading
legacy → slotted Actions "on the fly" versioning these Action
assignments. If we do that, I think that would be better in a separate
PR though, as it could introduce issues by itself.
Ref: #134219
Pull Request: https://projects.blender.org/blender/blender/pulls/145188
This adds a boolean output for each of the menu items. The output is true, if
the passed in menu value is that item. This avoids the need to compare the
output value to the input values to get a boolean for whether a specific menu
item was passed in.
Support is added for Geometry Nodes as well as the Compositor. Usage/Value
inferencing has been updated as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/145712
Blender compositor ignores nearest interpolation in Vulkan backend.
That's because anisotropic interpolation is used based on same left over
sampler state. To fix this, we clear anisotropic sampling in the
realization shader.
Pull Request: https://projects.blender.org/blender/blender/pulls/145905
This reverts commit 8adb3e758f.
This is a partial revert that just always use the fallback
path.
The new optimized path is causing issues with overlays #145446 and
volumes #145420.
The new path will be enabled back when we fix those issues.
For most players this appears to made no difference. But one case it fixes
is that with this metadata, on Youtube with SDR, 10bit PQ looks the same as
12bit PQ, where it was previously too desaturated.
10bit and 12bit HLG was already consistent without this metadata and there
appears to be no impact, though it remains inconsistent with PQ.
It seems good practice to be explicit about the mastering display regardless.
The way we get the max luminance is not ideal though. We get it from the
view transform name containing "HDR XXXX nits" as used in the Blender and
ACES configs. There is currently no way to query this information from
OpenColorIO.
In the future we can add a user control for this. For now if we can not
determine the max luminance this way, we don't write mastering display
metadata. The video player will then make some default assumption for tone
mapping, often 1000 nits.
Pull Request: https://projects.blender.org/blender/blender/pulls/144378
If adding a scene from the main window header, it is possible to have a
defined `sequencer_scene` but an undefined `ed`.
Add check for non-null `ed` and move all the checks up to the start of
`sequencer_main_cursor`.
Pull Request: https://projects.blender.org/blender/blender/pulls/145854
When using the default Blender config use what was saved in the startup blend.
But when using a custom config it's likely the scene linear space from that config
is wanted. And not using it can lead to some confusing situations, where you end
up with an ACES config and the Linear Rec.709 working space.
Pull Request: https://projects.blender.org/blender/blender/pulls/145884