Commit Graph

1344 Commits

Author SHA1 Message Date
Jeroen Bakker
84e2795ee2 Fix: Vulkan: Workbench rendertest were not reported
The Vulkan workbench rendertests were not included to the overall
report due to a typo.
2025-09-05 14:34:14 +02:00
Brecht Van Lommel
c984f6b67a Fix: Python error creating new reference renders for tests
Pull Request: https://projects.blender.org/blender/blender/pulls/145755
2025-09-05 11:11:32 +02:00
Campbell Barton
a590e4fa6b Cleanup: correct comments, add __all__ to bl_pyapi_prop_array.py 2025-09-04 16:55:41 +10:00
Falk David
3978908c98 Python: VSE: Remove deprecated "sequence" context API
Remove APIs that have been deprecated since Blender 4.4.
See https://developer.blender.org/docs/release_notes/4.4/python_api/#deprecated_1.

Pull Request: https://projects.blender.org/blender/blender/pulls/145597
2025-09-03 19:31:30 +02:00
Brecht Van Lommel
5cc6ad6afe Video: Save colorspace metadata based on display, remove HDR option
Now that there are Rec.2100 PQ and HLG displays, the additional HDR option
for video export is redundant. Typically you would now select a HDR display
early on and do all your video editing with it enabled.

For saving a HDR video, the encoding panel will now show the name of the color
space, and warn when the video codec or color depth is incompatible.

Since this is now based on interop IDs for the dislpay color spaces, we can
map more of those to the appropriate CICP code. This works fine for Display P3,
in my tests it looks identical to sRGB except that the wide gamut colors are
preserved.

However Rec.1886 and Rec.2020 are problematic regarding the transfer function,
although the latter at least has the correct primaries now. So it should be
a net improvement and this could be looked at later if anyone wants.

---

Background:

* Rec.1886 and Rec.2020 display color spaces in Blender use gamma 2.4.
* BT.709 trc is almost the same as gamma 2.4, so seems like the correct choice.
* We already write sRGB with BT.709 trc, which seems wrong.
* Yet sRGB matches exactly between Blender display and QuickTime, while
  Rec.1886 and Rec.2020 do not.
* Display P3 with BT.709 trc matches sRGB with BT.709 trc, just adding the wide
  gamut colors. So that is what is used for now. Also using the sRGB trc the
  file is not recognized by QuickTime.

There is apparently a well known "QuickTime gamma shift" issue, where the
interpretation of the BT.709 trc is different than other platforms. And you need
to do workarounds like writing gamma 2.4 metadata outside of CICP to get
things to display properly on macOS.

Not that QuickTime is necessarily the reference we should target, but just to
explain that changing the previous behavior would have consequences, and so
it this commit leaves that unchanged.

Pull Request: https://projects.blender.org/blender/blender/pulls/145373
2025-09-03 16:32:33 +02:00
Bastien Montagne
469f54f484 BPY: Implement get_transform and set_transform for runtime-defined RNA properties.
Improve handling of runtime defined python RNA properties. Mainly:
* Add `get_transform` and `set_transform` new callbacks.
  These allow to edit the value, while still using the default
  (IDProperty-based) storage system.
* Read-only properties should now be defined using a new `options` flag,
  `READ_ONLY`.
* `get`/`set` should only be used when storing data outside of the
  default system now.
  * Having a `get` without a `set` defined forces property to be
    read-only (same behavior as before).
  * Having a `set` without a `get` is now an error.
* Just like with existing `get/set` callbacks, `get_/set_transform`
  callbacks must always generate values matching the constraints defined
  by their `bpy.props` property definition (same type, within required
  range, same dimensions/sizes for the `Vector` properties, etc.).
* To simplify handling of non-statically sized strings, the relevant
  RNA API has been modified, to use `std::string` instead of
  (allocated) char arrays.

Relevant unittests and benchmarking have been added or updated as part
of this project.

Note: From initial benchmarking, 'transform' versions of get/set are
several times faster than 'real' get/set.

Implements #141042.

Pull Request: https://projects.blender.org/blender/blender/pulls/141303
2025-09-02 11:30:09 +02:00
Campbell Barton
75d878a107 Correct error updating the tests in last commit
Correct error in 9ff2ccd350
2025-08-29 22:21:46 +10:00
Campbell Barton
9ff2ccd350 Fix: incorrect handling of 3x3 matrices with RNA get/set callbacks
Thanks to @mont29 for spotting the error.
2025-08-29 22:16:39 +10:00
Jesse Yurkovich
7111e95527 USD: Import UsdNurbsCurves as Curves instead of old Curve
Refactor and revamp import and export of `UsdGeomNurbsCurves` prim
objects.

