Remove options that are duplicate and change description of options, so
they describe bit better, how timecodes are actually used.
Timecodes in Blender have pretty much nothing in common with more widely
known term "timecode". This confused users (and developers).
There were 5 options of which 3 were exactly same. This commit leaves
user with 3 options:
- Use timecodes for normal seeking/playback - Record Run
- Ensure, that no frame is duplicated or skipped - "Record Run No Gaps"
- Do not use timecodes - "None"
More verbose description was added to the definition in code.
Naming of these timecode types was kept, even if it is incorrect to not
break scripts and habits.
Pull Request: https://projects.blender.org/blender/blender/pulls/121001
This also moves the option to be a per editor space setting so you can
have different cache visualization options in different editor spaces
at the same time.
A quick toggle for the cache visualization is now available in the
overlays popover.
Pull Request: https://projects.blender.org/blender/blender/pulls/119428
Sequencer timeline displays red tint & appropriate icons for strips that are
missing media file (images, movies, audio, or meta strips that contain such).
Sequencer preview and rendering displays missing media strips as magenta,
similar to missing textures elsewhere in Blender. This is on by default,
sequencer view settings have an option to turn it off.
Pull Request: https://projects.blender.org/blender/blender/pulls/116869
This makes the read and write API functions match more closely, and adds
asserts to check that the data size is as expected.
There are still a few places remaining that use BLO_read_data_address
and similar generic functions, these should eventually be replaced as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/120994
Design updates as per #118288:
- Tweak text labels (colors, drop shadows)
- Strip border colors, inset outlines
- Muted strips are mostly gray, and their thumbnails are faded
- Overlapping strips are not semitransparent anymore
- Locked stripes only in content area
- Missing data blocks
- Updates to meta strips w/ missing data blocks
Pull Request: https://projects.blender.org/blender/blender/pulls/118581
This patch adds the ability to snap strips to markers. Previously, there
only existed options to snap to hold offsets and the current frame.
This snap type works identically to other snapping options by checking
for the relevant bit (here `SEQ_SNAP_TO_MARKERS`) and adding the marker
frame numbers to `snap_data->target_snap_points` within
`seq_snap_target_points_build()`.
To enable `seq_get_snap_target_points_count()` to have access to marker
information, the current Scene object is now passed to the function.
Pull Request: https://projects.blender.org/blender/blender/pulls/120450
Caused by addition of new code in 4e10aa6e71, which was not guarding
against negative frame values. The only other place that called
BKE_sound_set_scene_sound_pitch_constant_range guarded against negative
frames (added in 1fb692e896 + 49a0502f35), but generally it looks like
negative frames are a "no no" in audaspace, so just move the value
sanitization into BKE_sound_set_scene_sound_pitch_constant_range itself.
Pull Request: https://projects.blender.org/blender/blender/pulls/120891
In case a scene strips `Input` was set to `Sequencer`, but the scene did
not actually have `Editing` data (e.g. when just adding a `New` scene as
scene strip), blender would crash trying to render.
Now simply check if the required `Editing` data is present before
proceeding.
Pull Request: https://projects.blender.org/blender/blender/pulls/120418
Large int64_t values were calculated and assigned int however the
calculation was performed on integer types which would truncate the
result before casting to an in64_t.
Remove all BLF "_ex" versions of functions by using default arguments.
These functions only differ by having an optional argument that can
return extra details about the result of the operation. This PR just
make these part of the main function as optional arguments with default
values - all nullptr.
Pull Request: https://projects.blender.org/blender/blender/pulls/119994
Regression in [0] which would cause ensuring the slash to do nothing
in most cases. Note that the slash may not be needed, but that should
be handled separately.
[0]: d66f24cfe3
Compositor: Make Hue Correct node wrap
This patch makes the Hue Correct node as well as the Hue Correct VSE
modifiers to wrap, such that no discontinuities occur for the red hue.
Since it now wraps, the default curve preset now exempts the last point
of the curve.
A new CUMA_USE_WRAPPING flag was added to specify wrapping for curve
maps. The implementation works by adding two virtual points before and
after the terminal points in the curve map, such that their handles
match, and would then produce a continues curve.
This is a breaking change, since existing curves were also adjusted
using versioning. However, the change will not be significant, since in
most realistic cases, the terminal points will be close to each other,
and even with wrapping, the connection will be very sharp, almost
matching the old behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/117114
This patch adds clamped boundaries variants of the nearest interpolation
functions in the BLI module. The naming convention used by the bilinear
functions were followed.
Needed by #119414.
Pull Request: https://projects.blender.org/blender/blender/pulls/119732
As part of PR #118396 the "generator" effect strips (color, text,
adjustment) also started to put their "raw" images into the cache.
However, seq_cache_timeline_frame_to_frame_index that has optimization
that tries to use only one cache entry based on how many frames are
present in the strip was not expecting to see effect strips, ever.
As a result, something like adjustment layer would effectively just
cache a single frame, since it has no "source frames" to speak of.
Fixed that by only doing this optimization for non-effect strips.
Ultimately this was due to missing nullptr check before trying to
process the image, but this should have been caught when loading
ImBufAnims. If any is missing, cancel multiview loading and load
movie as if it was single view only.
Original code was very confusing, with seemingly indecisive logic.
I hope, that it is less confusing now, however there is still some
indecisiveness present. This is because multiview configuration may not
be correct, so there must be fallback and only some multiview settings
require loading of multiple files. Perhaps be better wording could be
used for `open_anim_file_multiview()`.
Fortunately this is now expressed within 5 lines of code instead of 100.
Further this can be improved by checking if the file exists, since now
VSE crashes when right eye image is missing, because loading code
does not try to actually open the file.
Pull Request: https://projects.blender.org/blender/blender/pulls/118580
Often in previs setups, you have several "variations" of image/movie strips
for review, where the topmost one completely covers the others under it. VSE
rendering already had an optimization where if there's a fully opaque strip
that covers the whole screen, then the lower strips are skipped from
processing/rendering. However, it was not handling the case of non-fullscreen
strips (e.g. you'd have a Color strip near top & bottom for letterboxing, and
an opaque strip "in the middle").
This adds a simple "occluder tracking", and skips strips that are completely
covered by any single opaque strip that is above it (like outlined in #117790
task).
Playback of Gold previs between 1:42 and 1:55, on Windows/Ryzen5950X:
- Average frame time 28.5ms -> 23.8ms
- Median frame time 24.1ms -> 21.5ms
- Two slowest frames: 263->189ms, 194->178ms
Rendering the Gold previs movie: 325s -> 304s (93% of previous time)
Pull Request: https://projects.blender.org/blender/blender/pulls/118396
The depsgraph CoW mechanism is a bit of a misnomer. It creates an
evaluated copy for data-blocks regardless of whether the copy will
actually be written to. The point is to have physical separation between
original and evaluated data. This is in contrast to the commonly used
performance improvement of keeping a user count and copying data
implicitly when it needs to be changed. In Blender code we call this
"implicit sharing" instead. Importantly, the dependency graph has no
idea about the _actual_ CoW behavior in Blender.
Renaming this functionality in the despgraph removes some of the
confusion that comes up when talking about this, and will hopefully
make the depsgraph less confusing to understand initially too. Wording
like "the evaluated copy" (as opposed to the original data-block) has
also become common anyway.
Pull Request: https://projects.blender.org/blender/blender/pulls/118338
This is different from applying effects to regular "source media" strips
like images or movies; an effect "hides" the input strip when it is
below itself in the channel.
Apply the same treatment to Color & Text strips. Fixes#118213.
If someone wants previous behavior for some reason, they can drag
the effect applied on Color/Text to be below the input strip.
Pull Request: https://projects.blender.org/blender/blender/pulls/118269
In some/many cases, an `ImBuf` is allocated, and all the pixels are
immediately filled by some code. Doing the memory clear within allocation
is just memory traffic for no good reason.
Add a flag to skip initialization of ImBuf pixels (IB_uninitialized_pixels)
and use that in some parts of VSE effects/rendering/cache/scopes, as well
as image loading code.
Rendering out VSE movie, on Windows/VS2022/Ryzen5950X:
- Sprite Fright: 443sec -> 414sec (takes 93% of previous time)
- Gold previs: 367sec -> 325sec (takes 88% of prev time)
Pull Request: https://projects.blender.org/blender/blender/pulls/118321