Includes the following changes to the existing Locomotion system for VR Scene Inspection:
* new VR Navigation Preferences and VR Session Settings
* changes to XR raycast logic and its visualization
* new XR vignette that appears when moving
* snap turning
Pull Request: https://projects.blender.org/blender/blender/pulls/144241
Functionality has been replaced by strip transform properties. Transform
strips in existing files will be replaced with gaussian blur with radius
of 0 to preserve modifiers and overall strip stack.
Pull Request: https://projects.blender.org/blender/blender/pulls/147003
Similar to 327a1925cf
* Renames `strength_curve` to `curve_distance_falloff`
* Renames `curve_preset` to `curve_distance_falloff_preset`
These changes are done for consistency with the other concepts in the
other paint modes.
Pull Request: https://projects.blender.org/blender/blender/pulls/147071
When writing .blend files, Blender traditionally wrote raw runtime-pointers into
the file. Since these pointers are different whenever Blender is restarted or
the file is loaded again, the written .blend file will be very different every
time. The file always changing is a problem with tools that use change-detection
on .blend files such as:
* Change detection during undo in Blender. When a serialized data-block is the
same in two consecutive undo steps, it's known that the data didn't change and
the data-block does not have to be reloaded and can potentially skip depsgraph
evaluation. Also see #141262.
* BAT: https://projects.blender.org/studio/flamenco/issues/104437
* Generally using .blend files in version control. The diffs can be smaller when
pointers aren't changing all the time and have a lower memory footprint.
This PR makes pointers in .blend files across multiples saves much more
consistent, improving the situation for the cases above. Although there is still
other data that changes on almost every save currently; that needs to be
addressed separately.
The basic design for pointer stability in blend files stable pointers, described
in #127706, is fairly straight forward. This patch implements a slightly
modified variant of that design. When reading .blend files, Blender already does
not care if the stored pointer values are actual pointer values, or just some
arbitrary identifiers. Therefore, we mainly just have to change the write-file
code. This also implies that this change is fully forward and backward
compatible.
The main non-obvious aspect of this patch is how to actually do the remapping of
runtime pointers to stable identifiers. In theory, having a single integer that
increments for every newly detected pointer works. But in practice that leads to
many changes in the .blend file because one pointer is added or removed
somewhere, all subsequent pointers will be different too. So some kind of
scoping is required to make sure that one small change does not affect
everything else.
This PR starts a new scope pointer identifier scope whenever a new ID data-block
starts. At first I thought it would be good to have separate maps for id-local
and global pointers. However, that's tricky currently, because at write-time, we
don't always have enough information to know if a specific pointer is local or
global. I worked on #146136 to improve the situation but the problem is bigger
than that since we also have various void pointers in DNA structs. Fortunately,
the solution implemented now also works fine with a single global map.
Implicit sharing in undo steps also had to be changed slightly to work with the
stable address identifiers instead of raw pointers.
There's also new code to find all pointers in DNA structs in the first place.
This is done once when writing starts. Then whenever a struct is written, a copy
is made, all pointers are replaced and the modified struct is written to the
.blend file. There is an optimization for the case when a struct does not
contain any pointers because then the copy can be skipped.
For checking the diff between two saved .blend files, I recommend enabling
`GENERATE_DEBUG_BLEND_FILE` and then diffing the text version of the .blend
files.
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/127729
IMPORTANT: This will force-enable this option in user preferences, as
part of the 5.0 versioning process. Users that do want to keep saving
uncompressed blendfiles will have to edit their user preferences
accordingly, and re-save them.
This commit does _not_ change the setting for an existing blendfile:
uncompressed blendfiles will keep being saved as uncompressed.
Implements #135735.
Pull Request: https://projects.blender.org/blender/blender/pulls/146172
This commit renames the following DNA fields and corresponding RNA
properties to better represnt usage:
* `Brush.curve` to `Brush.curve_distance_falloff`
* `Brush.curve_preset` to `Brush.curve_distance_falloff_preset`
Pull Request: https://projects.blender.org/blender/blender/pulls/146254
As discussed in the last geometry nodes workshop, the viewer node now
needs the flexibility to handle new features: bundles, closures, and
lists. This PR takes the opportunity to add support for an arbitrary
number of items. Values are displayed directly in the node are all
displayed in the spreadsheet, where a new tree view allows selecting
which data to view, including nested bundles. Lists, single values,
bundle items, and closure signatures are all visualized in the spreadsheet.
We also prioritize the existing viewer behavior that views a geometry
together with a field, so various special cases are added in the viewer
activation to handle this.
Bundle hierarchies are displayed in the new tree view in the spreadsheet
sidebar. The spreadsheet itself just displays bundle identifiers, types,
and the contained values. Design wise, there might be more integrated
ways to present that hierarchy, but doing it in the tree view is a very
simple starting place.
Interactively added viewer node inputs are now removed automatically
if the link is removed. There is a new "Auto Remove" flag for each input
controlling this behavior. It can't be enabled for all inputs all the time
because then one couldn't e.g. setup the viewer node properly using
a script (which might add a few inputs first and then creates links).
Also when viewer items are added with the plus icon in the sidebar,
they are not automatically removed immediately.
https://code.blender.org/2025/07/geometry-nodes-workshop-july-2025/#view-any-data
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/144050
This mode is based on the same athmospheric model as the previous one, but now
also accounts for multiple scattering and reflections from the ground.
This increases the accuracy, especially at low elevations.
Also renames some options for consistency:
- The previous "Nishita" model is now "Single Scattering"
- "Dust" is now "Aerosols"
- Default altitude is now 100m.
Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Pull Request: https://projects.blender.org/blender/blender/pulls/140480
Continues and depends on #145609, part of #140360 project.
Previously, all 5 animation/video editors had different properties
for Scrubbing/Markers region. This PR adds new Region panel for it,
so that all editors can share one color.
Text color in this region was coming from regular editor text color.
To differentiate between editors (as is the pattern already with other editors),
and allow more modular themeability of regions, new Text color is added
for that region as well.
Video in PR
Pull Request: https://projects.blender.org/blender/blender/pulls/146113
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 commit changes the internal storage and user-facing representation
of the brush size values (`size` and `unprojected_size`) from radius
to diameter.
This has a number of benefits:
* While the radius is more helpful for many internal operations, it is
more natural to estimate the size of a brush by the diameter
* Because the pixel size is stored as an integer, users are currently
unable to make brushes that have an odd numbered diameter, notably
preventing the ability to make single pixel brushes.
Internally, the `Brush` and `UnifiedPaintSettings` size values are
versioned to double their on-disk values. The relevant `BKE` functions
that access the data return the radius at runtime, and any internal
`struct`s that stored radius continue to do so.
The 'Radius' text for brushes is changed to 'Size' and all references
to it in descriptions are changed to 'size' as well.
Resolves#134204
Pull Request: https://projects.blender.org/blender/blender/pulls/142495
This patch generalizes node tree subtypes to be usable for node trees
other than Geometry Nodes. In particular, this:
- Renames SpaceNode.geometry_nodes_type to node_tree_sub_type, which now
store a tree type-specific enum.
- Renames SpaceNode.geometry_nodes_tool_tree to selected_node_group,
which now stores any context-less tree of any type.
This breaks the python API due to renaming.
Pull Request: https://projects.blender.org/blender/blender/pulls/144544
Previously line art uses the same thickness value as found in grease
pencil before blender v4.3 for generating strokes, now everything is
migrated to using "radius", so it makes more sense to change that it to
using "radius" so it's consistent with everywhere else.
Pull Request: https://projects.blender.org/blender/blender/pulls/144121
This patch redesigns the File Output node to provide better UX and UI.
This is mainly achieved by allowing the user to create inputs by
dragging into an Extend socket and adjust existing inputs using the
familiar UI list design available in Blender. Additionally, various UI
changes were done:
- The Use Node Format option was renamed to Override Node Format for
clarity.
- Socket types are now fixed and do not change as new links are made,
allowing users to specify the exact output type and employ implicit
conversion if needed.
- The distinction between images and Multi-Layer EXR was made clearer.
- Final output paths are drawn in the UI to remove guess work.
- The Base Path was split into a Directory and a File Name.
- Panels were added to group options, include a panel for the node
format, items, and item formats.
Pull Request: https://projects.blender.org/blender/blender/pulls/141091
Introduced in d73b8dd4f3
Unfortunately, the `Sculpt` struct has an implicitly generated copy
constructor which accesses the deprecated field in `sculpt_ops.cc`,
instead of allowing access to potentially deprecated fields at runtime,
this commit silences the warning by appending `_deprecated` to the field
and removing `DNA_DEPRECATED` from it.
Additionally, to preserve forward compatibility, the field is added to
`dna_rename_defs.h`
Pull Request: https://projects.blender.org/blender/blender/pulls/141298
This commit moves Curves and Grease Pencil to use `AttributeStorage`
instead of `CustomData`, except for vertex groups. This PR mostly
involves extending the changes from the above commit for point clouds
to generalize to other geometry types.
This is mostly straightforward, though a couple non-trivial places of
note are the joining of Grease Pencil objects (`merge_attributes`), the
"default render fallback" UV for curves objects which was previously
unused at the UI level and just ended up being the first attribute, and
the `update_curve_types()` call in the curves versioning function.
Similar to:
- fa03c53d4a
- f74e304b00
Part of #122398.
Pull Request: https://projects.blender.org/blender/blender/pulls/140936
Text strip had a fixed size buffer of 512 bytes to hold the displayed
text (this can be much fewer actual characters with non-English
languages). Switch to dynamically allocated buffer instead, which can
hold longer text.
In order to support forward/backward compatibility, TextVars continues
to hold the 512 byte buffer in memory. When writing out the .blend file,
dynamic text buffer is copied into the fixed one. If it is longer, the
text is truncated, so opening the .blend file in an older version
will contain the first 512 bytes of the longer text. When reading
existing files without the dynamic text buffer, it is created from the
static buffer. Conceptually this approach is similar to constraints
name length increase PR !137310.
The text strip editing code was switched to operate on the dynamic
buffer, resizing it as needed. seq::CharInfo internal struct was
switched to be more independent of the actual buffer address; now
each char entry just stores an index into the buffer instead of direct
pointer (side effect: makes the struct smaller as well).
Pull Request: https://projects.blender.org/blender/blender/pulls/140733
Clarify the terms for NDOF translation & rotation sensitivity.
Previously translation was named: "ndof_sensitivity" making it
sound like it would control rotation as well.
- Move `gtao_distance` to view layer and rename to
`ambient_occlusion_distance` (API change).
- Remove `gtao_quality` from the RNA (API change).
- Remove `use_gtao` (unused) from the RNA (API change).
- Rename `gtao_focus` to `fast_gi_bias` in the DNA (no API
change).
- Rename `gtao_resolution` to `fast_gi_resolution` in the
DNA (no API change).
Pull Request: https://projects.blender.org/blender/blender/pulls/140298
This commit implements #125759.
It removes:
* Blender does not build on big endian systems anymore.
* Support for opening blendfiles written from a big endian system is
removed.
It keeps:
* Support to generate thumbnails from big endian blendfiles.
* BE support in `extern` or `intern` libraries, including Cycles.
* Support to open big endian versions of third party file formats:
- PLY files.
- Some image files (cineon, ...).
Pull Request: https://projects.blender.org/blender/blender/pulls/140138
This moves `PointCloud` to use the recently added `AttributeStorage`
at runtime. Mainly this involves implementing the higher level attribute
API on top, and implementing the RNA API as well. The attribute RNA type
is now backed by either CustomDataLayer or bke::Attribute. For now the
new code is specific to point clouds but next steps can reuse it for
Grease Pencil layer attributes, curves, and eventually meshes.
Point cloud attributes no longer have a name length limit.
Internally, the `AttributeStorage` API is extended with a few additions:
- The data structs have static constructors for convenience.
- A few functions give index-based access to attributes
- A "rename" function is added.
The `Attribute` RNA type now exposes a `storage_type` property.
For now the "single value" option is still unused at runtime, and
accessing the single value data isn't implemented yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/139165
This allows to reduce the waiting time caused by
shader compilation on some GPU-driver combo.
A new settings in the User Preferences make it
possible to override the default amount of worker
threads and optionally use subprocesses.
We still use only one worker thread in cases where
there is no benefit with adding more workers
(like AMD pro driver and Intel windows).
It doesn't scale as much as subprocesses for material
shader compilation but that is for other reasons
explained in #139818.
Add some heuristic to avoid too much memory usage
and / or too many stalls.
Also add some heuristic to the default number of subprocess for
the platform that shows scalling.
Historically, multithreaded compilation was prevented by the
need of context per thread inside `DRWShader` module.
Also there was no good scaling at that time. But
nowadays numbers shows different results with
good scaling with reasonable amount of threads on many
platforms.
Even if we are going for vulkan in the next release
most of the legacy hardware will still use OpenGL for
a few other releases. So it is relevant to make this
easy improvement.
See pull request for measurements.
Pull Request: https://projects.blender.org/blender/blender/pulls/139821
This commit improves DNA parsing resilience to data corruption in two ways:
* Detect and abort on failure to allocate requested amount of memory.
* Detect multiple usages of the same `type_index` by different struct
definitions.
The second part fixes the `dna_genfile.cc:1918:40.blend` case reported
in #137870.
Pull Request: https://projects.blender.org/blender/blender/pulls/139803
Support parsing C style comments such as:
`char filepath[/*FILE_MAX*/ 1024]`
This is done by skipping white-space inside square brackets
so the value is read as:
`char filepath[1024]`.
Ref: !139196
This should make VSE code more readable and easier to understand from an
outside perspective.
The name was chosen to be `channel` rather than `channel_index` to keep
things short and concise -- it should be clear based on the context
whether we are talking about the strip's channel index (singular case,
`Strip::channel` or `SeqTimelineChannel::index`) vs. the channel list
(plural case, e.g. `Editing::channels`).
Pull Request: https://projects.blender.org/blender/blender/pulls/138919
It's not common for object data to reference it's object type
so name the struct member to make this clear.
Also remove BKE_curve_type_get which is no longer needed.
This patch renames `seq1` and `seq2` to `input1` and `input2` in `Strip`
and `StripSelection` structs to consist with recent refactors in
#132179. It also renames other instances of `seq1` and `seq2` (e.g.
local variables) to `strip1` and `strip2` instead.
There is only one small breaking change to the Python API with
`strips.new_effect()` taking in the new names now. There should be
no other functional changes involved.
Pull Request: https://projects.blender.org/blender/blender/pulls/138296
This adds a new `DNA_sdna_type_ids.hh` header:
```cpp
namespace blender::dna {
/**
* Each DNA struct has an integer identifier which is unique within a specific
* Blender build, but not necessarily across different builds. The identifier
* can be used to index into `SDNA.structs`.
*/
template<typename T> int sdna_struct_id_get();
/**
* The maximum identifier that will be returned by #sdna_struct_id_get in this
* Blender build.
*/
int sdna_struct_id_get_max();
} // namespace blender::dna
```
The `sdna_struct_id_get` function is used as replacement of
`SDNA_TYPE_FROM_STRUCT` in all places except the DNA defaults system. The
defaults system is C code and therefore can't use the template. There is ongoing
work to replace the defaults system as well though: #134531.
Using this templated function has some benefits over the old approach:
* No need to rely on macros.
* Can use type inferencing in functions like `BLO_write_struct` which avoids
redundancy on the call site. E.g. `BLO_write_struct(writer, ActionStrip,
strip);` can become `BLO_write_struct(writer, strip);` which could even become
`writer.write_struct(strip);`. None of that is implemented as part of this
patch though.
* No need to include the generated `dna_type_offsets.h` file which contains a
huge enum.
Implementation wise, this is done using explicit template instantiations in a
new file generated by `makesdna.cc`: `dna_struct_ids.cc`. The generated file
looks like so:
```cpp
namespace blender::dna {
template<typename T> int sdna_struct_id_get();
int sdna_struct_id_get_max();
int sdna_struct_id_get_max() { return 951; }
}
struct IDPropertyUIData;
template<> int blender:🧬:sdna_struct_id_get<IDPropertyUIData>() { return 1; }
struct IDPropertyUIDataEnumItem;
template<> int blender:🧬:sdna_struct_id_get<IDPropertyUIDataEnumItem>() { return 2; }
```
I tried using static variables instead of separate functions, but I didn't
manage to link it properly. Not quite sure yet if that's an actual limitation or
if I was just missing something.
Pull Request: https://projects.blender.org/blender/blender/pulls/138706
Ref: #132179
Renames:
- `Editing.act_seq` -> `Editing.act_strip`
- `SequenceModifierData` -> `StripModifierData`
- Its member `mask_sequence` is now `mask_strip`.
- `MetaStack.parseq` -> `MetaStack.parent_strip`
- Remaining function names/parameters that were not dealt with in #132748
- Various references to `seq` or `sequence` throughout code and docs when
referring to a strip
Also moves `_get` to the end of the renamed function names where
applicable for standardization (unless "by" or "from" are used).
There should be no changes to current behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/138077
This is implements option 1 of #129309. It contains a few changes:
* Split `BHead8` into `SmallBHead8` and `LargeBHead8`. The latter is the new one
and uses `int64_t` for array sizes instead of just `int`. That applies to to
buffer size in bytes (`len`) and the array size (`nr`).
* The first .blend file header (the first few bytes of the file) are updated
according to #129309.
* Support reading files with that use `BHead4`, `SmallBHead8` and `LargeBHead8`.
* New option in the preferences that controls whether new files are written with
the older `SmallBHead8` or the new `LargeBHead8`. The new file format is
disabled by default. Potential unofficial 32 bit builds (#67184) always write
`BHead4`, but can read all types (in theory anyway, can't test it).
Note that there are other places in Blender that don't fully support arrays this
large. E.g. I noticed that the spreadsheet currently can't scroll all the way
down.
The experimental option can be removed once we are in the 5.0 branch, at which
point only 4.5 will be able to open the files saved with 5.0.
Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/129751
Previously spell checker ignored text in single quotes however this
meant incorrect spelling was ignored in text where it shouldn't have
been.
In cases single quotes were used for literal strings
(such as variables, code & compiler flags),
replace these with back-ticks.
In cases they were used for UI labels,
replace these with double quotes.
In cases they were used to reference symbols,
replace them with doxygens symbol link syntax (leading hash).
Apply some spelling corrections & tweaks (for check_spelling_* targets).
It's safer to pass a type so that it can be checked if delete should be
used instead. Also changes a few void pointer casts to const_cast so that
if the data becomes typed it's an error.
Pull Request: https://projects.blender.org/blender/blender/pulls/137404
Use VERBATIM to ensure spaces inside command line arguments don't get
escaped automatically.
On Linux and Windows the oneAPI kernel compilation still has problems.
There is an apparent bug with single quote escaping in add_custom_command
which means it's not easy to use VERBATIM.
This adds a new more accurate antialiasing to the Grease Pencil
render engine. This is only available for render.
This Accumulation AA doesn't replace the SMAA. SMAA is still
used by the viewport and for removing aliasing from the
depth buffer. However, using both at the same time can lead
to overblurred result.
Here are some measurements for how much the render time
increases compared to the baseline with different (SSAA) sample
counts (using an example production file, rendered at 1080p,
results might vary depending on the scene complexity):
* 8 samples: +0.14 s
* 16 samples +0.36 s
* 32 samples: +0.58 s
Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/136551
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.
This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.
MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.
NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.
Pull Request: https://projects.blender.org/blender/blender/pulls/135971