Fixes #130056, among other things.

Summary of changes and enhancements:
- Export:
  - Write out `nurb_weight` attribute as the USD `pointWeights` primvar
  - Properly write out cyclic NURBS curves data (* see notes)
- Import:
  - Import using the new `Curves` datablock rather than the old `Curve`
  - Properly read in cyclic NURBS curves data (* see notes)
  - Tries harder to match incoming knot vector to standard `knots_mode`,
    will use Custom otherwise
  - Support import of all custom primvars and data attached to the prim
    (for use with Geometry Nodes etc.) (* see notes)

Tests were added which check a variety of point count, order, knot_mode,
and cyclic combinations (generated through Geometry Nodes). A small
number of hand-crafted curves were used to test the Custom knots_mode
support on import. Additionally, the tests cover the case when there are
multiple curves defined for a single object.

Notes:
- Cyclic NURBS support is reliant on the current, under-spec'd, USD
  documentation. Changes may be required in the future if/when the USD
  spec is clarified: https://github.com/PixarAnimationStudios/OpenUSD/issues/3740
- Some Cyclic x knots_mode combinations are not correct and would
  require more research to determine how to properly address.
- Custom attributes are not imported for Cyclic NURBS curves yet. Those
  will require additional work to function correctly and are also
  reliant on seeing how the USD spec changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/143970
2025-08-27 19:34:46 +02:00
Bastien Montagne
65e9b99e85 Tests: Minor update to systematic tests of numerical bpy.props-defined props. 2025-08-26 15:01:55 +02:00
Lukas Tönne
12f0bc7736 Fix #138388: Use grid voxel corners as value locations like OpenVDB
Blender grid rendering interprets voxel transforms in such a way that the voxel
values are located at the center of a voxel. This is inconsistent with OpenVDB
where the values are located at the lower corners for the purpose or sampling
and related algorithms.

While it is possible to offset grids when communicating with the OpenVDB
library, this is also error-prone and does not add any major advantage.
Every time a grid is passed to OpenVDB we currently have to take care to
transform by half a voxel to ensure correct sampling weights are used that match
the density displayed by the viewport rendering.

This patch changes volume grid generation, conversion, and rendering code so
that grid transforms match the corner-located values in OpenVDB.

- The volume primitive cube node aligns the grid transform with the location of
  the first value, which is now also the same as min/max bounds input of the
  node.
- Mesh<->Grid conversion does no longer require offsetting grid transform and
  mesh vertices respectively by 0.5 voxels.
- Texture space for viewport rendering is offset by half a voxel, so that it
  covers the same area as before and voxel centers remain at the same texture
  space locations.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/138449
2025-08-26 12:27:20 +02:00
Sybren A. Stüvel
3016cf650d Geometry Nodes: implement file path callback for import nodes
Add geometry file import nodes support to the for-each-path logic.
This will make `bpy.data.file_path_map()` report the input files for
OBJ, PLY, etc. import nodes (and any other node that has a string
property of subtype `PROP_FILEPATH`).

Currently this only supports static file paths, so where the file path
is set as the input socket's default value. When the path is
determined via any noodle, this is ignored and the default value is
reported anyway.

This is necessary for the new version of Blender Asset Tracer, which
in turn is needed to resolve studio/flamenco#104423.

Pull Request: https://projects.blender.org/blender/blender/pulls/144874
2025-08-26 11:03:27 +02:00
Bastien Montagne
8bb8bff4bf Tests: bpy props: Add systematic tests for non-array types.
Fairly basic tests still, would need to be extended to check invalid
cases handling too.

Pull Request: https://projects.blender.org/blender/blender/pulls/145136
2025-08-25 18:47:37 +02:00
Jesse Yurkovich
8078dcddf9 Tests: Adjust rounding in USD crease value test
Mistake in a8f543f6a8 where I believed the default Python `round`
function would use at least 2 decimal places by default. In reality it
uses 0 by default.

Round to 5 places to match other places in the test suite.

Pull Request: https://projects.blender.org/blender/blender/pulls/145088
2025-08-25 17:51:32 +02:00
Falk David
1122a05cb6 VSE: Scene Selector & Scene Time Synchronization
Implements the proposed design (with some modifications) in #135058.

## Sequencer Scene

