A work around ffmpeg issue that everyone (e.g. OBS) seems to be doing.
By default ffmpeg uses built-in VP8/VP9 decoders, however those
do not detect alpha channel (https://trac.ffmpeg.org/ticket/8344 -
the bug filed in 2019, currently still open in ffmpeg 7.1. There's
an older report from 2016 too, https://trac.ffmpeg.org/ticket/5792).
The trick for VP8/VP9 is to explicitly force use of libvpx decoder.
Only do this where alpha_mode=1 metadata is set. Note that in order
to work, the previously initialized format context must be closed
and a fresh one with explicitly requested codec must be created.
Pull Request: https://projects.blender.org/blender/blender/pulls/132795
The input ID evaluation didn't account for data-block types that aren't
handled by the copy-on-evaluation system. For those types, we should
just use the original ID in geometry nodes, just like the modifier.
Pull Request: https://projects.blender.org/blender/blender/pulls/132768
This patch moves wrapped translation from a special case of the general
transform algorithm to the Translate node. Since the Translate node is
the only user of this special case, it doesn't make sense to complicate
a generate algorithm with it. This will make future refactors of this
code easier.
Pull Request: https://projects.blender.org/blender/blender/pulls/132793
When extruding from points on a cyclic stroke (in which case it creates
a new detached stroke), the original stroke should remain cyclic. This
is achieved by gathering curve attributes first then manually set non
cyclic to newly created strokes.
Pull Request: https://projects.blender.org/blender/blender/pulls/132261
Prevent users from creating an invalid bounding box for cropping. The user input is checked and is overridden if it will invert the bounding box, i.e. `xmin > xmax` and `ymin > ymax` of gizmos is not allowed.
Pull Request: https://projects.blender.org/blender/blender/pulls/128550
The issue was that the current frame was already cached, and the cache
was not invalidated when switching CurveMapping "tone"
(standard/filmic) property.
There does not seem to be a good way of doing it, besides scanning
the whole scene searching for which strips use the modified curve
mapping.
Various other properties of curve mapping seem to work right now, as
a byproduct of cache invalidation being done at UI level, not RNA
level. Arguably (see comments on #123821) these should not be done at
UI level, but that's for another day. The reason why "tone" is not
done at UI level is that the UI widget is different (just a button)
and is hard to hook up invalidation logic into that.
Pull Request: https://projects.blender.org/blender/blender/pulls/132742
All other YUV based codecs switch from default 4:2:0 YUV layout
(which is lossy) to a full resolution 4:4:4 YUV. However AV1 was not
doing that, probably by oversight.
Pull Request: https://projects.blender.org/blender/blender/pulls/132738
UnitSettings::scale_length was used to scale reported
values for operators (translate, shrink-fatten, voxel-size).
This isn't expected as the value isn't editable when the unit-system
is set to None.
Add BKE_unit_value_as_string_scaled utility function for clarity &
to ensure scaling is only applied when it should be.
The rest of blender does handle multi-layer EXR images, using the
"combined" or RGBA/RGB layers when the visual result is needed. Make
VSE do the same.
While fixing this, I found several issues in other not well tested code
and had to fix them:
- IMB_buffer_float_from_float_threaded was wrongly using source channels
as destination channels, producing garbage result.
- IMB_scale_into_new was not assigning channels to destination image.
Pull Request: https://projects.blender.org/blender/blender/pulls/132790
Paint cursor polling and drawing should get the active region via
`bScreen.active_region`, since this handles overlapped regions better.
This way the cursor handling will still get the main region while
hovering transparent parts of the sidebar, headers or other overlapped
regions.
Alternative fix to #132226.
Pull Request: https://projects.blender.org/blender/blender/pulls/132765
wm_gizmomap_handler_context_op currently prints an error message to the
console when screen layouts change while modal operations are running.
The operations work, and the comment above it says "this is not an
error to print", and it is confusing for users to see a console message
like this. Looks to be a left-over debugging tool.
Pull Request: https://projects.blender.org/blender/blender/pulls/132778
Changes in 02b1e5a48f don't work correctly in popovers. Which means you
can hover over a numerical input, then off again, and it will show an
incorrect mouse cursor. This PR just uses ED_region_cursor_set which
works there and elsewhere.
Pull Request: https://projects.blender.org/blender/blender/pulls/132775
Since the `usd_path_to_mat_name` map seems to always be used in tandem
with `mat_name_to_mat` to get the material, change it from a map of
[string, string] to [string, Material] and store the Material directly.
This removes the need to do a secondary lookup through `mat_name_to_mat`
and less memory will be used at runtime due to the smaller Value size.
Pull Request: https://projects.blender.org/blender/blender/pulls/132647
This PR fixes a number of items in Preferences that "Reset to Default"
to different values than the default preferences. For some items this
is because they just have incorrect values, some have redundancies
between the U_default struct and property default, and many others are
caused by our code that reverses struct defaults for properties that
are "negative SDNA", or don't struct defaults for enum_bitflag_sdna
properly. Items include "show_splash", "anisotropic_filter", etc.
Pull Request: https://projects.blender.org/blender/blender/pulls/132762
In some cases, using the Scrape Multiplane brush in Dynamic mode, the
brush stroke will have no vertices to sample from to find the associated
planes used to calculate deformations. This results in attempting to
divide by 0.
To make this potential error case more obvious, this commit changes the
helper method `sample_surface` to instead return a `std::optional` of
`ScrapeSampleData` in the rare occurance that we have no samples, so
that calling code is required to handle this case explicitly.
Pull Request: https://projects.blender.org/blender/blender/pulls/132573
Any reroute can be connected only to single source, or can be not connected at
all. So reroutes usually form trees. It is possible that there will be a cycle,
but such cycle can be only single in strongly connected set of reroutes. To
propagate a types from some certain target to all the reroutes in such a tree we
need to know all such a trees and all possible targets for each tree.
Before its was done with a stack-base breath first search and with implicit aim
to a targets of types to propagate.
Now everything is done explicitly, with grouping all reroutes to a strongly
connected sets. All source targets are handled now explicitly, which lets us to
use additional function to define priority between types later. Large number of
loops can be parallel, and as-is code 2-3 times faster for large node trees like
main tree in `Erindale_Flower_Shop` file.
Now possible change of the behavior:
1. For multiple targets use function to decide the most priority type.
2. In case of merge non-connected rerouted sets use statistic to decide the most
popular type.
3. Change behavior in case there is no explicit targets (dangling reroutes set).
Pull Request: https://projects.blender.org/blender/blender/pulls/131910
The fill tool was excluding fill-only materials when computing the image size for the boundary render. Removing this stroke filter extends the flood fill area to include the strokes with fill materials.
Note that all curves are rendered as strokes without fill triangulation for the purposes of the fill tool. This is the same behavior as in GPv2. The consequence is that for most fill strokes, which are _not actually cyclic and closed_ there may be non-obvious open boundaries which lead to the flood fill covering the interior of the fill strokes (the inside edges of the flower petals are open). This is usually ok because the flood fill is rendered behind existing strokes. If necessary we could simply render all the boundaries as cyclic for fill materials, but that goes beyond a simple regression fix.
Pull Request: https://projects.blender.org/blender/blender/pulls/132746
Empty legacy Actions were skipped from versioning, because they are
technically valid layered Actions as well. However, this created an
issue where there was no "Legacy Slot" created for those. Furthermore,
their `idroot` could still be set to a non-zero value, which is not
allowed on layered Actions.
`bAction::idroot` is not a very reliable field. It can be zero on legacy
Actions as well, and it can in certain cases be downright wrong (can
happen in certain linking scenarios). Because of this, the field is not
included in any "is this a layered or a legacy Action?" checks.
Pull Request: https://projects.blender.org/blender/blender/pulls/132757
This PR refactors each UI template into its own `interface_template_*.cc`
file.
* Added `interface_templates_intern.hh` which exposes shared utility
functions and macros.
* Doxygen comment sections that were redundant of the file name were
removed. If they contained additional description, they were added
to the file Doxygen `\file` header.
* Short templates that were closely related were kept together in single
files (e.g `uiTemplateHistogram`, `uiTemplateWaveform` and
`uiTemplateVectorScope` are all in `interface_template_scopes.cc`).
In this case, Doxygen comment section were preserved.
The only things remaining in `interface_templates.cc` are:
* Common utility function exposed by `interface_templates_intern.hh`
* Small independent templates (`uiTemplatePathBuilder`,
`uiTemplateNodeSocket` and `uiTemplateFileSelectPath`)
Ref: https://projects.blender.org/blender/blender/issues/117604
Pull Request: https://projects.blender.org/blender/blender/pulls/132468
Split the versioning of legacy Actions to slotted ones into two steps:
1. Versioning the Actions themselves, in the regular versioning code
(`do_versions_after_linking_400`). This has to happen in the 'after
linking' stage, and not in the 'before linking' stage, as there's
older 'after linking' code that will break when it gets fed slotted
actions. Any ID that is using a legacy Action will get tagged.
2. Versioning Action assignments, where the correct Action Slot has to
be chosen & assigned for each tagged ID. This has to happen in the
`do_versions_after_setup` stage, as choosing a slot requires that the
actions (both local & linked) have been converted already.
This also includes some necessary changes to the pre-2.50 Action versioning
code.
Note that this change does not handle library overrides. That's dealt
with in !131426.
Pull Request: https://projects.blender.org/blender/blender/pulls/131627
The code for converting pre-Animato actions was not getting run properly
because `chanbase` (where animation data used to be stored) was
erroneously getting cleared before the relevant versioning code was run.
The root cause was that the code checking whether an action was already
valid as a layered action or not was NOT confirming that `chanbase` was
empty as part of that check (as it is a DNA-deprecated field), which in
turn triggered code that defensively clears `chanbase` (among other
things) when an action is identified as layered.
Note that the conversion of IPO curves and other pre-Animato data
happens quite late in the versioning, even _after_ the "versioning after
linking" stage. This is not introduced in this commit, this is just to
illuminate pre-existing design that might not be entirely obvious.
Pull Request: https://projects.blender.org/blender/blender/pulls/131975
When creating Action Slots for legacy Actions, always name those slots
"Legacy Slot". Before this commit, the slot was named after the ID that
is animated by the Action; this matches what Blender will do when
animating that ID from scratch.
The old versioning behaviour caused issues when dealing with legacy
Actions: if there are multiple Actions in a file (for example multiple
run cycle animations) and only one of those was assigned to the
character (the rest has a fake user), Blender would only name that one
action slot after the character. The "fake user" Actions would just be
get a slot named "Slot".
This causes issues when toggling between the different Actions, as
Blender will not automatically assign a slot when switching from the
character- named one to the "Slot" one.
Ref: #129563, #130261
Pull Request: https://projects.blender.org/blender/blender/pulls/131425