Commit Graph

1432 Commits

Author SHA1 Message Date
0aa75ab57b Refactor: rename "Animation data-block" to "Action"
Rename "Animation data-block" to "Action" or "Layered Action", where
appropriate. Some uses of the term actually refer to the `AnimData`
struct, in which case they were left as-is.

No real functional changes, just changing some messages & descriptions.

Pull Request: https://projects.blender.org/blender/blender/pulls/124170
2024-07-05 17:52:55 +02:00
c0364efec0 Refactor: rename 'Action Binding' to 'Action Slot'
Rename 'Binding' to 'Slot'. The old term was causing all kind of
confusion, and 'slot' was considered to be a better term for the
intended functionality.

This commit breaks existing blend files that were using the new layered
Action for their animation. The animation data will be lost due to the
rename, as there is no versioning code or DNA renaming logic. At this
time the new system is still marked as experimental, so shouldn't be
used for anything serious anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/124170
2024-07-05 17:52:55 +02:00
Aras Pranckevicius
8ba25aed02 Merge branch 'blender-v4.2-release'
# Conflicts:
#	tests/data
2024-07-05 12:13:17 +03:00
Aras Pranckevicius
b238df312d Fix #123918: STL exporter does not reverse faces for mirrored objects
Old python STL exporter, as well as other exporters like OBJ,
reverse the face order when object being exported has odd number
of negative scales in the matrix. The C++ STL exporter was lacking
that, resulting in the exported object looking "inside out".

The extra branch inside triangle export inner loop has no measurable
performance impact, probably because it is entirely predictable.

Pull Request: https://projects.blender.org/blender/blender/pulls/124219
2024-07-05 11:08:22 +02:00
Sergey Sharybin
bd75344b2b Merge branch 'blender-v4.2-release' 2024-07-03 14:47:23 +02:00
Sergey Sharybin
9460dfd4f3 Fix #124086: blake2 hasher is unavailable on macOS
The issue is caused by an external dependency to
/opt/homebrew/opt/libb2/lib/libb2.1.dylib

This change adds a test to catch the same issue in the future,
and moves the arm64 libraries to a newer hash with fixed Python.

Pull Request: https://projects.blender.org/blender/blender/pulls/124096
2024-07-03 14:46:33 +02:00
Jesse Yurkovich
ca9db38014 Hydra: Update Storm reference images for both Hydra and USD variations 2024-07-02 17:45:00 -07:00
Campbell Barton
11b32ed48b Merge branch 'blender-v4.2-release' 2024-07-02 15:07:17 +10:00
Campbell Barton
c29d8326e0 UI: sort add-ons by name
Previously add-ons were sorted by category & name, remove the category
only sorting by name since the category is no longer displayed and
isn't part of extension meta-data. Now the add-ons are sorted by name
(case insensitive).

Details:

- Store add-ons modules sorted to avoid having to sort on every redraw.
- addon_utils.modules() now returns an iterator.
2024-07-02 15:06:14 +10:00
Hans Goudey
bec350ba6e Tests: Simple automated sculpt brush stroke performance test
As an initial step to creating automated regression tests for sculpt brushes,
make our existing performance test script into an automated performance
test. The test uses the brush active in each file and runs the brush stroke
operator on a large generated grid. The time is just for the brush evaluation,
it doesn't include building the PBVH, drawing, etc.

I'm not sure about the consequences of conditionally disabling
`view3d_operator_needs_opengl`, but it was needed to make the test
work in background mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/123148
2024-07-01 16:12:02 +02:00
Jesse Yurkovich
5c7821fd79 imbuf: Add regression test for PSD
Make use of recently added PSD test files to ensure loading works
correctly when we update our library dependencies.

Pull Request: https://projects.blender.org/blender/blender/pulls/123861
2024-06-27 22:34:36 +02:00
Jesse Yurkovich
45c03764bf imbuf: Add PSD test files 2024-06-27 12:57:30 -07:00
Devashish Lal
3e28b6c7f1 Nodes: File path socket subtype for string sockets
This commit adds a new socket subtype for the string socket type
for file paths. Like other subtypes, this doesn't influence the data
stored in the socket or passed between nodes, it adds a file browser
popup operator to the socket button in the node.

From the file import nodes GSoC project:
https://devtalk.blender.org/t/gsoc-2024-geometry-nodes-file-import-nodes/34482