This adds a new property called `sequencer_scene` to workspaces. This scene is used
by the video sequence editors in the current workspace for their context.
This is a first step towards "detaching" the VSE from the active scene in the window.

Each sequencer timeline editor shows the sequencer scene that is being used.
By default, when no sequencer scene is selected, the timeline and preview are empty.

Pressing the "new" button will add a new scene and assign it to the sequencer
scene for the current workspace.

## Contextual Playback

Pressing `Space` (by default) for starting the animation playback is now contextual:
depending on the context (where your mouse cursor is), the scene that is played back
might be different. E.g. with a 3D Viewport and a Sequencer open, pressing "play"
in the 3D Viewport will play the _active scene_ of the window, while pressing "play"
in the sequencer will play the _sequencer scene_.

## Time & Scene Synchronization

Additionally, this adds a toggle called "Sync Active Scene".
With the property turned on, the active scene & scene time in the window will be
synced with the time & scene of the current scene strip in the sequencer.

Note that this is _not_ bi-directional. The sequencer can change the active scene
and map time, but it's not possible the other way around since it one can have
multiple strips using the same scene (+camera, and even time!).

Currently this setting is exposed in the footer of the sequencer timeline as well
as in the workspace settings.

This allows for one of the core concepts that the story tools projects aims at: Working
in a scene (e.g. in the 3D viewport) while also working with the edit
(in the sequencer timeline).

## Some technical notes

* Undoing while playback is running will now cancel playback. This is to avoid the timer,
   that points to the scene and viewlayer that are playing, to get de-synced after loading
   the memfile undo step.
* When the sequencer scene is not the same as the active scene, we ensure it has
   a depsgraph.
* Normally, when a `NC_SCENE` notifier points to a specific scene, the notifier is dropped
   if that scene doesn't match the active one in the window. We now also check that it
   doesn't match the sequencer scene in the active workspace.
* When loading older files, we need to make sure that the active workspace in a window
   uses the active scene as the sequencer scene. This is to make sure that the file opens with
   the same sequences open.
* Tool settings are stored per scene. To make sure the sequencer uses the tool settings for
   the sequencer scene, the "context.tool_settings" and `CTX_data_tool_settings` members
   are overridden in the sequence editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/140271
2025-08-25 11:58:17 +02:00
Bastien Montagne
1028879ffa Test: Extend runtime-defined bpy props array unittests.
This add systematic tests for bool/int/float 'Vector' bpy props for:
* Index access
* Slice access
* 1d, 2d and 3d arrays
* default storage and custom storage (get/set)

NOTE: Non-vector prop types also need some systematic testing, they do
not appear to have any currently?

Pull Request: https://projects.blender.org/blender/blender/pulls/144998
2025-08-22 18:37:41 +02:00
Aaron Carlisle
2725dfe3d1 Tests: Fix RNA manual look up checks
- RNA Patterns Unknown to the Manual -- only print rna_ids that do not return a URL
- Undocumented Sections -- consider the case of types that do not have props (a lot of nodes were returning as false positives)
2025-08-19 22:31:24 -04:00
Hans Goudey
a5d5eca487 Cleanup: Sequencer: Replace seqbasep variable access with function
With the aim of removing `seqbasep` to remove the complicated logic for
repairing pointers within the `Strip` struct when loading files and undo
steps, this commit just moves access of the variable behind a function.
In the future the function will retrieve the list from a Strip pointer,
for now it just returns the existing pointer.

Overall motivation is that blend file pointer manipulation is incompatible
with the changes required for #127706.

Pull Request: https://projects.blender.org/blender/blender/pulls/144624
2025-08-18 15:39:58 +02:00
Jesse Yurkovich
d4b0f02f72 Fix: Incorrect attribute type check during USD shape import
Accidentally changed in 1f92fd7577 and only noticed because there was a
suspicious drop in code coverage for the affected file.

Fix and add tests to ensure it doesn't happen again.

Pull Request: https://projects.blender.org/blender/blender/pulls/144702
2025-08-18 06:16:57 +02:00
Campbell Barton
990f0863e8 PyDoc: include buffer access in examples, cleanup
Note that buffer access is possible, also minor mathutils test cleanup.
2025-08-16 17:39:35 +10:00
Oxicid
b856b6010e PyAPI: buffer protocol support for mathutils types
Adding buffer protocol support increases the speed of copying a Vector
(3D) array into a `numpy.array` by up to x3.8.

Ref !144401
2025-08-16 06:14:19 +00:00
Weizhen Huang
3dc73a3fda Tests: update GPU volume tests
New files are added since 5646d9a5ca

