Commit Graph

2168 Commits

Author SHA1 Message Date
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
Mattias Fredriksson
a57c3558cd Curves: Unit tests for curves::nurbs::calculate_evaluated_num()
Unit tests veryfying expectation for curves::nurbs::calculate_evaluated_num().
Expectation is computed from closed form expressions rather then hard coded
values. Purpose for this is to make the tests easier to adjust if, for example,
parameter sampling pattern is changed. It should also make them easier to read
and understand.

Additional purpose is to create a baseline and verify changes for #144000.

Implementation is essentially examples from:
https://link.springer.com/book/10.1007/978-3-642-59223-2

Pull Request: https://projects.blender.org/blender/blender/pulls/143920
2025-08-06 13:59:10 +02:00
Habib Gahbiche
00f82920ef Tests: Compositor: update File Output Node tests
'exr multilayer passes' had an invalid input, so its output was updated

The rest of the tests had outdated output sockets after some 'Color'
sockets were converted into 'Vector' sockets

Pull Request: https://projects.blender.org/blender/blender/pulls/144004
2025-08-05 15:42:14 +02:00
Ian Yoo
f6523e619a Tests: Add group node test for missing output node
This adds a test case for #142944 where the compositor crashes when
there is a missing group output node inside a group node.

Pull Request: https://projects.blender.org/blender/blender/pulls/143150
2025-08-05 11:06:44 +02:00
Bastien Montagne
f453c189f8 make format 2025-08-05 11:02:21 +02:00
Bastien Montagne
d3f6523536 tests: Add basic performance test for bpy/RNA API.
These tests check performances of ID python wrapper creation (these are
cached), regular RNA struct wrapper creation, acess to IDProperties,
(un)registering of py-defined PropertyGroup, and access to py-defined
properties (without and without custom get/set).

The goal of these tests is mainly to follow performances impact of
on-going refactors and improvements in the BPY/RNA area.
2025-08-05 10:41:08 +02:00
Jacques Lucke
2c435ce8df Fix #141469: Geometry Nodes: use safer approach to modifying each instance geometry
Many nodes operate on all the instances that are passed into them. For example,
the Subdivision Surface node subdivides the mesh at the root but also instanced
meshes. This works well for most nodes, but there are a few nodes were the old
`modify_geometry_sets` function was not very well defined and it was tricky to
use correctly.

The fundamental problem was that the behavior is not obvious when a node creates
or modifies instances and how those are integrated with the already existing
instances.

This patch solves this with the following changes:
* Remove the old `GeometrySet::modify_geometry_sets` and related
  `*_during_modify` methods.
* Add a new `blender::geometry::foreach_real_geometry` function that is similar
  to the old `modify_geometry_sets` but has a more well-defined interface:
  * It never passes instances into the callback. So existing instances can't be
    modified with it.
  * The callback is allowed to create new instances. This will automatically be
    merged back with potentially already existing instances. The callback does
    not have to worry about accidentally invalidating existing instances like
    before.
* A few existing usages used `modify_geometry_sets` to actually modify existing
  instances (usually just removing attributes). Those can't use the new
  `foreach_real_geometry`, so they just get a custom simple recursive
  implementation instead of using a generic function.

Pull Request: https://projects.blender.org/blender/blender/pulls/143898
2025-08-05 06:25:20 +02: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
Dawid Kurek
9afa991316 Hydra: Handle dome light rotation
This refactors the code for world to dome light to be shared between USD and
Hydra, and makes rotations work for Hydra the same way they do in USD.

One small behavior change is that missing image files now render black,
matching Cycles and EEVEE more closely.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/143035
2025-08-04 15:58:37 +02:00
Amogh Shivaram
ff4d840cf8 Cycles: Add polarized Fresnel function for conductors
This PR adds a new `fresnel_conductor_polarized` function, which calculates reflectance and phase shift (if requested) for both parallel and perpendicular polarized light. This is needed for applying thin film iridescence to conductors (see !141131).

For consistency, this PR also makes `fresnel_conductor` call `fresnel_conductor_polarized` instead of using a fast approximation of the Fresnel equations that is inaccurate at lower n and k values. This will change the output of some Metallic BSDF renders using Physical Conductor and prevent discrepancies when enabling thin film iridescence.

I didn't do any rigorous performance testing, but from timing the functions outside of Blender, `fresnel_conductor_polarized` is significantly slower than the approximation, between 1.5-3x depending on the compiler. This makes sense because it has three square roots and the approximation has none. In some informal tests with metallic_multiggx_physical.blend modified to have more spheres, the new renders took around 1-2% longer on both CPU and GPU.

There are some avoidable inefficiencies in this approach of just calling `fresnel_conductor_polarized`:

- one of the three square roots could be saved since `fresnel_conductor` never needs the phase shift and there are simplifications possible when only calculating the reflectance
- there are several unnecessary multiplications by 1.0 since `fresnel_conductor` uses relative IOR and `fresnel_conductor_polarized` doesn't, though those could get optimized out if inlined

Pull Request: https://projects.blender.org/blender/blender/pulls/143903
2025-08-04 15:36:36 +02:00
Christoph Neuhauser
a5043308f2 Fix: Tests: Avoid RecursionError in EEVEE performance tests
The EEVEE performance tests call scene.frame_set at the end of the warmup stage, which recursively
calls frame_change_handler. Eventually, this leads to a RecursionError. This PR adds a guard for
checking if frame_set is currently active and returns early for this recursive call of the function.

Pull Request: https://projects.blender.org/blender/blender/pulls/143203
2025-08-04 08:54:10 +02:00
Ian Yoo
62b532040d Tests: Reduce glare streaks threshold
The current glare streaks threshold for highlights is too high so the
 input is just a black image, and no effects are output.
The threshold was reduced from 2.0 to 0.2 to produce a visible change.

Pull Request: https://projects.blender.org/blender/blender/pulls/142320
2025-08-01 20:36:11 +02:00
Ian Yoo
903fefff48 Tests: Add pixelate test
`node_pixelate` sets the output pixel size to 1, meaning no
transformation occurs and it is essentially the same as a single value
input. This will add a new test that pixelates the image, and renames
the original test to better reflect that edge case

Coverage:
- Function: 62.50% -> 100%
- Line: 37.36% -> 100%
- Region: 45.83% -> 100%
- Branch: 20.00% -> 90.00%