Pull Request: https://projects.blender.org/blender/blender/pulls/123250
2024-06-24 16:28:33 +02:00
Weizhen Huang
f4afd404e5 Merge branch 'blender-v4.2-release' 2024-06-24 12:57:08 +02:00
Weizhen Huang
6fbc958e89 Fix: Cycles Light Tree gives low weight to distant lights in large volume
The original paper only considers the minimal distance of the cluster to
the ray, not the interval length, resulting in low weight for distant
lights that have large influence over a long distance.
This commit modifies the measure by considering `theta_b - theta_a` for
local lights and the ray length `t` for distant lights.

Pull Request: https://projects.blender.org/blender/blender/pulls/123537
2024-06-24 12:48:08 +02:00
sandarm
d512139c7f Operator tests: Adding test for quads_convert_to_tris operator.
Operator tests: Adding test for quads_convert_to_tris operator.

This is related to https://projects.blender.org/blender/blender/issues/84999.

Co-authored-by: powergainer <95447782+powergainer@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/123286
2024-06-21 19:06:00 +02:00
Jesse Yurkovich
7ba935f7dd USD: Add animation export test
Add an export test to cover some simple animation scenarios that would
have protected against recent bugs:
- A simple object animation (would have prevented `122625`)
- An armature animation (would have prevented `724a674baed`)
- A shape key animation (would have indirectly found `6c5ce883e73`)

Pull Request: https://projects.blender.org/blender/blender/pulls/123458
2024-06-20 03:50:26 +02:00
Jesse Yurkovich
a6bc1d27f5 USD: Add animation export test file 2024-06-19 18:02:29 -07:00
Miguel Pozo
4153fa07f5 EEVEE: Update reference images for tests 2024-06-19 18:44:23 +02:00
Miguel Pozo
02f6ea906e EEVEE: Update reference images for tests 2024-06-19 18:43:40 +02:00
Lukas Stockner
97b06c429f Cycles: Fix multiscattering Oren-Nayar at glancing angles, update tests 2024-06-18 22:57:52 +02:00
Brecht Van Lommel
a26fd603b0 Merge branch 'blender-v4.2-release' 2024-06-18 21:19:24 +02:00
Clément Foucault
d41cd2095a EEVEE: Make render tests use volume indirect lighting 2024-06-18 17:53:22 +02:00
Brecht Van Lommel
eab14b0a0c Merge branch 'blender-v4.2-release' 2024-06-14 16:56:00 +02:00
Brecht Van Lommel
a87907b425 Fix #123201: Cycles OSL bump mapping broken
After the last OSL update, the Normal input to the auto generated Bump
node was getting a constant value instead of the normal.
2024-06-14 16:54:44 +02:00
Hans Goudey
68000660d2 Tests: Add option to allow index changes for certain mesh comparison tests
Currently the mesh boolean code is producing a different index order on the latest
version of XCode on macOS. This is proving very difficult to investigate, and it's
preventing developers from spending time on more important things.

As a compromise for now, allow configuring certain geometry nodes tests to make
meshes with a different index order still pass the test. This can be done by adding
a boolean custom property with the name `allow_index_change` to the test object
and setting it to "True". Allow the index change on different platforms is unfortunate,
spending time on working on a replacement exact boolean algorithm is a more
valuable use of time currently.

After this commit lands, someone who can reproduce the failing test on their
computer should update tests to include that custom property as necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/123204
2024-06-14 14:50:26 +02:00
Bastien Montagne
e30dbd2472 Merge branch 'blender-v4.2-release' 2024-06-13 20:50:51 +02:00
Bastien Montagne
b03a6bbd60 Cleanup: Remove left-over debug print in tests. 2024-06-13 20:50:13 +02:00
Bastien Montagne
ddd366c5b2 Merge branch 'blender-v4.2-release' 2024-06-13 20:48:17 +02:00
Bastien Montagne
5dfc197262 IDProp: BPY: Support assigning large int values to float properties.
Allow assigning integer values beyond int32 range to float/double
IDProperties. Extract the py object value into a temporary int64 value
in these cases.
2024-06-13 20:47:46 +02:00
Harley Acheson
fb20e818ef Merge branch 'blender-v4.2-release' 2024-06-13 10:59:05 -07:00
Bastien Montagne
b278e37f70 IDProps: Make 'dynamic RNA' IDProperties statically typed.
All IDProperties generated as part of 'storage backend' for dynamic RNA
properties are now statically typed.

Also adds some basic unittests for the new statically typed IDProperty
system, based on py-defined RNA data.

