- The context setup functions now reset the file to factory settings
before setting up the context - for a predictable context.
- Split operator suppression lists into groups based on the reason
for being disabled to avoid having to note this in code-comments.
- The suppression list is validated, warning if items aren't used.
- Disable operators which crash in background-mode which don't have
obvious fixes & aren't useful in background-mode.
This commit edits and adds new tests for missing camera tests bringing
the code coverage for camera projection to basically 100%.
The changes include:
- Adding a test for the central cylindrical camera type
- And editing the other camera tests to include a object with a
`Window` texture coordinate system in view.
- Modifications to these tests were done in the version of Blender
closest to when the original test was made. For most tests this was
Blender 3.1.
Ref: blender/blender-test-data!69
Use the mesh wrapper mechanism from GPU subdivision to get the base mesh.
This can significantly reduce memory usage and render setup time if the
level was not manually set to zero.
Pull Request: https://projects.blender.org/blender/blender/pulls/135895
This commit adds a test file containing a combined rotation,
translation, and scale transformation on a coloured cube,
with motion blur enabled, all with a low motion blur step count.
This test is being added to make sure various backends interpolate
this combined motion correctly.
Ref: blender/blender#135659
Ref: blender/blender-test-data!75
With the HIPRT backend for Cycles, rays can end up hitting the same
triangle multiple times due to a issue in the spatial splitting
algorithm.
Most of the time this issue isn't visible, but it is quite obvious in
semi-transparent shadows of meshes.
So this commit adds a file that contains a object made up of many
semi-transparent rectangular prisms casting a shadow onto the a plane.
Ref: blender/blender#117527
Ref: blender/blender-test-data!76
- Use command line arguments to configure options such as random seed,
running operators on existing blend files & how often the file is
reset to the initial state.
- Support for generating a script file to replay the actions,
useful for creating a repeatable script for bug reports.
- Add new context setup functions for edit-mode grease-pencil & hair.
Correct the event coordinates by scaling by the pixel_size on macOS.
All the UI tests now pass on macOS.
Ref !136008
Co-authored-by: Sean Kim <SeanCTKim@protonmail.com>
The inclusion of "Add -> Image -> Mesh Plane" causes the menu search
for "Add -> Mesh -> Plane" to attempt to add the image plane.
Workaround the problem by searching for an exact match,
although I think this should be possible to search for menu items
without having to include their shortcuts, especially since these
can be platform dependent.
This commit allows the `WITH_UI_TESTS` CMake option to be used on all
platforms, not only Linux. The existing functionality to use the Weston
compositor was moved into the `WITH_UI_TESTS_HEADLESS` option. When
these tests are run with only `WITH_UI_TESTS`, a visible instance of
Blender is opened up for testing.
Pull Request: https://projects.blender.org/blender/blender/pulls/135889
This commit adds a file that bakes ambient occlusion to the
color attribute of a mesh, then bakes the color attribute to a texture
and saves that as the test image.
This test is being done to make sure the `bake_offset_towards_center`
function is tested as it is necessary to fix some bugs with
color attribute baking (blender/blender#95969)
Ref: blender/blender-test-data!73
The Ashikmin Shirley microfacet option for the glossy BSDF has it's own
blurring function for the filter glossy feature.
This commit adjusts the glossy_ashikhmin test to make use of filter
glossy so that this code path can be tested.
Ref: blender/blender-test-data!72
In Cycles there are three closures (Diffuse Ramp, Phong Ramp,
and Burley diffuse) which are only avaliable through OSL. This commit
adds tests for these closures.
Ref: blender/blender-test-data!70
This commit adds a test for the shading offset feature in Cycles,
testing different material types (Diffuse, Glossy, and Transmissive)
and with different strengths.
Ref: blender/blender-test-data!71
* Share vertices between patches instead of using stitch map
* Switch to OpenSubdiv compatible counter-clockwise indexing
* Simplify patch edge reverse direction logic
* Add more comments to splitting and dicing
Pull Request: https://projects.blender.org/blender/blender/pulls/135681
Add a new RNA function `ActionSlot.users()` that returns the
data-blocks that are animated by this slot.
This covers direct assignment of the action & slot, but also use in
the NLA and in Action constraints.
```python
>>> D.actions['SuzanneAction'].slots['OBSuzanne'].users()
[bpy.data.objects['Suzanne']]
```
This was implemented as a function, and not a collection property,
because Blender's bookkeeping of the slot users can be marked 'dirty'.
In that case the slot user list needs to be rebuilt, which happens for
all Actions and all their slots simultaneously. This was considered
too broad a data-changing action to 'hide' inside a getter of a
property. Also it needs a `bmain` pointer, which is not available in
getters, but is available in functions.
Pull Request: https://projects.blender.org/blender/blender/pulls/135734
It appears that 8 bit `blend_color_softlight_byte` call used a wrong
blending routing (overlay), while `blend_color_softlight_float` is
correct. Seems that this was never caught. The correct fomula should be
`dst = 2ab + a^2 * (1 - 2b)`.
Pull Request: https://projects.blender.org/blender/blender/pulls/135382
The shadows of the curves in this test were incorrect. They have since
been fixed and this commit updates the reference images to show case
that.
Ref: blender/blender-test-data!74
After a recent refactor (1), there was a failure case that showed up in
the shadow_link_transparency file (2), but didn't cover enough pixels
to trigger a failure.
This commit adjusts the file so enough pixels are different to trigger
a failure.
(1) blender/blender@e813e46327
(2) blender/blender#135572
Ref: blender/blender-test-data!68
Unlike the legacy type, the radius isn't included in the bounds for the new
curves type. This hasn't been obvious because the drawing is quite broken
and doesn't use the radius properly.
This commit adds a separate cache for the bounds with the radius, which
is now used by default. The old cache is kept around for backward
compatibility in the bounding box geometry node, where a new
"Use Radius" option accesses the old behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/135584
This commit adds tests for perspective and panoramic
stereoscopic cameras.
These two camera types were chosen as they have a option for
`Spherical Stereo` which takes an alternative code path in Cycles
rendering.
So these test files conver both a general stereoscopic test and these
specific code path tests.
Ref: blender/blender-test-data!66
This commit adds a test for the rolling shutter feature found
in Cycles.
The test contain a few different objects to test different areas:
- A rotating camera, with a changing focal length
- A moving object
- A rotating object
- And a rotating object with motion blur disabled
Ref: blender/blender-test-data!67
Pull Request: https://projects.blender.org/blender/blender/pulls/135562
* Adds docstrings to `bl_object.py` and `bl_sculpt.py` tests so that
failure output is more helpful.
* Renames `bl_object.py` class and function to be more inline with other
test naming
Pull Request: https://projects.blender.org/blender/blender/pulls/135417
A recent bug fix to light tree building lead to a issue where some
lights with light linking would incorrectly share nodes in the
light tree.
To help detect failures like this in the future, this commit adds a
test based on the file found in the original report
blender/blender#135200.
Ref: blender/blender-test-data!63
`ColorManagedDisplaySettings`, `ColorManagedViewSettings`,
`ColorManagedInputColorspaceSettings` were affected since these are used
from multiple places (Scene, File output nodes, ..).
Similar to how we are getting the path for `ImageFormatSettings` (which
pretty much has the distinction logic already), we can do so for the
ColorManage Settings as well (piggbacking on the already correct path to
the `ImageFormatSettings`.
With this, we can also remove these "known failures" from the test
introduced in 4032b853c3.
Pull Request: https://projects.blender.org/blender/blender/pulls/135238
Float->byte rendered image dithering uses triangle noise algorithm. Keep
the algorithm the same, just make some improvements and fix some issues:
1) The hash function for noise was using "trig" hash from "On generating
random numbers" (Rey 1998), but that is not a great quality hash, plus it
can produce very different results between CPUs/GPUs. Replace it with
"iqint3" (recommended by "Hash Functions for GPU Rendering", JCGT 2020),
which is same performance on GPU, faster on CPU, and much better quality.
This is the same hash as Cycles already uses elsewhere. Also it is purely
integer based, so exactly the same results on all platforms.
2) For the above point, replace `dither_random_value` to take integer
pixel coordinates and adjust calling code accordingly. Some previous
callers were (accidentally?) passing integer coordinates already. Other
places actually get a tiny bit simpler, since they now no longer need an
extra multiplication.
3) The CPU dithering path was wrongly introducing bias, i.e. making the
image lighter. The CPU path also needs dither noise to be in [-1..+1]
range (not [-0.5..+1.5]!) just like GPU path does, since the later
float->byte conversion already does rounding.
4) The CPU dithering path was using thread-slice-local Y coordinate,
meaning the dithering pattern was repeating vertically. The more CPU cores
you use, the worse the repetition.
5) Change the way that uniform noise is converted to triangle noise.
Previous implementation was based on one shadertoy from 2015, change it
to another shadertoy from 2020. The new one fixes issues with the old way,
and it just works on the CPU too, so now both CPU and GPU code paths are
exactly the same.
6) Cleanup: remove DitherContext, just a single float is enough
Performance and image comparisons in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/135224