Commit Graph

152434 Commits

Author SHA1 Message Date
Habib Gahbiche
445eceb02a Nodes: Remove "Use Nodes" in Shader Editor for World
Part of https://projects.blender.org/blender/blender/pulls/141278

Blend files compatibility:
If a World exists and "Use Nodes" is disabled, we add new nodes to the
existing node tree (or create one if it doesn't) that emulates the
behavior of a world without a node tree. This ensures backward and
forward compatibility.

Python API compatibility:
- `world.use_nodes` was removed from Python API => **Breaking change**
- `world.color` is still being used by Workbench, so it stays there,
although it has no effect anymore when using Cycles or EEVEE.

Python API changes:
Creating a World using `bpy.data.worlds.new()` now creates a World with
 an empty (embedded) node tree. This was necessary to enable Python
scripts to add nodes without having to create a node tree (which is
currently not possible, because World node trees are embedded).

Pull Request: https://projects.blender.org/blender/blender/pulls/142342
2025-07-28 14:06:08 +02:00
YimingWu
272178d001 Fix #143420: Grease Pencil: Handle empty result in dash modifier
The dash modifier creates final result by combining filtered/processed
and unfiltered strokes, but this result could be empty. The code assumes
valid joined geometry when it's sometimes not the case. This patch did
a null check and it worked as it should.

Pull Request: https://projects.blender.org/blender/blender/pulls/143424
2025-07-28 13:38:08 +02:00
Brecht Van Lommel
fa007002b1 Refactor: Logging: Move G.quiet to CLOG, replace some printfs
* Replace G.quiet by CLG_quiet_set/get
* CLOG_INFO_NOCHECK prints are now suppressed when quiet, these were
  typically inside a if (!G.quiet) conditional already.
* Change some prints for blend files, color management and rendering to
  use CLOG, that were previously using if (!G.quiet) printf().

Pull Request: https://projects.blender.org/blender/blender/pulls/143138
2025-07-28 13:36:13 +02:00
Bartosz Kosiorek
b1d5c35f3a Physics: Change default shape for Bubble and Foam particles, to increase visibility
Change default shape of Bubble and Foam, to be able to notice potential
artifacts in the Viewport. The shape for bubble was changed to circle, and
the shape for Foam was changed to cross.

It allows users to notice and fix artifacts in early stages for reports like:
#79995 #81011 #85533 #97063

Pull Request: https://projects.blender.org/blender/blender/pulls/138681
2025-07-28 13:33:04 +02:00
Bartosz Kosiorek
127d891f31 Fix #86512: Fire simulation without smoke not affected by force field
It was incorrectly skipping effectors in this case.

Fix #86512
Fix #129427

Pull Request: https://projects.blender.org/blender/blender/pulls/137679
2025-07-28 13:16:17 +02:00
Bartosz Kosiorek
bd6f32559c Fix #104074: Cloth simulation presets missing internal springs and pressure
Pull Request: https://projects.blender.org/blender/blender/pulls/142191
2025-07-28 12:47:37 +02:00
Brecht Van Lommel
eb8dc8f535 Fix: Operator, app template and benchmarking script errors after media type
Always set the media type before the file format.

Ref #142955

Pull Request: https://projects.blender.org/blender/blender/pulls/143433
2025-07-28 11:55:11 +02:00
Benjamin Beilharz
fa2062ee96 Refactor: Renames the zero extension mode to clip
This commit renames the `ExtensionMode`'s `Zero` case to `Clip`.

Pull Request: https://projects.blender.org/blender/blender/pulls/143354
2025-07-28 10:45:12 +02:00
Habib Gahbiche
cf5be88e7f Fix #143291: USD: World uses wrong output node
The problem was that the first output node was chosen instead of the
active one.

Pull Request: https://projects.blender.org/blender/blender/pulls/143292
2025-07-28 10:27:44 +02:00
Omar Emara
6f426f498a Refactor: Move pass name aliasing to context implementation
This patch moves the rules that alias Image to Combined for pass names
to the context implementations. This is because this only makes sense
for contexts that deal with passes, while it wouldn't make much sense
for other possible contexts like VSE modifiers.

Pull Request: https://projects.blender.org/blender/blender/pulls/143419
2025-07-28 10:00:20 +02:00
Benjamin Beilharz
4bffd43adc Cleanup: Adds missing static casts
This commit adds missing static casts for the interpolation and
extension mode lookups.

Pull Request: https://projects.blender.org/blender/blender/pulls/143418
2025-07-28 09:11:21 +02:00
Omar Emara
ed8c072933 Refactor: Add default implementation for render_data
This patch adds a default implementation for the render_data method of
the compositor context. It defaults to the scene render_data.

Pull Request: https://projects.blender.org/blender/blender/pulls/143205
2025-07-28 07:55:46 +02:00
Jesse Yurkovich
26c939849c Cleanup: USD: Various C++ cleanups for point instancing export support
- Use Blender C++ containers
- Use const in more places
- Remove unnecessary headers
- Style/guideline cleanups

Pull Request: https://projects.blender.org/blender/blender/pulls/143397
2025-07-28 07:16:26 +02:00
Jesse Yurkovich
f7210eabd8 USD: Enable the allow_unicode export operator property by default
All supported versions of Blender are capable of handling the Unicode
prim and property names now.

It's difficult to determine how much of the USD ecosystem is using
version 24.03 or greater so there is some risk of our files (when they
make use of Unicode names) not loading correctly for other DCC
applications.

Pull Request: https://projects.blender.org/blender/blender/pulls/142747
2025-07-28 07:15:50 +02:00
Campbell Barton
ca0e6e77ec UI: improve percentage display for wm.progress API
wm.progress displayed a percentage in a cryptic
2x2 grid of numbers, so:

```
75
23
```

Represents `75.23%`. This is now shown as `75.23%`
on systems that support RGBA cursors.
2025-07-27 21:26:26 +10:00
Campbell Barton
8355451700 Cleanup: quiet unused warnings for Python scripts 2025-07-27 20:36:07 +10:00
Campbell Barton
320975c842 Cleanup: don't pass an Array by value in mesh_intersect.cc 2025-07-27 20:32:55 +10:00
Andrej730
ddeddaecd6 PyDoc: improve mathutils python signatures and doc-strings
- Adding `/` to signatures to indicate that arguments are accepted only
  as positional.
- Document default values and optional arguments in consistent way with
  other docs.
- Use `Literal` for strings to indicate set of allowed string values
  (later it can also be used in typing stubs).
- Document some undocumented arguments.

Ref !143278
2025-07-27 20:23:44 +10:00
Campbell Barton
895189dd19 PyDocs: always quote enum values in docs
While this was an intentional change in [0],
it seemed like an error to removing quoting (based on #141853).

Restore the quotes while keeping the string literals.

[0]: 0fb80f698a
2025-07-27 19:36:13 +10:00
Campbell Barton
37a2effab7 Cleanup: avoid casting away 'const'
Copy into a non-const variable before assignment to avoid casts that
remove `const`.
2025-07-27 17:06:06 +10:00
Campbell Barton
b8897d3f6e Cleanup: remove unnecessary name prefix in DrawCache::text_id 2025-07-27 16:59:11 +10:00
Campbell Barton
f7fb02dcf9 Cleanup: use dash for bullet points in generated docs
Follow the user manual style guide.
2025-07-27 16:56:21 +10:00
Campbell Barton
2d0a418a47 Fix #141853: Enum values aren't quoted in API doc function signatures
Regression in [0] which used string literals for enum lists
unintentionally removed the quotes for function signatures.

[0]: 0fb80f698a
2025-07-27 16:45:03 +10:00
Campbell Barton
e8f9e2d1d1 Cleanup: use UTF8 string functions in editors & related logic
Use UTF8 aware functions unless raw bytes are expected.
2025-07-27 16:41:19 +10:00
Campbell Barton
f6af0aae7c Cleanup: use UTF8 string functions for tracking members
Use UTF8 aware functions unless raw bytes are expected.
2025-07-27 16:39:57 +10:00
Campbell Barton
eef9509ff1 UI: respect UI_BUT_NO_UTF8 for text buttons
This was already handled by most accessors.
2025-07-27 14:58:42 +10:00
Campbell Barton
e93e9db6b7 Cleanup: UTF8 string functions for color-space & imbuf strings
Use UTF8 aware functions unless raw bytes are expected.
2025-07-27 04:34:04 +00:00
Andrej730
0d2b44e309 Fix: Vector.to_tuple didn't accept precision of -1
The to_tuple method defaulted to -1 but didn't accept -1 as an argument
(as documented).

Ref !143278
2025-07-27 13:47:13 +10:00
Campbell Barton
01436bfbf3 Build: unbreak WITH_INTERNATIONAL=ON 2025-07-27 13:27:27 +10:00
Campbell Barton
9f056204e5 Cleanup: use UTF8 string functions in source/blender/python
Use UTF8 aware functions unless raw bytes are expected.
2025-07-27 12:49:02 +10:00
Campbell Barton
83a489d9ac Cleanup: remove commented code
These errors are handled by exceptions.
2025-07-27 12:49:02 +10:00
Campbell Barton
71a19e04ff Cleanup: back-tick quote literal strings in code comments
Prevent doxygen attempting to interpret symbols withing the text.
The `make check_spelling_*` target also skips this text.
2025-07-27 12:49:02 +10:00
Campbell Barton
8c8c8d5014 Cleanup: replace *_max_length with _maxncpy for null inclusive size
The term "length" is too easily confused with the `strlen(..)`
length without the null byte. Most string functions that take a static
buffer size use the suffix `maxncpy` to avoid off by one errors.
2025-07-27 12:49:02 +10:00
Campbell Barton
2528a41965 Fix: off by one error escaping node names
Also replace allocation with with the more commonly used
2x static-buffer size.
2025-07-27 12:49:02 +10:00
Harley Acheson
c022d5908f BLF: Increase FreeType Cache Values
When we first enabled FreeType font caching we purposely constrained it
so that we could see it was working, dropping and loading font faces
and sizes as needed. But that was years ago now and it is still running
with no more than 4 faces, 8 sizes, and only 400KB of cache. At minimum
we run with 3 simultaneous faces (main UI font and two copies of the
mono font), so allowing it 4 max seems pretty small. This PR changes
the max_faces to 8, sizes to 16, and the cache size to 1MB. Note that
these changes will give NO noticable user change, good or bad, under
normal circumstances. FreeType will churn a bit less, but the time
taken to do these things is very little.

Pull Request: https://projects.blender.org/blender/blender/pulls/143240
2025-07-27 01:40:12 +02:00
Jörg Müller
957ee8953b Audaspace: porting changes from upstream.
This change introduces time stretching and pitch scaling.
However, none of this will be compiled at the moment, as rubberband
needs to be added to the dependencies first.

Credit: Kacey La
2025-07-26 19:00:34 +02:00
Campbell Barton
649b89781e Cleanup: ensure UTF8 string copy for DNA & screen data
Use `BLI_strncpy_utf8` & `BLI_snprintf_utf8` for fixed size buffers in
DNA and screen data structures such as panels, menus & operators.

This could be considered a fix as copying a UTF8 string into a smaller
buffer without proper truncation can create an invalid UTF8 sequence.
However identifying which of these users are likely to run into would
be time consuming and not especially useful.
2025-07-26 12:33:15 +00:00
Campbell Barton
e9ffd666d5 Cleanup: ensure the output of BLI_path_to_display_name is valid UTF8
While this didn't cause errors, the resulting text was often used in
situations where UTF8 is expected (data-block names & UI labels).
Ensure names are UTF8 to avoid encoding related errors in the future.
2025-07-26 12:08:45 +00:00
Campbell Barton
faed51f195 Cleanup: remove redundant calls to strlen 2025-07-26 12:08:15 +00:00
Campbell Barton
0531230a35 Fix: incorrect sizes of fixed size buffers, ensure valid UTF8
Correct code that was likely to truncate when copying strings and
correct the the size of fixed sized buffers.
2025-07-26 12:07:27 +00:00
Campbell Barton
24c965905e Fix: armature "Auto-Name by Axis" creating invalid UTF8 names
When auto-naming based on axis, the string concatenation didn't take
UTF8 encoding into account, adding the suffix could create names
which raised an exception when accessed from Python.

Resolve using UTF8 string truncation.

Also resolve a logical error reading past the buffer bounds if the name
passed in was longer than MAXBONENAME.
2025-07-26 11:58:39 +00:00
Aaron Carlisle
735ad2cb7b UI: List node in alphabetical order
After "Z Combine" was renamed in b35971ad08 it needs to be placed earlier in the list.
2025-07-25 22:25:19 -04:00
Aaron Carlisle
60bd15ca40 Core: Add-ons: Display Maintainer as "Blender Foundation"
The author field is displayed in the UI as "Maintainer",
most of the original authors are no longer active or are part of the foundation.
Since the core add-ons are maintained the same as the rest of Blender they should be shown accordingly.

The exceptions here are the GLTF and Hydra add-ons; these Khronos Group and AMD are included as maintainers.

The orginal author field is preserved in the chance the add-on looses it's "core" status.

Pull Request: https://projects.blender.org/blender/blender/pulls/140690
2025-07-26 03:42:15 +02:00
Hans Goudey
ed372380c5 Cleanup: Follow style guide & conventions in mesh_tangent.cc
- Order class variables before functions
- Use this-> to access non-private members
- Remove unnecessary BKE prefix
- Remove useless comments
- Use standard "uv_map" name for variable
- Use consistent order for mesh span variables
- Use C++ vector types instead of raw pointers
- Use Span instead of raw pointers
- Pass Span-like variables by value
2025-07-25 18:12:08 -04:00
Hans Goudey
855113ab06 Refactor: Mesh: Slightly simplify tangents API
The RNA `Mesh.calc_tangents()` function used a mesh tangents API wrapper
function that existed at a different abstraction level than the other
functions. That wrapper was only used in this single place, so just
inline its logic into the RNA code. Also give the base tangents API
function a name that makes its limitations clear.
2025-07-25 18:01:00 -04:00
Hans Goudey
44e6822191 Cleanup: Remove debug code accidentally included in previous commit 2025-07-25 17:26:22 -04:00
Hans Goudey
33b430892c Fix #143218: Uninitialized VBO data using multiple UV tangents
Caused by b19696c0b8.

I misunderstood the meaning of the vertex buffer allocation size.
Even though the attributes aren't interleaved, the fact that there
are multiple attributes is still included in the "element size" that's
multiplied with the size argument to `GPU_vertbuf_data_alloc`.

Also switch to spans and indices rather than incrementing raw pointers,
which would have made this much faster to debug.
2025-07-25 17:00:47 -04:00
Jonas Holzman
9d993b4f74 Build: Add macOS x64 deprecation warning to make update
Add a simple deprecation message to warn users that macOS pre-compiled
dependencies are no longer provided starting with 5.0, and that they
should either build the libraries themselves or downgrade to 4.5.

This is what the warning looks like in context:
```
$ make update
git lfs install --skip-repo
Git LFS initialized.

Configuring Precompiled Libraries
=================================

Detected platform     : macos
Detected architecture : x64

Updating Libraries
==================

* Skipping lib/linux_x64
* Skipping lib/macos_arm64
* Skipping lib/windows_x64
* Skipping lib/windows_arm64

Update finished with the following messages
===========================================

Blender repository skipped: you have unstaged changes
WARNING: macOS x64/Intel support was dropped in Blender 5.0.
         As such, pre-compiled dependencies are no longer provided.
         You may build the dependencies yourself, or downgrade to Blender 4.5.
         For more details, please see: https://devtalk.blender.org/t/38835
```

Pull Request: https://projects.blender.org/blender/blender/pulls/143133
2025-07-25 22:39:00 +02:00
Brecht Van Lommel
fbfa4e3805 Fix #143128: Cycles crash or artifacts with multi device rendering and denoising
Clear graphics interop when mapping the buffer directly, as this might free the
underlying buffer or handle.

Fix #141736: Artifacts on Vulkan GPU + GPU
Fix #143128: Crash on Metal CPU + GPU

Pull Request: https://projects.blender.org/blender/blender/pulls/143243
2025-07-25 21:43:01 +02:00
Ray Molenkamp
c1ce72a8fc win64: Deps: fastjsonschema 2.21.1 + cattrs 25.1.1
These are the changes from #141950 as requested by #141945
this contains the following changes:

Attrs 25.3.0
Cattrs 25.1.1
Fastjsonschema 2.21.1
Typing_extensions 4.14.1
2025-07-25 13:15:32 -06:00