Blend files saved in 4.5 with compositing node trees containing group
output nodes may result in the wrong group output node being active when
opened in 5.0.
See PR for example blend file file and how to reproduce.
The issue is that the versioning code assumes there are no existing
Group Output node. To fix this, we set the newly created Group Output
node that replaces the Composite node to be the active output. Also add
a regression test that covers this case.
Pull Request: https://projects.blender.org/blender/blender/pulls/149930
These Ids are required for correct in-camera motion blur so read and
write them as appropriate for both point clouds and point instancers.
The incoming USD Ids are 64-bit but Blender only supports 32-bit Ids so
the values will be narrowed. This will potentially produce different or
duplicate Ids depending on how far the value is outside the
[-2147483648, 2147483647] range.
Pull Request: https://projects.blender.org/blender/blender/pulls/149666
This change updates the USD mesh export to write indexed UVs rather
than the previous unindexed (per face vertex) UVs to preserve UV
connectivity information.
Details:
Previously the USD export of mesh UVs was not preserving any
information about the UV connectivity. This meant that importing
the USD into another DCC that relies on indexed UVs for connectivity
would treat each face as a separate UV island.
With this change, the `BKE_mesh_uv_vert_map_create` function is
used to determine the UV connectivity during the USD export and
to write indexed UVs.
Authored by Apple: Dan Knowlton
Co-authored-by: Dan Knowlton <d_knowlton@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/149677
Make use of the newly exposed mesh validation API to replace the custom
duplicate vertex index check.
Also, strengthen the test for this by using a mesh which should only
lose 2 of its 4 faces due to validation. The prior test only had 2 faces
and both would be destroyed. This guards against future problems like
issue #149429.
Pull Request: https://projects.blender.org/blender/blender/pulls/149882
This adds code for the following 3 glTF I/O tests:
- 1 import
- 1 export
- 1 roundtrip
For Export & Roundtrip, this uses the new system from I/O Report defined in #149385
- Use of general IO Report system with following info
- add a callback function that define how to generate the description of exported file
- The exported file is generated in a tmp directory, so deleted at end of test
This PR also adds a simple example for each of these 3 tests
Pull Request: https://projects.blender.org/blender/blender/pulls/149387
Regression in [0] which removed `__new__`, which broke
sub-class instancing.
Resolve by adding back `__new__` which wraps `tp_vectorcall`.
The speed-up from [0] remains as direct calls to mathutils types
still use `tp_vectorcall`.
Include tests to ensure sub-typing mathutils types works as expected.
Ref !149685
[0]: b2176bfdd7
Regression in [0] failed to account for keywords being changed from
a dict to a tuple.
Include a test to ensure keyword arguments are ignored.
Ref !149685
[0]: b2176bfdd7
Clamp output values of Gradient Texture between 0 and 1.
- Compositor: CPU is now clamped. CPU and GPU are now unified.
No versioning done so old files would render differently
- Geometry nodes: Output of Gradient Texture is now clamped between 0
and 1. In versioning the texture node is removed and replaced by math
nodes (placed on top of each other).
- Shader: No changes
Test files for geometry nodes were created in 4.5 to verify that the
behavior didn't change. Compositor test result was created using this
PR to verify CPU and GPU have the same result.
Pull Request: https://projects.blender.org/blender/blender/pulls/149276
The PR adds a new feature on I/O report tests: it can now perform
roundtrip or export tests.
- The `import_and_check` method calls `generate_and_check` so current
callers are unchanged
- As the current system only manages importer & use a common description
of .blend data, I keep this system, but renamed
`generate_main_data_desc` to `generate_generic_data_desc`
- The io_report can now accept an optional callback function to generate
the generated data description. This function is used, if defined,
instead of `generate_generic_data_desc`
- We also passing an optional parameter to get the expected filename of
generated data (was not existing in current system for importer tests,
as we directly generate data from .blend file)
- avoid double `ref_desc == got_desc` check by returning the result from
`_add_test_result`
Pull Request: https://projects.blender.org/blender/blender/pulls/149385
Add tests for loose vertices/edges, custom normals propagation,
and vertex group propagation. Also rename the folder "subdivision"
instead of "subdivision_tests"
Pull Request: https://projects.blender.org/blender/blender/pulls/149421
This commit adds support for validating and correcting Multires tangent
data stored in CD_MDISPS when called via `BKE_mesh_validate` when
importing or on demand when users call `mesh.validate()` via the Python
API.
Any non-finite values are set to 0. While this will result in likely odd
looking data on a multires mesh, it will prevent further propagation of
bad float data and will allow users to restore their mesh to a workable
state in the case of data corruption.
Ref: #149205
Pull Request: https://projects.blender.org/blender/blender/pulls/149320
If you use BLENDER_VERBOSE=1, ctest prints out the blender command line
that was invoked, but it would fail if you just copy/pasted it into a
command prompt, because the "python-expr" argument contained spaces.
This fix surrounds the "python-expr" argument with quote marks, so you
can copy/paste it without modification.
Tested on Windows Command Prompt, Powershell and nushell.
Pull Request: https://projects.blender.org/blender/blender/pulls/147537
Add a command line option to load Blender without a window frame.
Currently this is only used on Wayland, enabled for WITH_UI_TESTS since
attempting to load LIBDECOR caused the tests to crash on start on Fedora.
For tests there is no need to use LIBDECOR, so disable the window frame.
This can also be used by users who don't want to use the X11 fallback if
LIBDECOR can't be found.
Back-ported from main so users can workaround: #144919
which won't be fixed for 5.0 release.
- 3349b97987
- eedf15e3b7
Ref !147716
This commit adds the ability to block certain UI tests from running,
while also honoring the `BLENDER_TEST_IGNORE_BLOCKLIST` env variable.
Currently the only entries are for Windows with Intel GPUs.
Pull Request: https://projects.blender.org/blender/blender/pulls/148609
This commit changes the constant, fixed time delay when running UI
tests that use multiple windows to one that waits until either a second
has elapsed or the created windows have different view layers by
idling in increments of 1/60th of a second.
This is strictly a fix to get the test to work again on both buildbots
and developer workstations, further root-causing and fixes will happen
separately.
Fixes#148877
Pull Request: https://projects.blender.org/blender/blender/pulls/148623
Clamp octaves to be at least 1 to avoid having no noise at all, and clamp
the maximum to avoid precision issues and NaNs on some GPUs.
Blocklist white noise 256 samples tests entirely for Storm, as we don't
support multiple samples and can't test converting to grey. Increase the
grid size in the 1 sample white noise test to make it more clear.
Pull Request: https://projects.blender.org/blender/blender/pulls/148525
Part 1/2 for #148569
The map used to de-duplicate incoming materials was filled with the
wrong material names which eventually resulted in a situation where we
were adding 2 different materials with the same name to the map which is
unexpected.
This also contains a fix for Material ID user counts that was
incorrectly changed as part of the unrelated refactor 1b4daf9d2e.
Added further test coverage to validate both situations now.
Pull Request: https://projects.blender.org/blender/blender/pulls/148757
The report in question uncovered two sources of issues. The primary one
being that there was an accidental double-transform from placing the
basis curves prim under the main Xform of the mesh too. This is solved
by considering the inverse of mesh's world transform when writing out
the curve points.
The second was exposed with the new, more correct, viewport drawing of
curves that showed that we were exporting the wrong curve type. This
would manifest as a disappearing curve segment at the beginning and end
of the curve. Fixed by explicitly writing out catmull-rom, pinned,
curves for the hair rather than using bsplines.
As a result the Storm-USD tests now match much closer to the native
Storm-Hydra variants.
Pull Request: https://projects.blender.org/blender/blender/pulls/148543
This PR slightly raises the accepted noise level for the Storm tests
"autosmooth custom normals" (mesh) and "sss hair" (sss). They failed
due to what likely is acceptable differences in rasterization.
Pull Request: https://projects.blender.org/blender/blender/pulls/148506
Rewrite the "mesh is valid" and "validate mesh" functions to be more
agnostic of the custom data storage system, align with the changes to
topology storage in the last 5 years, be much clearer overall, more
reusable.
Each check is implemented as a separate pass over the remaining
valid geometry in the mesh, producing an IndexMask of the invalid
elements it finds. At the cost of some extra iteration over mesh elements,
this should make each requirement clearer and make it easier to
optimize and reuse each check if needed.
The code is roughly twice as fast as it was before. I measured 92ms
instead of 200ms for a 1 million vertex cube on a Ryzen 7950X.
There's a bit of low hanging fruit for further optimization too.
There are now automated tests just for the validation code as well.
For now they are very basic but they could be extended in the future.
Some non-obvious points:
- The new face offsets storage (replacing `MPoly`) upholds more
invariants by itself. Previously faces could easily overlap or leave
corners unreferenced. That doesn't really happen anymore, but
bad offset values are a more "global" problem.
- The validation code for the old "MFace" storage was removed. It is
just rebuilt when it's needed at runtime anyway, so there isn't much
point in validating it.
- The versioning code for 2.90.1 was calling the mesh validation code
to fix an issue where the extrude manifold tool could generate bad faces.
Unfortunately keeping that would mean being unable to remove the old
code, so now there's a warning to open and save the file in a previous
version instead.
- One of the main goals of the new code is better const correctness, and
working better with implicit sharing. The code now only requests mutable
copies of the mesh data if it has to change.
Part of #122398
Pull Request: https://projects.blender.org/blender/blender/pulls/148063
The implementation of this was broken and not actually used for the EEVEE
tests, as there is currently no separate reference directory for AMD.
Move it to the render report module so it can be reused by different tests.
Pull Request: https://projects.blender.org/blender/blender/pulls/148148
This PR slightly raises the accepted noise level for the following EEVEE
tests that were likely incorrectly marked as failed on Intel GPUs:
- render_layer: aov_transparency
- light: triangle_light_sampling
- bsdf: metallic_thinfilm_physical, metallic_thinfilm_f82
- principled_bsdf: principled_bsdf_transmission