Change Timeline "Show Subframes" property description from "Show
current scene subframe and allow set it using interface tools" to
"Display and allow setting fractional frame values for the current
frame".
Pull Request: https://projects.blender.org/blender/blender/pulls/131115
03ae57dd8b extended poll functions to check if a given ID would result
in a non-empty preview using the automatic preview, but covered too many
operators. This check does not make sense for the Load Custom Preview,
or the Render Active Object operators. The former was fixed in
de487a6712, but turns out the same fix needs to be applied for the
latter too.
The animation system can't properly update the node tree to regenerate
all the necessary information when changing the operation. The operation
changing with animation also invalidates some assumptions we make to
improve performance, and the complexity of supporting it isn't worth
the questionable utility.
Similar to 7797fcc3c9 and dc9249c97f.
Pull Request: https://projects.blender.org/blender/blender/pulls/131252
We've had a bunch of inconsistency between `channel_bag` and `channelbag` in the
code base. After discussion with @dr.sybren, we decided to standardize on
`channelbag` and also rename the camelcase `ChannelBag` to `Channelbag` to be
consistent with that.
This PR implements those changes.
Note that the reason we standardized on `channelbag` rather than `channel_bag`
is because it makes things clearer when stringing multiple terms together in
type and function names. For example, in `channelbag_fcurves_move()` it makes
it clear that `channelbag` describes one thing, rather than `channel` and `bag`
being two separate things.
No functional changes intended.
Pull Request: https://projects.blender.org/blender/blender/pulls/130988
The new CPU compositor ignores group inputs that are unlinked. This
patch fixes that by considering all origin sockets in multi-function
procedures, be it an input or an output.
The new buffer size could have been non aligned when using the
fractional growing heuristic. This non aligned allocation
would then trigger an assert at the SSBO constructor.
Aligning the alocation size fixes the issue.
The Lighten blend mode is wrong for factors less than 1, as it is
computed as a weighted maximum using the factor as the weight, while it
should be a simple component-wise maximum.
This is correctly implemented for Compositor, EEVEE, and Cycles. But the
render/material implementation is wrong. So we adjust the implementation
to match the correct one.
The Darken counterpart was already fixed in 1dcf956849. While the
lighten was fixed in 8b7b165ad9 among other patches. This just completes
the fix.
Pull Request: https://projects.blender.org/blender/blender/pulls/131242
`Action.slots.new()` in the Python API previously took either an ID or nothing
as a parameter. In the former case it would create a slot with the appropriate
`id_root` and name for that ID. In the latter case it would create a default
slot with an unspecified `id_root` and default name.
This had several issues:
1. You couldn't create a slot with a specific `id_root` without already having
an ID of that type. In theory this isn't a problem, but in practice in larger
scripts/addons you don't necessarily have such an ID on hand at the call
site.
2. You couldn't directly create a slot with a desired name without an existing
ID with that name. This isn't so important, since you can always just set the
name afterwards. But it's a bit annoying.
3. Most other `new()` APIs in Blender *require* you to specify the name of the
item being created. So calling this with no parameters was violating that
norm.
4. Ideally, we want to eliminate unspecified `id_root`s, since they cause other
weirdness in the API such as slot identifiers changing upon slot assignment.
To resolve these issues, and just generally to make the API more
straightforward, this PR changes `slots.new()` to take two required parameters:
an ID type and a name. For example:
`slots.new(id_type='CAMERA', name="My Camera Data Slot")`.
This fully specifies everything needed for the slot identifier upon creation,
and doesn't require any outside data items to create a slot with the desired
type and name.
In the future if we decide we still want a `for_id`-style slot creation API, we
can reintroduce it as a separate function.
Ref: #130892
Pull Request: https://projects.blender.org/blender/blender/pulls/130970
`StringRefNull ` expects a null terminated string and `StringRefNull (const char *)` initializer
already realizes a runtime assert to avoid `nullptr` c strings, however this stills allows
initializing `StringRefNull ` with a explicit `nullptr`.
Deleting `StringRefNull(std::nullptr_t)` gives a error if `StringRefNull` is initialized with a implicit `nullptr`.
This follows the same deleted `std::string(std::nullptr_t)` initializer in c++23.
Pull Request: https://projects.blender.org/blender/blender/pulls/130935
Transform node in the new CPU compositor crash in background mode
because of a call to GPU_max_texture_size where the GPU module is not
initialized. To fix this, restrict this call to GPU device and use 2^16
as an upper limit for CPU.
GPU and GHOST require to have identical checks to remove faulty drivers.
When not done GHOST can still select a device that isn't supported and
lead to freezing interfaces.
Pull Request: https://projects.blender.org/blender/blender/pulls/131241
When the overlays of the image editor is drawn an incorrect framebuffer
is bound. The faulty framebuffer contains a depth texture which is also bound
as an attachment.
Pull Request: https://projects.blender.org/blender/blender/pulls/131244
This changes the location of the Draco library installation path.
The new location is at the root of addons_core/io_scene_gltf2 addon, as the library is created for this addon only.
This will solve issues where the gltf addon couldn't find the library in case of global python installation or custom script/lib paths
Pull Request: https://projects.blender.org/blender/blender/pulls/131080
Grease Pencil layer groups are drawn in the layer tree using
`AbstractTreeViewItem`. The problem is that the items can't
store their expand/collapse state. This meant that switching
e.g. the tabs in the properties editor would reset the collapsed
state of layer group items.
This PR uses the `GP_LAYER_TREE_NODE_EXPANDED` flag to store
the expand/collapse state. The tree view then reads from the flag to
expand/collapse the items.
This also adds an RNA property to layer groups `is_expanded`.
Allows to check from python if a group is expanded in the UI.
Pull Request: https://projects.blender.org/blender/blender/pulls/131159
Regression caused by 5ecb70964e. This is, because renders of individual
strips could no longer be reused when cache is completely disabled
during rendering.
Instead of disabling cache completely, flag cache entries as temporary.
When reading entries also skip disk cache, since in 5ecb70964e goal was
to avoid reading from disk cache.
5ecb70964e also affected visual output of rendered image. This is
reported in #131106. Because of this 1 test must be updated.
Root cause for #131106 is, that byte image was automatically converted
to float, due to processing with other float image. Then the same byte
image was used for processing with another byte image. Before
5ecb70964e this byte converted to float image would be cached, which
caused float code paths to be used. This is correct behavior.
After 5ecb70964e, no image is cached, so float data were not saved, so
byte code path was executed in second processing step.
Pull Request: https://projects.blender.org/blender/blender/pulls/130781
`interace_panel_has_socket` should return true when panel has
at least a socket of type input or hidden in modifier. That way, panel
drawing code won't be executed.
Pull Request: https://projects.blender.org/blender/blender/pulls/130958
The wrong ObjectIdentifier was used when trying to see if the object is
a parent to something else in the export graph. This lead to accessing
an invalid iterator which will assert with MSVC in Debug configurations.
Accidentally regressed during the review of 428ab699dc.
Pull Request: https://projects.blender.org/blender/blender/pulls/131174
This was caused by querying on the selection state
before it is setup. It is only setup just before
the draw function.
To fix this, we sync the `info_buf` just before
drawing the overlays.
Also add some safety to avoid uninitialized memory.
With exception of Sequencer, everywhere else in Blender it is assumed
that float images are in linear color space.
Movie files with more than 8 bit/channel precision are now loaded into
float images (since 39c4c7cf3f), but the "load and use them as an
image" code path was not making sure that they are converted to linear
color space.
Pull Request: https://projects.blender.org/blender/blender/pulls/131141
Add `bool MutableSpan<T>::contains(const T &value)` function, which is an
exact copy of the function from the `Span<T>` class. This makes it possible
to call `.contains()` directly on the `MutableSpan`, instead of having to
call `.as_span()` first.
Note that the `contains_ptr()` function was already copied from `Span` to
`MutableSpan` before.
No functional changes to the affected code, just the removal of the now
no longer necessary `.to_span()` call.
Pull Request: https://projects.blender.org/blender/blender/pulls/131149
Before we start porting image engine to the new drawing manager
we should do some cleanups.
- Use similar namespace as other draw engines (`blender::image_engine`)
- Switched InstanceData and Instance
- Reduce parameters as drawing mode can access Instance.
- Remove some templates to improve readability.
Pull Request: https://projects.blender.org/blender/blender/pulls/131146
Oversight in 09d2108bf5
For one, numinput for keyframes would be broken unless the mouse is moved first.
Secondly, redo would also be broken (using the `Adjust Last Operation` panel or the `Repeat Last` operator).
Above commit did a check for `TRANS_RUNNING` before calling `grease_pencil_layer_update_trans_data`.
This isnt set in any of the above scenarios (it only gets set once the moues moves).
This PR removes `TRANS_RUNNING` check to have proper calls to `grease_pencil_layer_update_trans_data`.
It has one downside: you now get a `grease_pencil_layer_update_trans_data` as soon as you hit `G`.
So it does remove_frame / add_frame unnecessarily (since we are still on the same frame), but only once, sees harmless in comparison to the two regression it fixes.
Fixes#131092Fixes#130793
Pull Request: https://projects.blender.org/blender/blender/pulls/131143