Revert changes from main commits that were merged into blender-v4.1-release

The last good commit was f57e4c5b98.

After this one more fix was committed, this one is preserved as well:
67bd678887.
This commit is contained in:
Brecht Van Lommel
2024-03-18 14:49:11 +01:00
parent 4842bf1101
commit 7a395e2e7f
3443 changed files with 70508 additions and 264669 deletions

View File

@@ -1009,9 +1009,8 @@ if(NOT OPENIMAGEIO_TOOL)
message(STATUS "Disabling sequencer render tests because OIIO oiiotool does not exist")
else()
set(render_tests
effects
filter
transform
filter
)
foreach(render_test ${render_tests})

View File

@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
"""
./blender.bin --background --factory-startup --python tests/python/bl_alembic_io_test.py -- --testdir /path/to/tests/data/alembic
./blender.bin --background -noaudio --factory-startup --python tests/python/bl_alembic_io_test.py -- --testdir /path/to/tests/data/alembic
"""
import math

View File

@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
"""
blender -b --factory-startup --python tests/python/bl_animation_armature.py
blender -b -noaudio --factory-startup --python tests/python/bl_animation_armature.py
"""
import unittest

View File

@@ -9,7 +9,7 @@ import sys
from rna_prop_ui import rna_idprop_quote_path
"""
blender -b --factory-startup --python tests/python/bl_animation_drivers.py -- --testdir /path/to/tests/data/animation
blender -b -noaudio --factory-startup --python tests/python/bl_animation_drivers.py -- --testdir /path/to/tests/data/animation
"""

View File

@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
"""
blender -b --factory-startup --python tests/python/bl_animation_fcurves.py -- --testdir /path/to/tests/data/animation
blender -b -noaudio --factory-startup --python tests/python/bl_animation_fcurves.py -- --testdir /path/to/tests/data/animation
"""
import pathlib

View File

@@ -9,7 +9,7 @@ import sys
from math import radians
"""
blender -b --factory-startup --python tests/python/bl_animation_keyframing.py -- --testdir /path/to/tests/data/animation
blender -b -noaudio --factory-startup --python tests/python/bl_animation_keyframing.py -- --testdir /path/to/tests/data/animation
"""

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_blendfile_io.py
# ./blender.bin --background -noaudio --python tests/python/bl_blendfile_io.py
import bpy
import os
import sys

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_blendfile_liblink.py
# ./blender.bin --background -noaudio --python tests/python/bl_blendfile_liblink.py
import bpy
import os
import sys

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_blendfile_library_overrides.py -- --output-dir=/tmp/
# ./blender.bin --background -noaudio --python tests/python/bl_blendfile_library_overrides.py -- --output-dir=/tmp/
import pathlib
import bpy
import sys
@@ -742,8 +742,9 @@ class TestLibraryOverridesComplex(TestHelper, unittest.TestCase):
# Objects and collections are duplicated as overrides, but meshes and armatures remain only linked data.
assert len(bpy.data.collections) == 3 * 3 + 3
assert all((id_.library is None and id_.override_library is not None) for id_ in bpy.data.collections[:3 * 3])
# Note that the 'missing' renamed objects from the library are now cleared as part of the resync process.
assert len(bpy.data.objects) == 3 * 6 + 6
# Note that the 'missing' renamed objects from the library are still here as empty placeholders,
# hence the 8 linked ones instead of 6.
assert len(bpy.data.objects) == 3 * 6 + 8
assert all((id_.library is None and id_.override_library is not None) for id_ in bpy.data.objects[:3 * 6])
assert len(bpy.data.meshes) == 0 + 1
assert len(bpy.data.armatures) == 0 + 1
@@ -773,8 +774,9 @@ class TestLibraryOverridesComplex(TestHelper, unittest.TestCase):
assert len(bpy.data.collections) == 3 + 6
assert all((id_.override_library is not None)
for id_ in bpy.data.collections if id_.library == test_output_path_lib)
# Note that the 'missing' renamed objects from the library are now cleared as part of the resync process.
assert len(bpy.data.objects) == 6 + 12
# Note that the 'missing' renamed objects from the library are still here as empty placeholders,
# hence the 8 + 6 linked ones instead of 6 + 6.
assert len(bpy.data.objects) == 6 + 14
assert all((id_.override_library is not None)
for id_ in bpy.data.objects if id_.library == test_output_path_lib)
assert len(bpy.data.meshes) == 0 + 1

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_blendfile_versioning.py ..
# ./blender.bin --background -noaudio --python tests/python/bl_blendfile_versioning.py ..
import bpy
import os
import sys