Ref. #122743.
2024-06-13 19:58:22 +02:00
Hans Goudey
fc7bcbe743 Tests: Update tests submodule hash for added sculpt test files 2024-06-11 09:23:33 -04:00
6070357c18 Merge remote-tracking branch 'origin/blender-v4.2-release' 2024-06-11 11:13:54 +02:00
83311ef96d Fix #122777: The keyframe_insert method throws python exceptions
Just for the `pyrna_struct_keyframe_insert()` function, reduce the
reporting level of keyframe insertion failures from `RPT_ERROR` to
`RPT_WARNING`. This prevents the conversion of these reports to a Python
exception.

`CombinedKeyingResult::generate_reports()` now accepts an option
argument `report_level`, so that the caller is in control over the type
of reports it generates.

Previously only errors were converted to exceptions; warnings were
implicitly cleared and never displayed. To avoid these 'keyframe
insertion failure' reports from becoming invisible, the
`pyrna_struct_keyframe_insert()` function now sends any warnings to
stdout (unless there were errors, in which case the old
error-to-exception behaviour is still there).

Pull Request: https://projects.blender.org/blender/blender/pulls/122827
2024-06-11 11:11:16 +02:00
Bastien Montagne
25d2e905b2 Merge branch 'blender-v4.2-release' 2024-06-10 15:56:18 +02:00
Bastien Montagne
65f68fe7fe BPY IDProp tests: Add basic tests for 'UI data' system.
This are not complete by far, mainly here to illustrate the issue
reported in #122843 (mismatch returned value for 'enum' idprops).
2024-06-10 15:54:29 +02:00
Bastien Montagne
11462dd5c3 Merge branch 'blender-v4.2-release' 2024-06-10 14:46:44 +02:00
Bastien Montagne
a799c84946 BPY IDProp tests: test matching results from subscription and path_resolve.
Add (partially disabled) systematic tests that for all IDProp types, the
returned value from direct idprop subscription and RNA-based
`path_resolve` return the same data.

NOTE: This does not work currently for 'composite' types (`IDP_ARRAY` and
`IDP_GROUP`).
2024-06-10 14:27:16 +02:00
Brecht Van Lommel
99afe8a551 Tests: Cycles tests for shadow linking with volumes and transparency
Ref #122404
2024-06-10 12:21:05 +02:00
Campbell Barton
96c179d77d Merge branch 'blender-v4.2-release' 2024-06-10 00:25:29 +10:00
Campbell Barton
b7e0d7d1c3 Fix script_load_addons including add-ons from the users home directory
The add-on load test could fail depending on add-ons in user extension
repositories.

Remove all repositories before running the tests.

Also minor naming & comment edits.
2024-06-09 22:50:10 +10:00
Brecht Van Lommel
5411ace289 Merge branch 'blender-v4.2-release' 2024-06-06 19:55:53 +02:00
Brecht Van Lommel
fe4c28f2dc Fix: Benchmarks auto build not working with new lib directories
Symlinking the lib folder doesn't work anymore with submodules.
2024-06-06 19:52:55 +02:00
Lukas Stockner
b9b7de143d Cycles: Update baking test after seed change 2024-06-06 02:15:32 +02:00
Michael B Johnson
f913fb6159 USD: Add MaterialX shader export
This change adds the ability to export MaterialX networks into the resulting
USD layer.

Details:

A new export option has been added to the USD export to enable MaterialX
export. It is off by default currently due to reasons in the caveats
section.

When enabled, it exports the MaterialX shading network alongside the
UsdPreviewSurface network, on the same USD Material. This allows the same
material to be used by renderers that don't support MaterialX, using the
USDPreviewSurface as a fallback. This is similar to setups in other DCC
packages, and matches the format we've used in our Reality Composer Pro
asset library.

It uses the existing MaterialX framework used to generate MaterialX
documents for rendering, to act as the basis for the USD graph. In this
process it also re-uses the existing texture export code as well if provided
and necessary.

Once the MaterialX document is created, use usdMtlx to generate a USD
shading network. Unfortunately, usdMtlx generates a graph that is unlike
what other DCCs that support MaterialX-embedded-in-USD generates. It
generates several extra prim hierarchies, and externalizes all shader
inputs, making them difficult to edit in other MaterialX graph editors.

To workaround this, generate the MaterialX shading network onto a
temporary stage, where we then run various pre-processing steps to prevent
prim collisions and to reflow the paths once they're converted.

The PrimSpecs are then copied over to their new path. The resulting prim
hierarchy matches what many artists we've worked with prefer to work with.

Caveats:

