This renames the `Strip` struct to `StripData` and also renames
the `Sequence::strip` member to `Sequence::data`.
This is a first step towards naming the `Sequence` struct to `Strip`.
Pull Request: https://projects.blender.org/blender/blender/pulls/132165
When moving UV seams from special custom data types to attributes,
I considered them similar to mesh selection or visibility which are
"internal" attributes that aren't accessible procedurally and are
hidden from the UI. In retrospect that was the wrong decision; users
expect UV seams to behave more like bevel weights, and that makes sense.
This PR makes UV seams accessible in modifiers (geometry nodes) by
removing the leading period from the attribute name that indicated their
internal status.
The change of the attribute name is a breaking change of the API to some
extent, even though it's technically only mesh data. To mitigate that
issue, the `mesh.attributes["name"]` lookup function is modified to
support both the old and new names. Versioning code renames the
attribute to the new name when loading older files, and renames the
new name to the old name when saving files. That handling will be
removed as a breaking change in 5.0.
Pull Request: https://projects.blender.org/blender/blender/pulls/129803
This patch refactors the BKE distortion deltas bound computation to
compute each of the bounds independently. This is done to support cases
where the distortion is not symmetric and thus would need to grow the
image in a non-symmetric way.
When adding retiming key to split strip, causes, that new retimed
segments are spanning to exiting retiming keys or strip content bounds.
Realize fake keys at handles before adding new key instead.
Pull Request: https://projects.blender.org/blender/blender/pulls/132166
Typically we are more flexibl with the attribute domain and type,
especially in the context of color attributes. This node still used
the old "vertex color" concept (only byte colors on the face corner
domain). It should have been updated for color attributes. Now the
nodes uses the attribute API to retrieve the attribute which
automatically interpolates the domain and type.
Also fix the node's use of the active color attribute to use the new
string based system rather than CustomData. It's incorrect to use the
active color rather than the default, but changing that might break
existin files.
Pull Request: https://projects.blender.org/blender/blender/pulls/132149
This patch multi-threads the distortion bounds delta computations.
Additionally, it removes the 5-step approximation which was used. The
result of this function will be cached in the compositor and the problem
domain is relatively small.
- All movie related public headers now have MOV_ prefix instead of
IMB_movie_.
- All movie related public functions now have MOV_ prefix as well,
instead of IMB_movie_ or IMB_anim_.
- IMB_anim.hh -> MOV_read.hh (also ImBufAnim -> MovieReader), and
various utility functions not related to playback were split off
into MOV_util.hh.
- Other function name tweaks for clarity, e.g. IMB_suffix_anim
-> MOV_set_multiview_suffix and so on.
- All except one usages of MOV_get_fps (nee IMB_anim_get_fps) were
ultimately just converting returned value into a float. So make
MOV_get_fps just return that directly. For the (exactly just one)
place that needs numerator and denominator, have
MOV_get_fps_num_denom.
- Code comments on the public header functions.
- Removed never-used code paths inside movie timecode proxy building
file.
It might be easier to review each commit separately.
Pull Request: https://projects.blender.org/blender/blender/pulls/132145
Work-around the issue until we actually have correct refcounting usage
handling of Objects: For now, consider all linked objects used by
another used ID as used, even if their usercount is null.
NOTE: This _may_ have side-effects on liboverride (especially the resync
process), by leaving more 'unused' data behind. Since these are linked
though, and presumably not instanced in the Scene, this is probably an
acceptable compromise.
Pull Request: https://projects.blender.org/blender/blender/pulls/132076
This optimizes the move-constructor for `blender::Vector` when all of the
following are true:
* The source and destination vector have exactly the same type.
* The stored type is trivial.
* The inline buffer is `<= 32` bytes large (this value is a heuristic that could
be changed).
The basic idea of the optimization is that under these circumstances one can
just copy the entire inline-buffer over instead of only copying it partially
based on the vector size. While that can mean that more bytes have to be copied,
the machine code that does the copying can be more efficient due to less
branching and the hardcoded size.
The performance impact is quite measurable. Note that the speedup depends on how
many elements are in vector and thus how many elements of the inline buffer are
used. The following table shows the move construction performance of a
`Vector<void *, 4>`. Starting at 5 elements, the performance doesn't change much
anymore, because the inline buffer is just ignored.
| Elements | Old | New |
|----------|------|------|
| 0 | 20.3 | 14.6 |
| 1 | 22.7 | 21.5 |
| 2 | 36.4 | 21.6 |
| 3 | 36.4 | 21.5 |
| 4 | 36.5 | 21.6 |
| 5 | 21.4 | 21.1 |
| 6 | 21.3 | 21.1 |
| 7 | 21.4 | 21.1 |
| 8 | 21.5 | 21.0 |
| 9 | 21.4 | 20.9 |
| 10 | 21.3 | 20.9 |
The binary size stays effectively unchanged (< 2kb change).
Pull Request: https://projects.blender.org/blender/blender/pulls/131841
Import edge crease values and properly configure any added subdivision
modifiers with correct UV and boundary settings. These were already
exported so this now completes our subdivision support.
Pull Request: https://projects.blender.org/blender/blender/pulls/131569
We are currently setting all the Language "affect" options when
changing Language (Tooltips, Interface, Reports, New Data). This is
so that setting a language in a NEW config from the Quick Setup splash
screen will have those enabled. This PR keeps that but allows loading
old configs and keeping those options (#123702 & #112054). It also
allows changing language in Preferences without those changing as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/132046
We have two uses of identical code that checks to see if we have a
current preferences file (false for first run of new version). This PR
extracts that to new function `blender::bke::preferences::exists()` as
there will soon be a third use (#132046). Otherwise no behavior change.
Pull Request: https://projects.blender.org/blender/blender/pulls/132140
Ensure `gl_ViewportIndex` and `gl_Layer` are properly forwarded from the
geometry shader, and don't write to them from the vertex shader if
there's a geometry shader stage.
Fixes the Displacement "dicing" render tests on Nvidia OpenGL.
Pull Request: https://projects.blender.org/blender/blender/pulls/131875
Currently the node rebuilds the target point cloud BVH tree on every call,
potentially thousands of times if the field is evaluated on many elements.
Instead, build the BVH tree once and store it in the function.
Pull Request: https://projects.blender.org/blender/blender/pulls/132073
Currently there are three entry points to building BVH trees for mesh
ata: the caches on the mesh, an older set of functions used in the mesh
remap code, and a new set of functions used in some geometry nodes
sampling nodes. This commit unifies their implementations and switches
some functions from bit spans to index masks for representing a
selection of geometry.
A followup for 5e7f3e5c84.
Make the NOD_static_types.h file less important by moving `enum_name_legacy`
to be defined in the register function of every node. This helps our gradual transition
away from this file.
Also add a fallback to the node idname so that newly added nodes no longer need
to define the string value.
Pull Request: https://projects.blender.org/blender/blender/pulls/132131
This commit implements most features needed for simple text editing.
Active text strip can be edited in preview by pressing tab key, which
enabled text editing mode. With this mode active, outline matches text
boundary box and cursor is drawn.
Cursor can be moved with usual keys. Pressing shift starts selection.
Selection and navigation works when text is scaled or rotated. Mirrored
text is not supported in this PR. it can be done, but the text is
unreadable that way, so I kept it simple.
Multi line text is supported. Pressing return key starts new line.
Copy/paste operator uses OS copy paste buffer, so text from other apps
can be pasted.
Text is still limited to 512 characters. Text string property still
exists in side panel and is limited to single line. Individual
characters can not be styled in different way like in 3D viewport, but
the code is mostly ready for such feature.
Ref: #126547
Pull Request: https://projects.blender.org/blender/blender/pulls/127239
When using the "individual origin" pivot mode, calculate the center
based on the following:
* If the stroke is a Bézier stroke, use the center of each handle as the pivot.
* Otherwise, if the stroke is not a Bézier stroke, compute the mean position
of the selected control points in the stroke and use this as the center.
This center value is then used e.g. by the rotation or scale transform modes.
Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/130723
Cryptomatte meta-data are not loaded from EXR images with unnamed
layers. That's because the code assumed the layer is always named, and
thus had full names with a dot prefix, which didn't match the
Cryptomatte type name. To fix this, only add the dot when the layer is
named.
Action Slots point to the IDs they animate, and after swapping IDs they
also need some swappage (as the Action that first animated `id_a` will
now animate `id_b`, and vice versa).
Instead of doing this in the `id_swap()` function (and requiring
knowledge of how that's supposed to be done), just mark these pointers
as dirty so that they're rebuilt at first use.
This commit contains a little more code than strictly necessary, to add
a function in BKE for this cache invalidation. This avoids having to
have a dependency on the animrig module just for this purpose.
Fixes: #130136
Pull Request: https://projects.blender.org/blender/blender/pulls/131809
Change how `action_foreach_id()` reports action slot users. This contains
two changes:
- Report the correct pointer reference, so that the ID remapping code
can actually change the pointers in the cache (necessary, for example,
to nil pointers to deleted IDs).
- Never report anything when it's known the slot user cache is dirty.
Pull Request: https://projects.blender.org/blender/blender/pulls/131808
Previously, code related to reading/writing movie files via ffmpeg was
scattered around: some under blenkernel, some directly in generic
imbuf headers, some under intern/ffmpeg. Some of the files were named
with not exactly clear names. Some parts not directly related to movies
were including ffmpeg headers directly (rna_scene.cc).
What is in this PR:
Movie and ffmpeg related code is now under imbuf/movie:
- IMB_anim.hh: movie reading, proxy querying, various utility functions.
- IMB_movie_enums.hh: simple enum definitions,
- IMB_movie_write.hh: movie writing functions.
- intern: actual implementation and private headers.
- ffmpeg_compat.h: various ffmpeg version difference handling
utilities,
- ffmpeg_swscale.hh/cc: scaling and format conversion utilities
for ffmpeg libswscale,
- ffmpeg_util.hh/cc: misc utilities related to ffmpeg,
- movie_proxy_indexer.hh/cc: proxies and timecode indexing for movies,
- movie_read.hh/cc: decoding of movies into images,
- movie_write.cc: encoding of images into movies.
- tests: basic ffmpeg library unit tests that previously
lived under intern/ffmpeg.
Interface changes (at C++ level, no Python API changes):
- Mostly just movie related functions that were BKE_ previously, are now IMB_.
- I did one large-ish change though, and that is to remove bMovieHandle
struct that had pointers to several functions. Now that is
IMB_movie_write_begin, IMB_movie_write_append, IMB_movie_write_end
functions using a single opaque struct handle. As a result, usages
of that in pipeline.cc and render_opengl.cc have changed.
Pull Request: https://projects.blender.org/blender/blender/pulls/132074
This patch changes how transformations are realized by adjusting the
computed size of the new domain after transformation. Previously, this
was computed with the lower left corner of the domain as the origin of
transformation, while now, the center of the domain is used as the
origin. Consequently, domains shrinks/grows around their center, which
results in a more stable output as transforms are animated.
A consequence of this change is that we can no longer scale odd sized
domains to even sized domains or vice versa, since it grows/shrinks by
the same amount on both sides. Supporting this case requires further
investigation and will probably require passing down information to the
realization functions themselves.
Better to make sure that these functions operate on the passed in data,
and do not access the current context in some way. Generally that's more
predictable, but also makes sure these functions can be called on
inactive spaces (e.g. to update the active tool in the image editor on
changes in the 3D View, see #131062).