View File

@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
"""
./blender.bin --background --factory-startup --python tests/python/bl_constraints.py -- --testdir /path/to/tests/data/constraints
./blender.bin --background -noaudio --factory-startup --python tests/python/bl_constraints.py -- --testdir /path/to/tests/data/constraints
"""
import pathlib

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_id_management.py -- --verbose
# ./blender.bin --background -noaudio --python tests/python/bl_id_management.py -- --verbose
import bpy
import unittest
import random

View File

@@ -15,6 +15,7 @@ def get_arguments(filepath, output_filepath):
args = [
"--background",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
"--debug-memory",

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ./blender.bin --background --factory-startup --python tests/python/bl_keymap_validate.py
# ./blender.bin --background -noaudio --factory-startup --python tests/python/bl_keymap_validate.py
#
"""

View File

@@ -5,7 +5,7 @@
# simple script to enable all addons, and disable
"""
./blender.bin --background --factory-startup --python tests/python/bl_load_addons.py
./blender.bin --background -noaudio --factory-startup --python tests/python/bl_load_addons.py
"""
import bpy

View File

@@ -5,7 +5,7 @@
# simple script to enable all addons, and disable
"""
./blender.bin --background --factory-startup --python tests/python/bl_load_py_modules.py
./blender.bin --background -noaudio --factory-startup --python tests/python/bl_load_py_modules.py
"""
import bpy

View File

@@ -272,6 +272,13 @@ class NodeGroupInterfaceTests:
self.assertSequenceEqual([s.name for s in group_node.inputs], ["Input 0", "Input 1"])
self.assertSequenceEqual([s.name for s in group_node.outputs], ["Output 0", "Output 1"])
# Nested panel is not allowed and should return None.
panel1 = tree.interface.new_panel("Panel 1", parent=panel0)
self.assertIsNone(panel1)
self.assertSequenceEqual(tree.interface.items_tree, [out0, in0, panel0, out1, in1])
self.assertSequenceEqual([s.name for s in group_node.inputs], ["Input 0", "Input 1"])
self.assertSequenceEqual([s.name for s in group_node.outputs], ["Output 0", "Output 1"])
def do_test_remove(self, socket_type):
tree, group_node = self.make_group_and_instance()

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ./blender.bin --background --python tests/python/bl_pyapi_bpy_driver_secure_eval.py -- --verbose
# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_bpy_driver_secure_eval.py -- --verbose
import bpy
import unittest
import builtins

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_pyapi_bpy_path.py -- --verbose
# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_bpy_path.py -- --verbose
import unittest

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_pyapi_bpy_utils_units.py -- --verbose
# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_bpy_utils_units.py -- --verbose
import unittest
from bpy.utils import units

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_pyapi_idprop.py -- --verbose
# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_idprop.py -- --verbose
import bpy
import idprop
import unittest

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ./blender.bin --background --python tests/python/bl_pyapi_idprop_datablock.py -- --verbose
# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_idprop_datablock.py -- --verbose
import contextlib
import inspect

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_pyapi_mathutils.py -- --verbose
# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_mathutils.py -- --verbose
import unittest
from mathutils import Matrix, Vector, Quaternion, Euler
from mathutils import kdtree, geometry

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_pyapi_prop_array.py -- --verbose
# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_prop_array.py -- --verbose
import bpy
from bpy.props import (
BoolVectorProperty,

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --python tests/python/bl_pyapi_text.py -- --verbose
# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_text.py -- --verbose
import bpy
import unittest

View File

@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
"""
blender -b --factory-startup --python tests/python/bl_rigging_symmetrize.py -- --testdir /path/to/tests/data/animation
blender -b -noaudio --factory-startup --python tests/python/bl_rigging_symmetrize.py -- --testdir /path/to/tests/data/animation
"""
import pathlib

View File

@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ./blender.bin --background --factory-startup --python tests/python/bl_rna_defaults.py
# ./blender.bin --background -noaudio --factory-startup --python tests/python/bl_rna_defaults.py
import bpy

View File

@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Use for validating our manual interlinking.
# ./blender.bin --background --python tests/python/bl_rna_manual_reference.py
# ./blender.bin --background -noaudio --python tests/python/bl_rna_manual_reference.py
#
# 1) test_data() -- ensure the data we have is correct format
# 2) test_lookup_coverage() -- ensure that we have lookups for _every_ RNA path and all patterns are used.

View File

@@ -4,7 +4,7 @@
# run this script in the game engine.
# or on the command line with...
# ./blender.bin --background --python tests/python/bl_rst_completeness.py
# ./blender.bin --background -noaudio --python tests/python/bl_rst_completeness.py
'''
filepath = "/src/blender/tests/python/bl_rst_completeness.py"
exec(compile(open(filepath).read(), filepath, 'exec'))

View File

@@ -23,12 +23,12 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_OUT_DIR})
# all calls to blender use this
if(APPLE)
if(${CMAKE_GENERATOR} MATCHES "Xcode")
set(TEST_BLENDER_EXE_PARAMS --background --factory-startup --debug-memory --debug-exit-on-error)
set(TEST_BLENDER_EXE_PARAMS --background -noaudio --factory-startup --debug-memory --debug-exit-on-error)
else()
set(TEST_BLENDER_EXE_PARAMS --background --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts)
set(TEST_BLENDER_EXE_PARAMS --background -noaudio --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts)
endif()
else()
set(TEST_BLENDER_EXE_PARAMS --background --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts)
set(TEST_BLENDER_EXE_PARAMS --background -noaudio --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts)
endif()
# for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no

View File

@@ -19,6 +19,7 @@ except ImportError:
def get_arguments(filepath, output_filepath):
return [
"--background",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
"--debug-memory",

View File

@@ -17,12 +17,13 @@ except ImportError:
ENABLE_REALTIME_COMPOSITOR_SCRIPT = "import bpy; " \
"bpy.context.preferences.experimental.use_experimental_compositors = True; " \
"bpy.data.scenes[0].node_tree.execution_mode = 'GPU'"
"bpy.data.scenes[0].node_tree.execution_mode = 'REALTIME'"
def get_arguments(filepath, output_filepath):
return [
"--background",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
"--debug-memory",

View File

@@ -69,6 +69,7 @@ def get_arguments(filepath, output_filepath):
args = [
"--background",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
"--debug-memory",
@@ -145,7 +146,7 @@ def main():
# underwater_caustics.blend gives quite different results on Linux and Intel macOS compared to
# Windows and Arm macOS.
test_dir_name = Path(test_dir).name
if test_dir_name in {'motion_blur', 'integrator'}:
if test_dir_name in ('motion_blur', 'integrator', ):
report.set_fail_threshold(0.032)
ok = report.run(test_dir, blender, get_arguments, batch=args.batch)

View File

@@ -17,69 +17,52 @@ def setup():
for scene in bpy.data.scenes:
scene.render.engine = 'BLENDER_EEVEE_NEXT'
# Enable Eevee features
eevee = scene.eevee
# Enable Eevee features
scene = bpy.context.scene
eevee = scene.eevee
ray_tracing = eevee.ray_tracing_options
# Overscan of 50 will doesn't offset the final image, and adds more information for screen based ray tracing.
eevee.use_overscan = True
eevee.overscan_size = 50.0
eevee.gtao_distance = 1
eevee.use_volumetric_shadows = True
eevee.volumetric_tile_size = '2'
eevee.use_motion_blur = True
# Overscan of 50 will doesn't offset the final image, and adds more information for screen based ray tracing.
eevee.use_overscan = True
eevee.overscan_size = 50.0
eevee.use_raytracing = True
eevee.ray_tracing_method = 'SCREEN'
ray_tracing.resolution_scale = "1"
ray_tracing.screen_trace_quality = 1.0
ray_tracing.screen_trace_thickness = 1.0
# Due to an issue in HiZ-buffer set the probe resolution to 256. When the
# probe resolution is to high it will be corrupted as the HiZ buffer isn't
# large enough
eevee.gi_cubemap_resolution = '256'
# Ambient Occlusion Pass
eevee.gtao_distance = 1
# Does not work in edit mode
try:
# Simple probe setup
bpy.ops.object.lightprobe_add(type='SPHERE', location=(0.0, 0.0, 0.0))
cubemap = bpy.context.selected_objects[0]
cubemap.scale = (1.0, 1.0, 1.0)
cubemap.data.falloff = 0.0
cubemap.data.clip_start = 0.8
cubemap.data.influence_distance = 1.2
# Hair
scene.render.hair_type = 'STRIP'
bpy.ops.object.lightprobe_add(type='VOLUME', location=(0.0, 0.0, 0.0))
grid = bpy.context.selected_objects[0]
grid.scale = (1.735, 1.735, 1.735)
grid.data.bake_samples = 256
bpy.ops.object.lightprobe_cache_bake(subset='ACTIVE')
except:
pass
# Volumetric
eevee.volumetric_tile_size = '2'
eevee.volumetric_start = 1.0
eevee.volumetric_end = 50.0
eevee.volumetric_samples = 128
eevee.use_volumetric_shadows = True
# Motion Blur
if scene.render.use_motion_blur:
eevee.motion_blur_steps = 10
# Ray-tracing
eevee.use_raytracing = True
eevee.ray_tracing_method = 'SCREEN'
ray_tracing = eevee.ray_tracing_options
ray_tracing.resolution_scale = "1"
ray_tracing.screen_trace_quality = 1.0
ray_tracing.screen_trace_thickness = 1.0
# Light-probes
eevee.gi_cubemap_resolution = '256'
# Only include the plane in probes
for ob in scene.objects:
if ob.name != 'Plane' and ob.type != 'LIGHT':
ob.hide_probe_volume = True
ob.hide_probe_sphere = True
ob.hide_probe_plane = True
# Does not work in edit mode
if bpy.context.mode == 'OBJECT':
# Simple probe setup
bpy.ops.object.lightprobe_add(type='SPHERE', location=(0.0, 0.0, 1.0))
cubemap = bpy.context.selected_objects[0]
cubemap.scale = (5.0, 5.0, 2.0)
cubemap.data.falloff = 0.0
cubemap.data.clip_start = 0.8
cubemap.data.influence_distance = 1.2
bpy.ops.object.lightprobe_add(type='VOLUME', location=(0.0, 0.0, 2.0))
grid = bpy.context.selected_objects[0]
grid.scale = (8.0, 4.5, 4.5)
grid.data.grid_resolution_x = 32
grid.data.grid_resolution_y = 16
grid.data.grid_resolution_z = 8
grid.data.grid_bake_samples = 128
grid.data.grid_capture_world = True
# Make lighting smoother for most of the case.
grid.data.grid_dilation_threshold = 1.0
bpy.ops.object.lightprobe_cache_bake(subset='ACTIVE')
# Only include the plane in probes
for ob in scene.objects:
if ob.name != 'Plane' and ob.type != 'LIGHT':
ob.hide_probe_volume = True
ob.hide_probe_sphere = True
ob.hide_probe_plane = True
# When run from inside Blender, render and exit.
@@ -101,6 +84,7 @@ def get_gpu_device_type(blender):
# TODO: This always fails.
command = [
blender,
"-noaudio",
"--background",
"--factory-startup",
"--python",
@@ -120,6 +104,7 @@ def get_gpu_device_type(blender):
def get_arguments(filepath, output_filepath):
return [
"--background",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
"--debug-memory",

View File

@@ -103,6 +103,7 @@ if inside_blender:
def get_gpu_device_type(blender):
command = [
blender,
"-noaudio",
"--background",
"--factory-startup",
"--python",
@@ -122,6 +123,7 @@ def get_gpu_device_type(blender):
def get_arguments(filepath, output_filepath):
return [
"--background",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
"--debug-memory",

View File

@@ -240,7 +240,7 @@ class Report:
message += """<p><tt>BLENDER_TEST_UPDATE=1 ctest -R %s</tt></p>""" % self.engine_name
message += """<p>This then happens for new and failing tests; reference images of """ \
"""passing test cases will not be updated. Be sure to commit the new reference """ \
"""images to the tests/data git submodule afterwards.</p>"""
"""images to the SVN repository afterwards.</p>"""
message += """</div>"""
else:
message = ""

View File

@@ -60,6 +60,7 @@ class AbstractBlenderRunnerTest(unittest.TestCase):
command = [
self.blender,
'--background',
'-noaudio',
'--factory-startup',
'--enable-autoexec',
'--debug-memory',

View File

@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Used for generating API diffs between releases
# ./blender.bin --background --python tests/python/rna_info_dump.py
# ./blender.bin --background -noaudio --python tests/python/rna_info_dump.py
import bpy

View File

@@ -15,6 +15,7 @@ def get_arguments(filepath, output_filepath):
args = [
"--background",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
"--debug-memory",

View File

@@ -38,6 +38,7 @@ if inside_blender:
def get_arguments(filepath, output_filepath):
return [
"--background",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
"--debug-memory",

View File

@@ -17,7 +17,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_OUT_DIR})
# endif()
# for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no
set(TEST_BLENDER_EXE $<TARGET_FILE:blender> --background --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts)
set(TEST_BLENDER_EXE $<TARGET_FILE:blender> --background -noaudio --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts)
# ------------------------------------------------------------------------------

View File

@@ -37,6 +37,7 @@ if inside_blender:
def get_arguments(filepath, output_filepath):
return [
"--background",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
"--debug-memory",