The Export MaterialX check is off by default. When using the Principled
BSDF, the resulting graph is very usable. However, when using some of the
other BSDFs, the shading networks generated by the existing MaterialX
framework in Blender generate some shading graphs that are difficult for
usdview and other DCC's to understand. The graph is still correct, but
because we're trying to prioritize compatibility, the default is off.

In future PRs we can aim to make the graphs for those other BSDFs play
better with other DCCs.

Other Implementation Details:

As part of this commit we've also done the following:

* Place some of the materialx graphs inside a passthrough nodegraph to
  avoid node conflicts.
* Better handle some shader output types , and better handle some
  conflict cases.
* Moved the ExportTextureFunction to materials.h due to some difficult
  to resolve header ordering issues. This has no effect on any runtime code.
* There is a test for the MaterialX export that does some basic checking to
  make sure we get an export out the other end that matches our expectations

Authored by Apple: Dhruv Govil

This PR is based on an earlier implementation by Brecht van Lommel , as well
as Brian Savery and his teams' work at AMD to implement the general
MaterialX framework within Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/122575
2024-06-05 20:43:44 +02:00
Lukas Stockner
5246fb5a57 Cycles: Implement blue-noise dithered sampling
This patch implements blue-noise dithered sampling as described by Nathan Vegdahl (https://psychopath.io/post/2022_07_24_owen_scrambling_based_dithered_blue_noise_sampling), which in turn is based on "Screen-Space Blue-Noise Diffusion of Monte Carlo Sampling Error via Hierarchical Ordering of Pixels"(https://repository.kaust.edu.sa/items/1269ae24-2596-400b-a839-e54486033a93).

The basic idea is simple: Instead of generating independent sequences for each pixel by scrambling them, we use a single sequence for the entire image, with each pixel getting one chunk of the samples. The ordering across pixels is determined by hierarchical scrambling of the pixel's position along a space-filling curve, which ends up being pretty much the same operation as already used for the underlying sequence.

This results in a more high-frequency noise distribution, which appears smoother despite not being less noisy overall.

The main limitation at the moment is that the improvement is only clear if the full sample amount is used per pixel, so interactive preview rendering and adaptive sampling will not receive the benefit. One exception to this is that when using the new "Automatic" setting, the first sample in interactive rendering will also be blue-noise-distributed.

The sampling mode option is now exposed in the UI, with the three options being Blue Noise (the new mode), Classic (the previous Tabulated Sobol method) and the new default, Automatic (blue noise, with the additional property of ensuring the first sample is also blue-noise-distributed in interactive rendering). When debug mode is enabled, additional options appear, such as Sobol-Burley.

Note that the scrambling distance option is not compatible with the blue-noise pattern.

Pull Request: https://projects.blender.org/blender/blender/pulls/118479
2024-06-05 02:29:47 +02:00
Omar Emara
4f21b26675 Fix #121639: Glare shifts the colors of highlights
The Glare node shifts the color of the highlights when the threshold is
high. That's because the thresholding algorithm simply subtracts the
threshold from the RGB data, which is not expected to retain the same hue
of the color.

To fix this, we do the thresholding only on the luminance of the color
in HSV color space. This eliminates the color shifting and also helps to
smooth the edges of the highlights.

This is a breaking change, but it is more of a fix rather than a change
of behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/122570
2024-06-04 20:59:32 +02:00
Jeroen Bakker
6a71a91b83 EEVEE-Next: Light Probe RNA
Split `bpy.types.LightProbe` into specialized subclasses.
- Rename all grid_* to remove the prefix in the RNA and limit access to
  volume probe.
- Parallax and other sphere probe only properties should be limited to
  sphere probe.
- `visibility` properties are deprecated (to be removed in a future
  Blender version)

Ref #113976

Pull Request: https://projects.blender.org/blender/blender/pulls/122353
2024-06-04 15:05:22 +02:00
Clément Foucault
cc0d12dd20 EEVEE: Remove EEVEE-Legacy
This handles the transition to EEVEE-Next (now EEVEE).

This removes some things that make no sense to keep
even for compatibility.
- Scene.eevee.light_cache_data
- Scene Light cache operators
- Scene Light cache RNA properties

The remaining legacy properties will be removed later
on to avoid python API breakage.

We keep the identifier of EEVEE-Next as `BLENDER_EEVEE_NEXT`
to avoid addons being incorrectly silently made compatible
with the EEVEE-Next where the Python API is different.
This renaming should be done in 5.0 release.

Thank you EEVEE-Legacy, you served us well.

Pull Request: https://projects.blender.org/blender/blender/pulls/122433
2024-06-04 14:17:58 +02:00