Pull Request: https://projects.blender.org/blender/blender/pulls/144622
2025-08-15 18:15:34 +02:00
Campbell Barton
25c69382fc Fix: frozen mathutils Vector & Matrix types could be resized
It's important that frozen types are immutable, add a generic
check that mathutils types can be resized and check the frozen flag.

Also correct the exception types when Vector's cant be resized,
using a ValueError instead of a TypeError as the type is correct.
2025-08-14 12:56:48 +10:00
Bastien Montagne
c90c4e9cd5 Tests: LibOverride: Simply some code, add 'empty lib' test case.
Code checking for expected amount of local/linked/missing
linked/liboverrides IDs is now cleaner and more efficient.

Also add a test where the whole content of the source library is
removed, to validate that liboverrides using these linked IDs as
reference remain available as 'placeholders'.
2025-08-13 15:16:02 +02:00
Weizhen Huang
5646d9a5ca Cycles: Add and update volume test files 2025-08-13 10:28:50 +02:00
Bastien Montagne
cbf763e700 LibOverride: Prevent matching collection items only by their index if a name and ID are provided.
If an item name (and ID) is provided, never successfully match only
based on the item index.

This can lead to matching to a complete different ID than the intended
one, which can be catastrophic for the integrity of the next resync.

Also, do not require sucessful match on both source and destination
data, this will always fail in case e.g. an item is removed from a
collection, and can prevent detecting required resync from that
collection then.

This commit also enables new 'harder' test in unittests, added in
previous commit, which is now expected to pass.

Pull Request: https://projects.blender.org/blender/blender/pulls/144429
2025-08-12 14:10:44 +02:00
Bastien Montagne
f3aeb71ea5 Test: LibOverride: Add more complex case for multi-level hierarchy handling.
Add some initial data to test proper handling of resync when there are
specific changes in the reference collection hierarchy (in particular,
when the last child of a given collection is moved somewhere else).

Also will check for correct handling of recursive liboverrides resync in
that case.

The current failing part is commented out for now, until fix is
committed.
2025-08-12 14:10:43 +02:00
Lukas Tönne
dab6b45336 Fix #143551: Cache invalidation causes crash when changing node tree item properties
Changing a node tree item property (such as the default value) was using a very
broad and generic "tag" function which invalidates the runtime items cache.
This also invalidates any python iterators due to the API using the runtime
cache. Changing node tree items in a loop will then crash.

It's not necessary to invalidate the runtime items cache when the actual item
pointers have not changed. Most RNA updates only change superficial properties,
or at most require a recursive node tree update due to change of identifiers or
types.

This PR introduces a simpler "tag" function to only tag for tree updates by not
rebuild the entire runtime items cache. It also renames existing functions and
docstrings to better explain what each of them does and should be used for.

The `NodeTreeInterfaceChangedFlag` is removed completely because it is only ever
used as a simple boolean indicator of "item changes" that require a cache
rebuild. It is replaced with an atomic bool like flags used for runtime caches.

Pull Request: https://projects.blender.org/blender/blender/pulls/143932
2025-08-12 11:00:10 +02:00
Omar Emara
8d1e26865d Compositor: Support strings sockets
This patch adds support for String sockets in the compositor. The
sockets are not yet used anywhere, but are added to aid development.

Pull Request: https://projects.blender.org/blender/blender/pulls/144327
2025-08-12 08:54:13 +02:00
Sean Kim
8ee5fa0737 Cleanup: Use alphabetical order for _ui_tests_ category
Pull Request: https://projects.blender.org/blender/blender/pulls/144394
2025-08-12 00:56:45 +02:00
Jesse Yurkovich
5a5f768938 Tests: USD: Replace USDZ export test with another for better validation
Move the existing USDZ export test from C++ to Python for better
validation. The resulting file is now run through the `usdchecker`
system and we also check the contents of the resulting archive for the
expected texture file. This helped uncover a pathing issue in the
resulting archive where the 'textures' directory was misnamed on win32;
though it was still functional.

Pull Request: https://projects.blender.org/blender/blender/pulls/144176
2025-08-12 00:21:04 +02:00
Brecht Van Lommel
af54152b45 Tests: Allow log errors from image loading tests
These include corrupt files, and with upcoming changes to use CLOG in more
places this would otherwise exit on such errors.