Pull Request: https://projects.blender.org/blender/blender/pulls/142438
2025-08-01 19:49:57 +02:00
Christoph Neuhauser
0cce8536dc Fix: Tests: Two-stage shader compilation in EEVEE performance tests
The EEVEE performance tests wait for shader compilation to finish before
beginning to record performance. However, shader compilation can also
happen after the first frame. This PR adds a check to the warmup phase
to see if shader compilation is still happening. This happens, e.g., for
the Mr. Elephant demo scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/143690
2025-08-01 18:35:27 +02:00
Habib Gahbiche
142d491064 Tests: Compositor: tests for Value Map node
Pull Request: https://projects.blender.org/blender/blender/pulls/143795
2025-08-01 16:42:21 +02:00
Brecht Van Lommel
24a7c42766 Cleanup: Remove unused and outdated render test files
Pull Request: https://projects.blender.org/blender/blender/pulls/143438
2025-08-01 16:02:48 +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
Ian Yoo
562020e0f0 Tests: Fix keying screen test
This PR adds more markers and re-tracks them correctly on the cube clip
The output should be a gradient color, which was tested with another
setup and should mask the clip if used in conjunction with the keying
node (this PR doesn't include that setup, just the keying screen fix).

Coverage remains the same.

Pull Request: https://projects.blender.org/blender/blender/pulls/142534
2025-08-01 15:27:34 +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
Mattias Fredriksson
e191d3d243 IO: OBJ improvements for NURBS curves
* Bezier (NURBS) import, supporting both Blender and external variants.
* Cleaner Bezier export, with better results importing in Rhino.
* Internal support for exporting the new Curves type.
* Tests covering a broad number of related cases.

The current NURBS exporter writes curve data directly, without accounting
for internal padding or how knots are generated from modes. This adjusts the
export behavior to omit data that does not influence the geometry of the
curve. The result is a simplified output that is easier to parse during import,
both for the importer and when importing to other platforms (Rhino).
Visual explanation to the adjustment can be found in #139174.

Importer is also adjusted to support variations in knot patterns. Extending
it to support the data generated by the exporter and by other platforms (Rhino).
This should resolve some issues in relation to #138732.

Integrated tests are added to broadly validate the common cases generated
by the exporter, including variations of different modes and NURBS order.

Regression tests are added to validate that the NURBS generated in Rhino
are imported as expected.

More details in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/139174
2025-08-01 06:37:28 +02:00
Harley Acheson
972c0b9463 UI: BLF Use Custom NotDef Not Last Resort
This PR removes the "Last Resort" font from the stack. Instead uses a
custom "not def" glyph, defined as an SVG file. This glyph is shown
when requesting a character not found for text inputs, text editor, and
for Sequencer text strips.

Pull Request: https://projects.blender.org/blender/blender/pulls/132032
2025-07-31 19:53:29 +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
Ian Yoo
113df76ad0 Tests: Add mask node tests
This PR adds three tests relating to the mask node, which makes a new
mask data block for `node_mask`, creates an invalid input test,
and covers the `fixed/scene` case.

Coverage:
- Function: 88.89% -> 88.89%
- Line: 91.41% -> 94.53%
- Region: 83.33% -> 88.10%
- Branch: 62.50% -> 81.25%

Pull Request: https://projects.blender.org/blender/blender/pulls/142447
2025-07-30 21:28:36 +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
Patrick Mours
6487395fa5 Cycles: Add linear curve shape
Add new "Linear 3D Curves" option in the Curves panel in the render
properties. This renders curves as linear segments rather than smooth
curves, for faster render time at the cost of accuracy.

On NVIDIA Blackwell GPUs, this can give a 6x speedup compared to smooth
curves, due to hardware acceleration. On NVIDIA Ada there is still
a 3x speedup, and CPU and other GPU backends will also render this
faster.

A difference with smooth curves is that these have end caps, as this
was simpler to implement and they are usually helpful anyway.

In the future this functionality will also be used to properly support
the CURVE_TYPE_POLY on the new curves object.

Pull Request: https://projects.blender.org/blender/blender/pulls/139735
2025-07-29 17:05:01 +02:00
Sergey Sharybin
38f867814f Fix #143191: 10/12 bit videos import much too dark
Originally reported for ProRes codec, but it affects multiple
other codecs: any format which is read as >= 10bit had the issue.

A regression since 93be12fde0.

The cause of the issue is that movie clip and image data-blocks
did linearization on their side, which was quite hidden to find.
Now the color management is done on the movie reader level.

Additionally, added regression test to catch such issues early
on in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/143435
2025-07-28 15:14:23 +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
Sergey Sharybin
dcae48d1d3 Cycles: Add Portal Depth light pass information
It allows to implement tricks based on a knowledge whether the path
ever cam through a portal or not, and even something more advanced
based on the number of portals.

The main current objective is for strokes shading: stroke shader
uses Ray Portal BSDF to place ray to the center of the stroke and
point it in the direction of the surface it is generated for. This
gives stroke a single color which matches shading of the original
object. For this usecase to work the ray bounced from the original
surface should ignore the strokes, which is now possible by using
Portal Depth input and mixing with the Transparent BSDF. It also
helps to make shading look better when there are multiple stroke
layers.

A solution of using portal depth is chosen over a single flag due
to various factors:
- Last time we've looked into it it was a bit tricky to implement
	as a flag due to us running out of bits.
- It feels to be more flexible solution, even though it is a bit
	hard to come up with 100% compelling setup for it.
- It needs to be slightly different from the current "Is Foo"
	flags, and be more "Is Portal Descendant" or something.

An extra uint16 is added to the state to count the portal depth,
but it is only allocated for scenes that use Ray Portal BSDF.

Portal BSDF still increments Transparent bounce, as it is required
to have some "limiting" factor so that ray does not get infinitely
move to different place of the scene.

Ref #125213

Pull Request: https://projects.blender.org/blender/blender/pulls/143107
2025-07-25 18:09:38 +02:00
Mohamed Hassan
c1f52b8e91 Compositor: Improve Fog Glow glare realism
This patch improves the realism of the Fog Glow mode of the Glare node
based on the Photopic model described in:

  Physically-Based Glare Effects for Digital Images" by G. Spencer, P.
  Shirley, K. Zimmerman, and D. P. Greenberg.

This is a breaking change that can't be versioned, but it is worth it
for the superior realism of the new model.

Pull Request: https://projects.blender.org/blender/blender/pulls/140646
2025-07-25 10:09:32 +02:00
Aras Pranckevicius
bedf19f1ca Cleanup: No longer require VSE Strip struct memory layout to never change
Previously code that was reading Strip data assumed that seqbasep
and channels members would stay at fixed offsets within a struct,
forever into the future. Fix this by inferring their offsets from
the file SDNA data where needed.

Actual Strip DNA layout is not changed in this commit yet.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/142940
2025-07-24 20:37:16 +02:00
Hans Goudey
4f372d64d4 Geometry Nodes: Initial very basic list support
This includes a new list structure type and socket shape, a node
to create lists, a node to retrieve values from lists, and a node to
retrieve the length of lists. It also implements multi-function support
so that function nodes work on lists.

There are three nodes included in this PR.
- **List** Creates a list of elements with a given size. The values
  are computed with a field that can use the index as an input.
- **Get List Item** A field node that retrieves an element from a
  a list at a given index. The index input is dynamic, so if the input
  is a list, the output will be a list too.
- **List Length** Just gives the length of a list.

When a function node is used with multiple list inputs, the shorter
lists are repeated to extend it to the length of the longest.

The list nodes and structure type are hidden behind an experimental
feature until we can be sure they're useful for an actual use case.

Pull Request: https://projects.blender.org/blender/blender/pulls/140679
2025-07-24 16:16:40 +02:00
Habib Gahbiche
25d4ac38b1 Tests: Compositor: add UI test case for undo
Support the compositor in UI tests and add an undo test case involving
a compositing node tree.

Pull Request: https://projects.blender.org/blender/blender/pulls/140595
2025-07-24 11:41:46 +02:00
Jacques Lucke
a57709ca25 Fix #142828: broken socket usage inference for some nodes
The issue was an oversight in f7f18cd0c7.

This patch also adds some unit tests that would have caught this error.

Pull Request: https://projects.blender.org/blender/blender/pulls/143026
2025-07-24 08:13:34 +02:00
Jesse Yurkovich
f154b03cea Tests: add new Curves datablock to IO report
Add the new Curves datablock type to the IO report. This was created
for the new hair system but is more generally used for any type of curve
generated within geometry nodes.

The report itself is mostly just a dump of all available attributes for
the object.

Pull Request: https://projects.blender.org/blender/blender/pulls/142925
2025-07-23 09:08:01 +02:00
Brecht Van Lommel
678ccd4a61 Cycles: Change default material to match Blender and EEVEE
Use Principled BSDF instead of Diffuse BSDF. This is a breaking change but
likely does not affect many scenes significantly. It adds some specularity
when an object does not have a a material assigned.

Fix #142538

Pull Request: https://projects.blender.org/blender/blender/pulls/142703
2025-07-22 15:54:30 +02:00
Bastien Montagne
5ad5527cc3 Cleanup: Unittests: use TestCase own assert system. 2025-07-22 15:52:26 +02:00
Bastien Montagne
65c5f09a59 make format 2025-07-22 14:24:12 +02:00
Bastien Montagne
3ab40912f7 Cleanup: tests: Factorize some common processing in linking tests utils. 2025-07-22 13:49:04 +02:00
Campbell Barton
81e4558ab6 Cleanup: reduce right-shift in Python scripts 2025-07-22 11:59:43 +10:00
Aras Pranckevicius
d89c9c5155 Video: HDR video input/output support
HDR video files are properly read into Blender, and can be rendered out
of Blender.

HDR video reading / decoding:

- Two flavors of HDR are recognized, based on color related video
  metadata: "PQ" (Rec.2100 Perceptual Quantizer, aka SMPTE 2084) and
  "HLG" (Rec.2100 Hybrid-Log-Gamma, aka ARIB STD B67). Both are read
  effectively into floating point images, and their color space
  transformations are done through OpenColorIO.
- The OCIO config shipped in Blender has been extended to contain
  Rec.2100-PQ and Rec.2100-HLG color spaces.
- Note that if you already had a HDR video in sequencer or movie clip,
  it would have looked "incorrect" previously, and it will continue to
  look incorrect, since it already has "wrong" color space assigned to
  it. Either re-add it (which should assign the correct color space),
  or manually change the color space to PQ or HLG one as needed.

HDR video writing / encoding"

- For H.265 and AV1 the video encoding options now display the HDR mode.
  Similar to reading, there are PQ and HLG HDR mode options.
- Reference white is assumed to be 100 nits.
- YUV uses "full" ("PC/jpeg") color range.
- No mastering display metadata is written into the video file, since
  generally that information is not known inside Blender.

More details and screenshots in the PR.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/120033
2025-07-21 19:26:07 +02:00
Aras Pranckevicius
e57b73bdf7 Fix #142333: new FBX importer produces broken rotation fcurves in some cases
Need to ensure that interpolation between neighboring quaternions
takes the shortest path. The Python FBX importer was doing this;
due to oversight was missed in the new importer.

Pull Request: https://projects.blender.org/blender/blender/pulls/142659
2025-07-21 10:50:48 +02:00
Jesse Yurkovich
c2cf3783c4 USD: Rename attr_import_mode option to property_import_mode
This rename creates separation between USD primvars/Blender geometry
attributes - which are not controlled with this setting - and the
concept of USD attributes+userProperties/Blender custom object
properties - that this option deals with.

Ref #134012

Pull Request: https://projects.blender.org/blender/blender/pulls/142301
2025-07-18 20:58:48 +02:00
Jesse Yurkovich
fe54725113 USD: Rename import_subdiv option to import_subdivision
This aligns with the option used for USD export (export_subdivision) and
the option used for FBX import (import_subdivision).

Ref #134012

Pull Request: https://projects.blender.org/blender/blender/pulls/142278
2025-07-18 20:56:01 +02:00