940 Commits

Author SHA1 Message Date
Campbell Barton
b938800ba6 Cleanup: sort cmake file lists 2025-10-01 23:22:41 +00:00
hogan.mastanduno
dde9d21b91 OpenXR: VR Advanced Locomotion Phase 1
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
2025-10-01 22:16:12 +02:00
Richard Antalik
698268f927 VSE: Remove transform effect
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
2025-10-01 13:37:54 +02:00
Sean Kim
0a72429ea8 UV Sculpt: Rename strength_curve and curve_preset
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
2025-09-30 20:57:19 +02:00
Jacques Lucke
cadb3fe5c5 Blenloader: stable pointers in .blend files
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
2025-09-29 13:56:13 +02:00
Bastien Montagne
00dbb53131 UserPreferences: Enable Blendfile Compression By Default.
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
2025-09-25 17:57:31 +02:00
Sean Kim
327a1925cf Paint: Rename curve and curve_preset
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
2025-09-25 11:54:53 +02:00
Jacques Lucke
5ffc5df4f6 Geometry Nodes: support viewing non-geometry data with viewer node
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
2025-09-22 18:08:45 +02:00
marcopavanello
084aefd0e0 Render: Add Multiple Scattering Sky Texture
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
2025-09-15 18:08:28 +02:00
Nika Kutsniashvili
250384dd57 UI: Theme: Scrubbing/Markers shared region
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
2025-09-12 16:25:56 +02:00
Sybren A. Stüvel
6bf8685628 Anim: drop versioning code for pre-2.50 animation
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
2025-09-08 14:09:21 +02:00
Sean Kim
8188dbd246 Paint: Change brush size values to represent diameter
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
2025-08-30 00:18:41 +02:00
Omar Emara
3d7c8d022e Refactor: Nodes: Generalize node tree subtypes
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
2025-08-21 09:04:13 +02:00
Campbell Barton
cccc2c77c5 Cleanup: consistent for C-style comment blocks 2025-08-08 07:37:33 +10:00
YimingWu
6f57268e9a LineArt: Use "Radius" instead of "Thickness" for generating strokes
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
2025-08-07 15:40:17 +02:00
Omar Emara
68dc278fe5 Compositor: Redesign File Output node
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
2025-08-07 14:46:34 +02:00
John Kiril Swenson
54c63c4138 Cleanup: VSE: Rename deprecated DNA fields with _legacy suffix
No functional changes intended.
2025-08-06 01:37:16 +02:00
Campbell Barton
5dd160c39c Cleanup: indentation in cmake, sort files 2025-07-10 00:40:42 +00:00
Sean Kim
5bd6f41ff5 Fix: Silence deprecated warning
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
2025-07-02 05:27:00 +02:00
Hans Goudey
68759af516 Attributes: Use AttributeStorage for curves and Grease Pencil
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
2025-07-01 16:30:00 +02:00
Aras Pranckevicius
11bf3dd71e VSE: Text Strip supports text longer than 512 bytes
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
2025-06-20 21:27:12 +02:00
Campbell Barton
7ae8e18f0b Cleanup: rename preferences for NDOF sensitivity
Clarify the terms for NDOF translation & rotation sensitivity.
Previously translation was named: "ndof_sensitivity" making it
sound like it would control rotation as well.
2025-06-14 16:35:51 +10:00
Campbell Barton
bb9d491ca5 Merge branch 'blender-v4.5-release' 2025-06-14 16:02:07 +10:00
Campbell Barton
c482c52346 Cleanup: sort CMake file lists 2025-06-14 15:57:33 +10:00
Campbell Barton
bb5f6d437e Cleanup: sort DNA rename definitions 2025-06-14 15:55:41 +10:00
Clément Foucault
1c29a2e2e5 EEVEE: Rename and move old gtao properties
- 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
2025-06-13 15:36:17 +02:00
Bastien Montagne
bc80ef136e Big Endian Support Removal.
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
2025-06-12 10:37:47 +02:00
Hans Goudey
fa03c53d4a Point Cloud: Use AttributeStorage instead of CustomData
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
2025-06-09 21:53:20 +02:00
Clément Foucault
1c47e31367 GPU: Enable GL multithreaded compilation by default
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
2025-06-09 12:36:06 +02:00
Bastien Montagne
456a07c5e6 Improve Blender resilience to blendfile DNA data corruption.
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
2025-06-04 12:53:27 +02:00
Campbell Barton
4e7b9185a4 makesdna: support C-style comments in array definitions
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
2025-05-22 19:08:33 +10:00
Campbell Barton
e9aca43d89 Cleanup: use bool for comment variable in makesdna.cc
Also assert the value is set as expected when entering/exiting comments.
2025-05-22 13:51:29 +10:00
John Kiril Swenson
35cab63eaf Cleanup: VSE: Rename Strip::machine to channel
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
2025-05-21 19:13:20 +02:00
Campbell Barton
7883412cde Cleanup: rename Curve::type -> ob_type, remove BKE_curve_type_get
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.
2025-05-20 10:11:56 +00:00
Campbell Barton
cdaf17031e Docs: update help text for DNA renaming
Also use sha256sum in the example to calculate the sum and sort
definitions.
2025-05-20 19:59:52 +10:00
Campbell Barton
b3dfde88f3 Cleanup: spelling in comments (check_spelling_* target)
Also uppercase acronyms: API, UTF & ASCII.
2025-05-17 10:17:37 +10:00
John Kiril Swenson
41781df1a6 Cleanup: VSE: Rename seq1 and seq2 references
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
2025-05-15 05:01:39 +02:00
Jacques Lucke
9fd7a093c9 DNA: support getting sdna id for static DNA type
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
2025-05-12 11:16:26 +02:00
John Kiril Swenson
2ab59859c9 Cleanup: VSE: Replace remaining seq and sequence references
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
2025-05-01 00:22:04 +02:00
Jacques Lucke
6a90382390 Core: support buffers larger than 2GB in .blend files
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
2025-04-29 10:55:26 +02:00
Campbell Barton
c90e8bae0b Cleanup: spelling in comments & replace some use of single quotes
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).
2025-04-26 11:17:13 +00:00
Brecht Van Lommel
388a21e260 Refactor: Eliminate various void pointers passed to MEM_freeN
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
2025-04-21 17:59:41 +02:00
Brecht Van Lommel
637c6497e9 Refactor: Use more typed MEM_calloc<>, avoid unnecessary size_t cast
Handle some cases that were missed in previous refactor. And eliminate
unnecessary size_t casts as these could hide issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/137404
2025-04-21 17:59:41 +02:00
Brecht Van Lommel
7aaa43b557 Revert "Fix: Build failures when using path with spaces on macOS"
This reverts commit be63ebd961.

This doesn't work well with MSBuild, semicolons get escaped even in
verbatim mode.
2025-04-10 13:04:34 +02:00
Brecht Van Lommel
be63ebd961 Fix: Build failures when using path with spaces on macOS
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.
2025-04-07 16:29:14 +02:00
Clément Foucault
299a581b1b Grease Pencil: Accumulation Anti-aliasing
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
2025-04-03 16:52:05 +02:00
Campbell Barton
b385b667f7 Cleanup: keep DNA rename list sorted 2025-03-20 00:38:53 +00:00
Campbell Barton
126cfbeb82 Refactor: rename bPoseChannel::size to scale
Match the name of the RNA as well as Object::scale, also rename
associated flags.

Ref !136151
2025-03-19 22:12:47 +00:00
Bastien Montagne
6ff1e227c8 Cleanup: makesdna: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
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
2025-03-14 12:48:52 +01:00
Campbell Barton
6ef7dae8ef Cleanup: spelling in comments (make check_spelling_*) 2025-03-13 13:41:17 +11:00