Pull Request: https://projects.blender.org/blender/blender/pulls/143447
2025-08-11 14:07:45 +02:00
Jacques Lucke
24c4e0a3f7 Geometry Nodes: move bundle and closure nodes out of experimental
This moves the bundles and closures features out of experimental,
making them an official part of Blender 5.0.

Also see #134029.

Pull Request: https://projects.blender.org/blender/blender/pulls/143750
2025-08-08 13:48:02 +02:00
Jacques Lucke
26d2c7af0d Nodes: remove field inference test
This test can't easily be updated because it relies on the old socket shape
design before #144119. Parts of it could be done from scratch again, but
most of this stuff is also tested by the new structure type inferencing test
in `bl_node_structure_type_inference.py`.

Pull Request: https://projects.blender.org/blender/blender/pulls/144185
2025-08-08 09:18:46 +02:00
Jacques Lucke
4a1020df6c Fix #143585: wrong structure type inferencing for lists
Mixing dynamic data with other data always results in dynamic now. While this
wasn't true without lists, it is true now and also makes sense generally. Also
mixing lists and single values or fields results in a list now.

Pull Request: https://projects.blender.org/blender/blender/pulls/144183
2025-08-08 09:07:20 +02:00
Campbell Barton
1c0b17fb3d Cleanup: use single quotes for enum literals 2025-08-08 06:32:03 +00:00
Jesse Yurkovich
2822b3badf Fix: USD: Use exr instead of hdr for world light texture
The spec for .usdz permits only a small handful of file formats to be
contained in the archive, and HDR is not among those supported[1]. This
also causes validation errors with the `usdchecker` tool (will be
properly tested in a follow up change).

Ignoring the potential for a user to export a .usdz file with materials
referencing unsupported file formats, Blender itself should use only
the supported formats for its business.

[1] https://openusd.org/release/spec_usdz.html#usdz-specification

Pull Request: https://projects.blender.org/blender/blender/pulls/144101
2025-08-07 20:54:22 +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
Campbell Barton
b07a1adf04 Core: remove use of the environment variable TMP on Unix
This isn't a standard and seems only to be included for historic reasons.

Ref !144100
2025-08-07 10:17:51 +10:00
Campbell Barton
9fcdf4822a Cleanup: correct comment, remove unused variable 2025-08-07 09:22:10 +10:00
Campbell Barton
87c4f47312 Fix #139585: Blender could erase OS root
Temporary directory handling had a logical error, assuming the
"session" temporary directory was owned and created by Blender
and could be recursively removed on exit.

However, it's possible creating the session sub-directory fails,
in that case the temporary directory was used for the "session".
This meant setting `C:\` as the temporary directory in the preferences
would attempt to recursively remove `C:\` on exit.

Resolve with the following changes:

- Only perform a recursive removal on the temporary directory
  if a session sub-directory was created.

- If the creating the user-preferences temporary "session" sub-directory
  fails fall back to the systems temporary directory and try to
  create the "session" directory there.

  Previously this was only done if the preference path didn't exist.
  The preferences path was still used if it existed but couldn't be
  written to.

Include a test to ensure this is working as expected.

Ref !144042
2025-08-06 23:13:58 +00:00
Jesse Yurkovich
da1846ebe1 Tests: Add options controlling verbosity of output for IO report
Add two sets of options to the IO Report class that allows tests to
control the verbosity of output.
- Add `Report.context_lines` controlling how many lines of context the
  diff uses when there are failures (3 by default)
- Add `Report.side_to_print_single_line` (5 by default) and
  `Report.side_to_print_multi_line` (3 by default) controlling how many
  items are written out

The first option helps when a failure in the test might not produce
enough lines of output to know which object is affected. The second set
of options allows individual tests to ensure more values are taken into
consideration for test validation.

They are exposed as class variables due to all the inner methods using
them being static.

Pull Request: https://projects.blender.org/blender/blender/pulls/143922
2025-08-04 19:18:16 +02:00
Nika Kutsniashvili
7158e02aed Modeling: Set shape key default value to 1.0
When adding a shape key, set its blend value to 1.0 / 100%.

There is no practical use case where user wants to add shape key but
not work on it. New shape keys at value 0 have no purpose. Adding
shape key should be interpreted by Blender as user wanting to
sculpt/model on it. Also, being at 1.0 initially doesn't change
anything visually, because key isn't edited yet and it doesn't deform
mesh.

The default value of the shape key is also set to 1.0. When using
right-click to reset values, user most often wants to return to 1
(which is "correct" state of deformation without multiplication)
rather than 0 (which is no deformation at all).

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133399
2025-08-01 15:43:31 +02:00
Sybren A. Stüvel
3d40246e94 Python: add HTTP file downloader
Add a new package `scripts/modules/_bpy_internal/http`, containing
classes to download files via HTTP.

The code is intentionally put into the `_bpy_internal` package, as I
don't intend it to be the end-all-be-all of downloaders for general
use in add-ons. It's been written to support the Remote Asset Library
project (#134495), where it will be used to download JSON files (to
get the list of assets on the server) as well as the asset files
themselves.

The module consists of several parts. The main ones are:

`class ConditionalDownloader`
: File downloader, which downloads a URL to a file on disk.

  It supports conditional requests via `ETag`/`If-None-Match` and
  `Last-Modified`/`If-Modified-Since` HTTP headers (RFC 7273, section 3.
  Precondition Header Fields). A `304 Not Modified` response is
  treated as a succesful download.

  Metadata of the request (the response length in bytes, and the above
  headers) are stored on disk, in a location that is determined by the
  user of the class. Probably in the future it would be nice to have a
  single sqlite database for this (there's a TODO in the code about
  this).

  The downloader uses the Requests library, and manages its own HTTP
  session object. This way it can handle TCP/IP connection reuse,
  automatically retry failing connections, and in the future
  HTTP-level authentication.

`class BackgroundDownloader`
: Wrapper for a `ConditionalDownloader` that manages a background
  process for the actual downloading.

  It runs the downloader in a background process, while ensuring that
  its reporters (see below) get called on the main process. This way
  it's possible to do background downloading, while still receiving
  progress reports in a modal operator, which in turn can directly
  call Blender's Python API. Care was taken to [not use Python
  threads][1]

`class DownloadReporter`
: Protocol class. Objects adhering to the protocol can be given to a
  `ConditionalDownloader` or `BackgroundDownloader`. The protocol has
  functions like `download_starts(…)`, `download_progress(…)`,
  `download_error(…)`, which will be called by the downloader to
  report on what it's doing.

  I chose to make this a protocol, rather than an abstract superclass,
  because then it's possible to make an Operator a DownloadReporter
  without requiring multi-classing.

[1]: https://docs.blender.org/api/main/info_gotchas_threading.html

Pull Request: https://projects.blender.org/blender/blender/pulls/138327
2025-08-01 12:27:56 +02:00
Habib Gahbiche
d04ae09aff Compositor: remove scene.node_tree from Python API
Since we are removing `scene.use_nodes` in #143578, most developers
will have to update their python script by replacing `scene.node_tree`
by `scene.compositing_node_group` in order to create a new compositing
 node tree anyways. So we remove `scene.node_tree`.

Note: `scene->nodetree` in `scene_blend_write()` is still being written
to the blend file, so forward compatibility is not affected by this PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/143619
2025-08-01 10:30:11 +02:00
Falk David
cd7b933cb6 Fix #143715: Grease Pencil: Replace uses of legacy BlendData type
There were some more uses of the legacy Grease Pencil type
in `BlendData`.

Pull Request: https://projects.blender.org/blender/blender/pulls/143716
2025-07-31 18:14:44 +02:00
Ray Molenkamp
4a9fced257 Tests: include cattrs and fastjsonschema in bundled modules test
These libs have landed for all platforms, so we can now test for them.

Pull Request: https://projects.blender.org/blender/blender/pulls/143710
2025-07-31 16:28:52 +02:00
Habib Gahbiche
c499adf3b8 Compositor: Remove scene.use_nodes from Python API
Use Nodes were removed in d88d4cc8 from the UI, but marked deprecated
in Python API. Since we decided to remove `world.use_nodes` and
`material.use_nodes` for the shader editor (instead of deprecating
them), we also remove `scene.use_nodes`.

This PR only replaces the deprecated `scene.node_tree` with
`scene.compositing_node_group` where necessary. #143619 will fully
remove `node_tree`

Pull Request: https://projects.blender.org/blender/blender/pulls/143578
2025-07-31 12:28:00 +02:00
Habib Gahbiche
5783c600dc Fix: wrong user count for compositing node tree
**How to reproduce:**
1. Assign a node tree to the scene compositing node group in Python
2. Notice how the node tree has the wrong user count

Example:
```python
C.scene.compositing_node_group = \
    D.node_groups.new("ntree", "CompositorNodeTree")
print(C.scene.compositing_node_group.users) # returns 0
```

Pull Request: https://projects.blender.org/blender/blender/pulls/143577
2025-07-30 13:18:47 +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