Move tests/data and assets to the main repository

This change moves the tests data files and publish folder of assets
repository to the main blender.git repository as LFS files.

The goal of this change is to eliminate toil of modifying tests,
cherry-picking changes to LFS branches, adding tests as part of a
PR which brings new features or fixes.

More detailed explanation and conversation can be found in the
design task.

Ref #137215

Pull Request: https://projects.blender.org/blender/blender/pulls/137219
This commit is contained in:
Sergey Sharybin 2025-05-05 15:10:22 +02:00 committed by Sergey Sharybin
parent 1f51172692
commit bbfc97ad6f
6072 changed files with 295574 additions and 91 deletions

101
.gitattributes vendored Normal file
View File

@ -0,0 +1,101 @@
*.a filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.egg filter=lfs diff=lfs merge=lfs -text
*.8svx filter=lfs diff=lfs merge=lfs -text
*.pyc filter=lfs diff=lfs merge=lfs -text
*.pyd filter=lfs diff=lfs merge=lfs -text
*.o filter=lfs diff=lfs merge=lfs -text
*.dylib filter=lfs diff=lfs merge=lfs -text
*.dylib* filter=lfs diff=lfs merge=lfs -text
*.lib filter=lfs diff=lfs merge=lfs -text
*.exe filter=lfs diff=lfs merge=lfs -text
*.dll filter=lfs diff=lfs merge=lfs -text
*.so filter=lfs diff=lfs merge=lfs -text
*.so* filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.blend? filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text
*.tx filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.bzip2 filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
/*/bin/* filter=lfs diff=lfs merge=lfs -text
*.ptx filter=lfs diff=lfs merge=lfs -text
*.cubin filter=lfs diff=lfs merge=lfs -text
*.fatbin filter=lfs diff=lfs merge=lfs -text
*.metallib filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.aifc filter=lfs diff=lfs merge=lfs -text
*.aiff filter=lfs diff=lfs merge=lfs -text
*.au filter=lfs diff=lfs merge=lfs -text
*.bmp filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.pbm filter=lfs diff=lfs merge=lfs -text
*.pgm filter=lfs diff=lfs merge=lfs -text
*.ppm filter=lfs diff=lfs merge=lfs -text
*.ras filter=lfs diff=lfs merge=lfs -text
*.sgi filter=lfs diff=lfs merge=lfs -text
*.tiff filter=lfs diff=lfs merge=lfs -text
*.xbm filter=lfs diff=lfs merge=lfs -text
*.sndt filter=lfs diff=lfs merge=lfs -text
*.usdz filter=lfs diff=lfs merge=lfs -text
*.voc filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.3ds filter=lfs diff=lfs merge=lfs -text
*.abc filter=lfs diff=lfs merge=lfs -text
*.avi filter=lfs diff=lfs merge=lfs -text
*.blend_DISABLED filter=lfs diff=lfs merge=lfs -text
*.bphys filter=lfs diff=lfs merge=lfs -text
*.cin filter=lfs diff=lfs merge=lfs -text
*.dpx filter=lfs diff=lfs merge=lfs -text
*.hdr filter=lfs diff=lfs merge=lfs -text
*.j2c filter=lfs diff=lfs merge=lfs -text
*.jp2 filter=lfs diff=lfs merge=lfs -text
*.mkv filter=lfs diff=lfs merge=lfs -text
*.mts filter=lfs diff=lfs merge=lfs -text
*.obj filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
*.stl filter=lfs diff=lfs merge=lfs -text
*.tga filter=lfs diff=lfs merge=lfs -text
*.tif filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.uni filter=lfs diff=lfs merge=lfs -text
*.vdb filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.pdd filter=lfs diff=lfs merge=lfs -text
*.psb filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.dds filter=lfs diff=lfs merge=lfs -text
*.TTF filter=lfs diff=lfs merge=lfs -text
*.otf filter=lfs diff=lfs merge=lfs -text
*.aif filter=lfs diff=lfs merge=lfs -text
*.aac filter=lfs diff=lfs merge=lfs -text
*.flac filter=lfs diff=lfs merge=lfs -text
*.oga filter=lfs diff=lfs merge=lfs -text
*.wma filter=lfs diff=lfs merge=lfs -text
*.rns filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.flv filter=lfs diff=lfs merge=lfs -text
*.mov filter=lfs diff=lfs merge=lfs -text
*.wmv filter=lfs diff=lfs merge=lfs -text
*.mpg filter=lfs diff=lfs merge=lfs -text
*.mpeg filter=lfs diff=lfs merge=lfs -text
*.webm filter=lfs diff=lfs merge=lfs -text
*.FBX filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.7z filter=lfs diff=lfs merge=lfs -text
*.gltf filter=lfs diff=lfs merge=lfs -text
*.glb filter=lfs diff=lfs merge=lfs -text
*.ply filter=lfs diff=lfs merge=lfs -text
*.nvdb filter=lfs diff=lfs merge=lfs -text
*.usd filter=lfs diff=lfs merge=lfs -text
*.usdc filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.dat filter=lfs diff=lfs merge=lfs -text

8
.gitignore vendored
View File

@ -22,6 +22,7 @@ CMakeLists.txt.user
Thumbs.db
ehthumbs.db
Desktop.ini
.DS_Store
# commonly used paths in blender
/blender.bin
@ -67,6 +68,8 @@ waveletNoiseTile.bin
/release/datafiles/locale/
/release/scripts/addons_contrib/
/source/tools/
/release/datafiles/assets/
/tests/data/
# Build files for VS and VS Code.
/build/
@ -78,3 +81,8 @@ CMakeUserPresets.json
# Compile commands generated by CMake that may be linked into the source code
# folder to make it easier for tools like clangd to discover.
compile_commands.json
# Temporary Blender files.
blendcache_*
*.blend1
*.blend2

9
.gitmodules vendored
View File

@ -23,12 +23,3 @@
path = lib/windows_arm64
url = https://projects.blender.org/blender/lib-windows_arm64.git
branch = main
[submodule "release/datafiles/assets"]
path = release/datafiles/assets
url = https://projects.blender.org/blender/blender-assets.git
branch = main
[submodule "tests/data"]
update = none
path = tests/data
url = https://projects.blender.org/blender/blender-test-data.git
branch = main

121
assets/LICENSE Normal file
View File

@ -0,0 +1,121 @@
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.

View File

@ -0,0 +1,43 @@
# This is an Asset Catalog Definition file for Blender.
#
# Empty lines and lines starting with `#` will be ignored.
# The first non-ignored line should be the version indicator.
# Other lines are of the format "UUID:catalog/path/for/assets:simple catalog name"
VERSION 1
753df37f-2da1-4c8e-bf3e-3cbf24387e66:Brushes:Brushes
8c4f15ab-755e-4929-9fd2-609157d8067f:Brushes/Curve Sculpt:Brushes-Curve Sculpt
851d0192-113d-4737-b5d7-ab054198bdaa:Brushes/Curve Sculpt/Deform:Brushes-Curve Sculpt-Deform
754a6925-6a06-476e-a714-25db953c80ea:Brushes/Curve Sculpt/Density:Brushes-Curve Sculpt-Density
2c511e86-866e-4379-93db-7d25ac850a02:Brushes/Curve Sculpt/General:Brushes-Curve Sculpt-General
00c402c1-8f55-45ab-bb26-b4c57c9e87ad:Brushes/Grease Pencil Draw:Brushes-Grease Pencil Draw
f14d7a24-428a-4753-bf88-ef136a66be73:Brushes/Grease Pencil Draw/Draw:Brushes-Grease Pencil Draw-Draw
db855991-aff2-45d1-9ba5-cd0dccea5fe0:Brushes/Grease Pencil Draw/Erase:Brushes-Grease Pencil Draw-Erase
bef62e73-63d2-43e6-89fd-e72245350bc7:Brushes/Grease Pencil Draw/Utilities:Brushes-Grease Pencil Draw-Utilities
98c3c158-b363-48d3-80cd-ce4846f5aed1:Brushes/Grease Pencil Paint:Brushes-Grease Pencil Paint
eb75aff6-7006-4ecf-a41d-48c14e09c32c:Brushes/Grease Pencil Sculpt:Brushes-Grease Pencil Sculpt
2afe28e4-1769-4262-ae62-7e8c17e64246:Brushes/Grease Pencil Sculpt/Contrast:Brushes-Grease Pencil Sculpt-Contrast
2cfbd59a-9b11-48f1-b35d-665b70c112cf:Brushes/Grease Pencil Sculpt/Transform:Brushes-Grease Pencil Sculpt-Transform
ca10d93d-0283-480d-b868-b4275f8bc79a:Brushes/Grease Pencil Sculpt/Utilities:Brushes-Grease Pencil Sculpt-Utilities
9601079f-86e9-4a6f-ba04-56ba1bef3a9f:Brushes/Grease Pencil Weight Paint:Brushes-Grease Pencil Weight Paint
19f885c8-9bd7-43f7-98c1-104118c06f60:Brushes/Mesh Sculpt:Brushes-Mesh Sculpt
194fda97-6d88-41b1-b26d-f41cd8426518:Brushes/Mesh Sculpt/General:Brushes-Mesh Sculpt-General
45d61c81-d318-4835-a37f-54af720391e6:Brushes/Mesh Sculpt/General/Add & Subtract:Brushes-Mesh Sculpt-General-Add & Subtract
650ad315-0880-451e-8f49-7339af60808a:Brushes/Mesh Sculpt/General/Contrast:Brushes-Mesh Sculpt-General-Contrast
a1131a99-c34b-4a28-b6d7-ce61fdbf2573:Brushes/Mesh Sculpt/General/Transform:Brushes-Mesh Sculpt-General-Transform
4900134b-ead6-413d-b6bf-3fb6ff43bbe4:Brushes/Mesh Sculpt/General/Utilities:Brushes-Mesh Sculpt-General-Utilities
eb98fe9e-0baa-417f-8ff1-d56dd79d2ce2:Brushes/Mesh Sculpt/General/Utilities:Brushes-Mesh Sculpt-General-Utilities
722259b1-4abf-4d15-8b17-7875c8efb248:Brushes/Mesh Sculpt/Paint:Brushes-Mesh Sculpt-Paint
abea2557-f13e-4e21-b4d8-11a1fffd7d57:Brushes/Mesh Sculpt/Simulation:Brushes-Mesh Sculpt-Simulation
a82f0b44-1d89-4ca7-ae21-86296257be99:Brushes/Mesh Texture Paint:Brushes-Mesh Texture Paint
27cbc8dc-80c8-45d5-863c-7ecc48bccf20:Brushes/Mesh Vertex Paint:Brushes-Mesh Vertex Paint
77635e98-1a5a-482e-9cb1-ba9ec4bc5b74:Brushes/Mesh Weight Paint:Brushes-Mesh Weight Paint
f14d3c5d-8223-4e8c-b3b3-cbce81e4b3ee:Hair:Hair
87cbaad7-ae4e-404c-9b6b-4fe60ecc39dc:Hair/Deformation:Hair-Deformation
40aedbf9-be4b-4ddb-8eec-8a9cd37d0921:Hair/Generation:Hair-Generation
09af8c50-8c07-4039-821c-be801761d7cf:Hair/Guides:Hair-Guides
c676fe02-8d25-49a1-b672-11aee0918221:Hair/Read:Hair-Read
9dedc75a-afe5-472a-9e3f-a555a8df3dff:Hair/Utility:Hair-Utility
63a83f9c-5a95-476a-9bd5-fcb72414ea0b:Hair/Write:Hair-Write
9e98eca8-e987-44d3-88a1-6633d0a8ad82:Normals:Normals

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de873a20947e1fb7f19675b0f0c79dcdb9d58a75e5193aa2606f8ce0cc0b15f1
size 827070

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1d54d3b4928ce3139c3e8748568ed2af0ba095c0fdb9f7702414b5f72bb2fb5f
size 473163

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:edd368cb3097e8afd5f6ecaf66a395dba687941c8b4402039416b8ddb780e4f9
size 317729

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1de31a8acbb6e51524a5bd7151996d35922ca057b5091fbbec92e210aae3f7a0
size 267291

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cc52281fdd49739a365325ffb5211cf43a91f5bc1649403d63fe86d3e92e37db
size 213750

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b0357ed7ac2b362ec3d37caf638539a7cf1a0625306c5cbb7f840640761e602d
size 2629923

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f02b8d814ba97b4a6fea1fdc1b61b9ff9c77113b7996accde80c30322ce068ff
size 872265

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b4b5d973f1bc4a06f7553afc96c7cb0bd9a0c17921cd65903b40395eccd3300
size 600678

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:67b141b9f15b0709f954fcd5e1d846deb95f5da8615ae70f0adcfacb3025d87f
size 404988

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1d35a46a828a583ea5b9dde52862ee27debab544e1d8769699d6da2138c8bbe2
size 2465506

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a3c1b8eb6c1231b6a00b575c44b38571597da65e6a0238074c37a10c50a77023
size 71770

View File

@ -139,7 +139,7 @@ function(blender_add_ctests)
if(ARGC LESS 1)
message(FATAL_ERROR "No arguments supplied to blender_add_ctests()")
endif()
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/tests/data/render")
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/tests/files/render")
return()
endif()
@ -169,14 +169,14 @@ function(blender_add_ctests)
TEST_PREFIX ${ARGS_SUITE_NAME}
WORKING_DIRECTORY "${TEST_INSTALL_DIR}"
EXTRA_ARGS
--test-assets-dir "${CMAKE_SOURCE_DIR}/tests/data"
--test-assets-dir "${CMAKE_SOURCE_DIR}/tests/files"
--test-release-dir "${_test_release_dir}"
)
else()
add_test(
NAME ${ARGS_SUITE_NAME}
COMMAND ${ARGS_TARGET}
--test-assets-dir "${CMAKE_SOURCE_DIR}/tests/data"
--test-assets-dir "${CMAKE_SOURCE_DIR}/tests/files"
--test-release-dir "${_test_release_dir}"
WORKING_DIRECTORY ${TEST_INSTALL_DIR}
)

View File

@ -21,6 +21,7 @@ from typing import (
Union,
# Proxies for `collections.abc`
Iterable,
List,
)
# This script can run from any location,
@ -40,10 +41,14 @@ SKIP_NAMES: Tuple[str, ...] = (
".svn",
)
# Tuple with folder names relative to the main repository root that are to be excluded.
SKIP_FOLDERS: Tuple[str, ...] = (
"release/datafiles/assets/working",
)
# Generated list of Paths to be ignored based on the SKIP_FOLDERS and some rum-time rules like
# the type of package that is being created.
SKIP_PATHS: List[Path] = []
def main() -> None:
blender_srcdir = Path(__file__).absolute().parent.parent.parent
@ -77,8 +82,8 @@ def main() -> None:
blender_srcdir = blender_srcdir.relative_to(curdir)
# Update our SKIP_FOLDERS blacklist with the source directory name
global SKIP_FOLDERS
SKIP_FOLDERS = tuple([f"{blender_srcdir}/{entry}" for entry in SKIP_FOLDERS])
global SKIP_PATHS
SKIP_PATHS = [blender_srcdir / entry for entry in SKIP_FOLDERS]
print(f"Output dir: {curdir}")
@ -89,8 +94,9 @@ def main() -> None:
if cli_args.package_test_data:
print("Creating an archive of all test data.")
create_manifest(version, manifest, blender_srcdir / "tests/data", packages_dir)
create_manifest(version, manifest, blender_srcdir / "tests/files", packages_dir)
else:
SKIP_PATHS.append(blender_srcdir / "tests/files")
create_manifest(version, manifest, blender_srcdir, packages_dir)
create_tarball(version, tarball, manifest, blender_srcdir, packages_dir)
@ -145,6 +151,7 @@ def create_manifest(
outpath: Path,
blender_srcdir: Path,
packages_dir: Union[Path, None],
exclude: List[Path] = []
) -> None:
print(f'Building manifest of files: "{outpath}"...', end="", flush=True)
with outpath.open("w", encoding="utf-8") as outfile:
@ -266,6 +273,13 @@ def git_gather_all_folders_to_package(directory: Path = Path(".")) -> Iterable[P
yield path
def is_path_ignored(file: Path) -> bool:
for skip_folder in SKIP_PATHS:
if file.is_relative_to(skip_folder):
return True
return False
def git_ls_files(directory: Path = Path(".")) -> Iterable[Path]:
"""Generator, yields lines of output from 'git ls-files'.
@ -276,9 +290,8 @@ def git_ls_files(directory: Path = Path(".")) -> Iterable[Path]:
path = directory / line
if not path.is_file() or path.name in SKIP_NAMES:
continue
if path.as_posix().startswith(SKIP_FOLDERS):
continue
yield path
if not is_path_ignored(path):
yield path
def git_command(cli_args: str) -> Iterable[str]:

View File

@ -5,7 +5,7 @@
"""
"make update" for all platforms, updating Git LFS submodules for libraries and
tests, and Blender git repository.
Blender git repository.
For release branches, this will check out the appropriate branches of
submodules and libraries.
@ -58,13 +58,16 @@ def parse_arguments() -> argparse.Namespace:
parser.add_argument("--no-libraries", action="store_true")
parser.add_argument("--no-blender", action="store_true")
parser.add_argument("--no-submodules", action="store_true")
parser.add_argument("--use-tests", action="store_true")
parser.add_argument("--git-command", default="git")
parser.add_argument("--use-linux-libraries", action="store_true")
parser.add_argument("--architecture", type=str,
choices=("x86_64", "amd64", "arm64",))
parser.add_argument("--prune-destructive", action="store_true",
help="Destructive! Detect and remove stale files from older checkouts")
# Deprecated options, kept for compatibility with old configurations.
parser.add_argument("--use-tests", action="store_true", help=argparse.SUPPRESS)
return parser.parse_args()
@ -212,21 +215,6 @@ def initialize_precompiled_libraries(args: argparse.Namespace) -> str:
return ""
def initialize_tests_data_files(args: argparse.Namespace) -> str:
"""
Configure submodule with files used by regression tests
"""
print_stage("Configuring Tests Data Files")
submodule_dir = "tests/data"
print(f"* Enabling tests data at {submodule_dir}")
make_utils.git_enable_submodule(args.git_command, Path(submodule_dir))
return ""
def git_update_skip(args: argparse.Namespace, check_remote_exists: bool = True) -> str:
"""Test if git repo can be updated."""
@ -526,21 +514,6 @@ def floating_checkout_update(
return skip_msg
def floating_libraries_update(args: argparse.Namespace, branch: "str | None") -> str:
"""Update libraries checkouts which are floating (not attached as Git submodules)"""
msg = ""
msg += floating_checkout_update(
args,
"benchmarks",
Path("tests") / "benchmarks",
branch,
only_update=True,
)
return msg
def add_submodule_push_url(args: argparse.Namespace) -> None:
"""
Add pushURL configuration for all locally activated submodules, pointing to SSH protocol.
@ -583,7 +556,6 @@ def submodules_lib_update(args: argparse.Namespace, branch: "str | None") -> str
print_stage("Updating Libraries")
msg = ""
msg += floating_libraries_update(args, branch)
submodule_directories = get_submodule_directories(args)
for submodule_path in submodule_directories:
@ -603,6 +575,7 @@ def submodules_lib_update(args: argparse.Namespace, branch: "str | None") -> str
def main() -> int:
args = parse_arguments()
blender_skip_msg = ""
libraries_skip_msg = ""
submodules_skip_msg = ""
@ -630,8 +603,6 @@ def main() -> int:
if not args.no_libraries:
libraries_skip_msg += initialize_precompiled_libraries(args)
if args.use_tests:
libraries_skip_msg += initialize_tests_data_files(args)
libraries_skip_msg += submodules_lib_update(args, branch)
# Report any skipped repositories at the end, so it's not as easy to miss.
@ -640,6 +611,10 @@ def main() -> int:
print_stage("Update finished with the following messages")
print(skip_msg.strip())
if args.use_tests:
print()
print('NOTE: --use-tests is a deprecated command line argument, kept for compatibility purposes.')
# For failed submodule update we throw an error, since not having correct
# submodules can make Blender throw errors.
# For Blender itself we don't and consider "make update" to be a command

View File

@ -8,11 +8,6 @@ for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Branch_hash=%%i
cd "%BLENDER_DIR%/scripts/addons_core"
for /f "delims=" %%i in ('"%GIT%" rev-parse --abbrev-ref HEAD') do echo Addons_Branch_name=%%i
for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Addons_Branch_hash=%%i
if EXIST "%BLENDER_DIR%/tests/data/.git" (
cd "%BLENDER_DIR%/tests/data/"
for /f "delims=" %%i in ('"%GIT%" rev-parse --abbrev-ref HEAD') do echo Tests_Branch_name=%%i
for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Tests_Branch_hash=%%i
)
if "%BUILD_ARCH%" == "arm64" (
cd "%BLENDER_DIR%/lib/windows_arm64"

@ -1 +0,0 @@
Subproject commit 0418ad6b8e0d962bde30b2d4d828984b9f9c3299

View File

@ -21,7 +21,7 @@
namespace blender::asset_system::tests {
/* UUIDs from tests/data/asset_library/blender_assets.cats.txt */
/* UUIDs from tests/files/asset_library/blender_assets.cats.txt */
const bUUID UUID_ID_WITHOUT_PATH("e34dd2c5-5d2e-4668-9794-1db5de2a4f71");
const bUUID UUID_POSES_ELLIE("df60e1f6-2259-475b-93d9-69a1b4a8db78");
const bUUID UUID_POSES_ELLIE_WHITESPACE("b06132f6-5687-4751-a6dd-392740eb3c46");
@ -33,7 +33,7 @@ const bUUID UUID_POSES_RUZENA_FACE("82162c1f-06cc-4d91-a9bf-4f72c104e348");
const bUUID UUID_WITHOUT_SIMPLENAME("d7916a31-6ca9-4909-955f-182ca2b81fa3");
const bUUID UUID_ANOTHER_RUZENA("00000000-d9fa-4b91-b704-e6af1f1339ef");
/* UUIDs from tests/data/asset_library/modified_assets.cats.txt */
/* UUIDs from tests/files/asset_library/modified_assets.cats.txt */
const bUUID UUID_AGENT_47("c5744ba5-43f5-4f73-8e52-010ad4a61b34");
/* Subclass that adds accessors such that protected fields can be used in tests. */

View File

@ -9,7 +9,7 @@ class BlendfileLoadingTest : public BlendfileLoadingBaseTest {};
TEST_F(BlendfileLoadingTest, CanaryTest)
{
/* Load the smallest blend file we have in the tests/data directory. */
/* Load the smallest blend file we have in the tests/files directory. */
if (!blendfile_load("modifier_stack" SEP_STR "array_test.blend")) {
return;
}

View File

@ -25,10 +25,10 @@ class BlendfileLoadingBaseTest : public testing::Test {
/* Frees the depsgraph & blendfile. */
virtual void TearDown();
/* Loads a blend file from the tests/data directory from SVN.
/* Loads a blend file from the tests/files directory from SVN.
* Returns 'ok' flag (true=good, false=bad) and sets `this->bfile`.
* Fails the test if the file cannot be loaded (still returns though).
* Requires the CLI argument `--test-asset-dir` to point to `../tests/data`.
* Requires the CLI argument `--test-asset-dir` to point to `../tests/files`.
*
* WARNING: only files saved with Blender 2.80+ can be loaded. Since Blender
* is only partially initialized (most importantly, without window manager),

View File

@ -1832,7 +1832,7 @@ install(
# -----------------------------------------------------------------------------
# Bundle assets
set(ASSET_BUNDLE_DIR ${CMAKE_SOURCE_DIR}/release/datafiles/assets/publish/)
set(ASSET_BUNDLE_DIR ${CMAKE_SOURCE_DIR}/assets/)
if(EXISTS "${ASSET_BUNDLE_DIR}")
install(

@ -1 +0,0 @@
Subproject commit 221f67d71e370f251d39ea7d863b9e08a18094ed

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dd0ec8cd343345f259e5e05bf870fa5a4eff34ef1f559fcd09cd0c332a84d9fd
size 1900

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e30ae451262df6d6b6dfcc214865e41feddc9ec089b7e092d7cc5b9b664e99d8
size 92152

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6d113f91b96b9d7ce58dce6c977ab3082bdeef83d462e68b23b23071b1529e55
size 4628

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e2579644e2bef08c7d5f4f168772669d40fe73d78028bdaf759bfd743c28a54c
size 95397

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b22c1856583cc44d8b7066f1fe737dfcc7bf894987c5c129237d9b4bb8eeb906
size 2633

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b218d59a877d453ec82f363a0a436358964870d8d29d792f9497dd0e77ebbfa9
size 5722

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e73e5a30e9ce7e33af1382e37eceea44f319bd21087b7a7d011e48f16d86b517
size 4746

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5ffc5275abe3b0638a8aa81210c31d083e3f64c58b7234386b2458259f739424
size 4746

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e47736aed693f3d77ef0fb22d77091739e7e7e24f247ca655943bf1818e4ef91
size 14378

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:57dde46ac21c993a48a1158b2e39f63643b37c369e10a77524e246df16986466
size 74469

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:77c577f210016cd50aa8d461753cb2b05fd0762216606a2ee5169ea29a33672a
size 91737

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cf98f74e258be22b59f4a6ef6002f8d884e2c0b0190c671ccb6222e4eff06e60
size 93535

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c6acaf8ff5c61e9ac9386d77524527fe3f770c3d2422c893ecf1b6924506fee9
size 75649

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:98c9395a52829b95a854d5c7b5761031c0c8a435ab6f621a8c8e9287994fb04f
size 87389

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0dd4e1463964c8482e7f65f73d7a06261d69cb8ecc7e0ef839467bc872116130
size 994971

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:abdbd4e955e926dce9193e2d4f7e6c8cb461da51af68be78ec1d5f86ec5f86d3
size 29126

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:94b2889f2bd8b36b6a3fa76bec8f41b104e4e3dd6daf130a74c32ccd4f58a7df
size 103609

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d4fdbc1b30a537c00087bed38477ba3226bdb2ff25cc32bac5568d9b5d67f5e9
size 86754

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca8a2e276b4b38dea44e59b94a206f25d87456406775d88d404d0e5501fe314d
size 78885

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6284a74e4ec90349c9b7c71a637fd81451a4bfd708c9948754f949e795687a47
size 4356

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cfef5be44623260dd03e932baab13daa6a7f7bddde6db205adefcbe93a700001
size 4250

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:70421ffe18327954667612a5f7dffa8644f464d473cddbcca527a42a39efd91a
size 104507

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:76a47b41c5f418c8fd9fa5247c2c930b377ff9d9d9beed9888a55c047855340b
size 71523

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:619c4f1b4ee3c4a45bb5a226dc581bd18158d4efe782d1d885d572a0a116a3c2
size 80208

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:42cd504f7e19662c5566c81a35aed927bf64b92cc902011e048695109bf59c8e
size 2284536

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8fb77d9851f45d04165844a33271c709714325a69910f7b735d56603114654fc
size 59720

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f762b7cfddb9b6b16a8109638786431ff7dcdc659b9696d536a407b6ac6991e9
size 294557

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65a7a8cd3576132e32d2ddfb930640d19b406733c2be45bb911c8c0c24498eed
size 109551

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8b17c8d6456281d843cc05a44b19f927a89674f92fb4d493f6994b3819e26cc2
size 60133

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e05036bcb870069e0b38a93331b21514a607ae7fc00357554dcf768eb3b041e2
size 112155

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d37436f45c620d806927d3f6c01ff4a2dd759122c40274313af1c5fe65d8511
size 73448

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c9a2bb76c01ef3f3c4336feeabf18f3fe2c5b1b068626f97a16edd3f049e14ce
size 70063

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:60960eece546beb54c7c76f687405a595ef198b5bc8199350ef9efd1aa17e28f
size 126167

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a3122ee89ed82479816aa37e26c7a0b12b8f372c3ad4c98a4706fd5d754f25a5
size 109420

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9e1a9756f6ca91b7ce2f6ae143f0ffd8591a3be22f0e6458c3f959dc1ce21e1b
size 133690

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1073617b95706113a6422b647ba078aadd6c2e3eea1cbe48e5c8e83d58741bf5
size 52070

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:846c17d341f012fb54ef35a80d92889c82efa7fd8f0d8e1433b608d6de61a712
size 41502

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:22d714a459891f809760b9eb9ecfabf5ce7e59d80c11c3bfc1fbf244655019f4
size 70012

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bb9c4c8912e5d2e18039150b3b6693862a63939411832a4ffa5602d316ec9631
size 164637

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:58ec7fe90ba2ed316e9d6a44b8834835478eca59b47ba02b5f63a5b3bda74648
size 46301

View File

@ -0,0 +1,29 @@
# This is an Asset Catalog Definition file for Blender.
#
# Empty lines and lines starting with `#` will be ignored.
# The first non-ignored line should be the version indicator.
# Other lines are of the format "UUID:/catalog/path/for/assets:simple name for debugging"
VERSION 1
df60e1f6-2259-475b-93d9-69a1b4a8db78:/character/Ellie/poselib:POSES_ELLIE
b06132f6-5687-4751-a6dd-392740eb3c46 : character/Ellie/poselib/white space : POSES_ELLIE WHITESPACE
3376b94b-a28d-4d05-86c1-bf30b937130d:/character/Ellie/poselib/tailslash/:POSES_ELLIE_TRAILING_SLASH
79a4f887-ab60-4bd4-94da-d572e27d6aed:character/Ružena/poselib:POSES_RUŽENA
81811c31-1a88-4bd7-bb34-c6fc2607a12e:character/Ružena/poselib/hand:POSES_RUŽENA_HAND
82162c1f-06cc-4d91-a9bf-4f72c104e348:character/Ružena/poselib/face:POSES_RUŽENA_FACE
e34dd2c5-5d2e-4668-9794-1db5de2a4f71::ID_WITHOUT_PATH
d7916a31-6ca9-4909-955f-182ca2b81fa3:path/without/simplename
# Dedefines another catalog, and in such a way that based on the (path, UUID)
# sorting this should be written first. However, since it appears later in the
# file, it is not the "main" catalog for that path, and thus should be kept later
# in the file when writing it back.
00000000-d9fa-4b91-b704-e6af1f1339ef:character/Ružena/poselib:Another Ružena
# Backslashes should be normalised to forward slashes.
a51e17ae-34fc-47d5-ba0f-64c2c9b771f7:character\Ellie\backslashes:Windows For Life!

View File

@ -0,0 +1,29 @@
# This is an Asset Catalog Definition file for Blender.
#
# Empty lines and lines starting with `#` will be ignored.
# The first non-ignored line should be the version indicator.
# Other lines are of the format "UUID:/catalog/path/for/assets:simple name for debugging"
VERSION 1
# Changed path, the unit test will not modify this, so it should load:
b06132f6-5687-4751-a6dd-392740eb3c46:whitespace from file:POSES_ELLIE WHITESPACE
# Changed path, but will also be modified by the unit test, so should not load:
3376b94b-a28d-4d05-86c1-bf30b937130d:character/Ellie/file-value:POSES_ELLIE_TRAILING_SLASH
# Deleted from this file:
# a51e17ae-34fc-47d5-ba0f-64c2c9b771f7:character/Ellie/backslashes:Windows For Life!
# Obtained a simple name:
d7916a31-6ca9-4909-955f-182ca2b81fa3:path/without/simplename:Hah simple name after all
# New catalog:
c5744ba5-43f5-4f73-8e52-010ad4a61b34:agents/47:Agent 47
# Unchanged from original file:
df60e1f6-2259-475b-93d9-69a1b4a8db78:character/Ellie/poselib:POSES_ELLIE
79a4f887-ab60-4bd4-94da-d572e27d6aed:character/Ružena/poselib:POSES_RUŽENA
00000000-d9fa-4b91-b704-e6af1f1339ef:character/Ružena/poselib:Another Ružena
82162c1f-06cc-4d91-a9bf-4f72c104e348:character/Ružena/poselib/face:POSES_RUŽENA_FACE
81811c31-1a88-4bd7-bb34-c6fc2607a12e:character/Ružena/poselib/hand:POSES_RUŽENA_HAND

View File

@ -0,0 +1,5 @@
# This is an Asset Catalog Definition file for Blender.
#
# Empty lines and lines starting with `#` will be ignored.
# The first non-ignored line should be the version indicator.
# Other lines are of the format "CATALOG_ID /catalog/path/for/assets"

View File

@ -0,0 +1,19 @@
# This is an Asset Catalog Definition file for Blender.
#
# Empty lines and lines starting with `#` will be ignored.
# The first non-ignored line should be the version indicator.
# Other lines are of the format "UUID:/catalog/path/for/assets:simple name for debugging"
VERSION 1
# This file contains some but not all of the catalogs from blender_assets.cats.txt.
# It also adds a new one and modifies one.
# Pre-existing, unmodified:
df60e1f6-2259-475b-93d9-69a1b4a8db78:character/Ellie/poselib:POSES_ELLIE
# Pre-existing, modified last part of the path:
82162c1f-06cc-4d91-a9bf-4f72c104e348:character/Ružena/poselib/gezicht:Ružena Face
# New catalog:
c5744ba5-43f5-4f73-8e52-010ad4a61b34:agents/47:Agent 47

View File

@ -0,0 +1,9 @@
# This is an Asset Catalog Definition file for Blender.
#
# Empty lines and lines starting with `#` will be ignored.
# The first non-ignored line should be the version indicator.
# Other lines are of the format "UUID:catalog/path/for/assets:simple catalog name"
VERSION 1
a2151dff-dead-4f29-b6bc-b2c7d6cccdb4:Материалы:Russian Materials

View File

@ -0,0 +1,36 @@
Auto Render Regression suite
==================================
Running
==================================
./blender -b -P /path/to/tests/auto/render_test_files.py
If desired the blender executable path can be set in test_config.py to
run the script outside of Blender with:
python render_test_files.py
Results
==================================
It saves all renders and additional info into tests/auto/test_renders
The reference renders are in tests/auto/reference_renders
Comparisons
==================================
Manual comparison is possible, easier is to use automatic comparsion with
OpenImageIO installed. If it's in PATH then it will be found automatically,
otherwise the path can be set in test_config.py.
For comparing two Blender versions, you can run the tests with old version,
copy the .png files from test_renders to reference_renders and then run the
tests with the newer version.
Notes
==================================
* test_run.py is executed for each .blend file.
* The script renders every cycles file twice on the CPU (SVM and OSL).

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5bc7591ab97fb9d43e4724d185542f8df8ac7ab5bc20a879e4ddfccd28552c23
size 79359

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5bc7591ab97fb9d43e4724d185542f8df8ac7ab5bc20a879e4ddfccd28552c23
size 79359

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2d6e5a5940a7c504d4d17c61c2bfa320cfc8f729d5a13c47854d4a22b2e612e3
size 627447

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3c387a9fcc43f8ccc0e999e231c321a4b380cd2dc6ca3b5ab0f881b7b07c17d1
size 627870

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4c4b4fddf6df30d8a6bbe2dceccc9896a58472041a5ea218a3f798334e3b4a7f
size 39449

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f1cd59d21f0281abba8a0f4561300a74ad46c9fda0dc163c110baf94cf184f39
size 39540

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f5a08fbff1c589cd08335bf12b196b0694cc65b9e914c3d612fd0b47569c95f3
size 220607

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:99b5dfceb9670f313d86079298dc55fc3acf53288ce60a065cafded6592f337a
size 220607

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:44b0d2295bada8c344a062250ba740742f652e0847c0567db5e1ad05ed338eec
size 344904

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0bce2327cf4beb8502cdbf6afe19b555e5c71a6be00a42f4bd039258936910ca
size 344904

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0c374aa0528394b02f6016d7e2464309030d3487f924dee912dd48c57c9e135e
size 315628

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0e0314dcf9975dc0205fcd5c196ecf97f3fe81af761b397c9bddb063347a2946
size 315628

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:82154f05cc27a0dca9abbf36fb12724d78cd92eb5ee1528a41c89463b30ee168
size 884348

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ce333bc52b3c2ab716f8588907530ea9870e15c794336710a7f8e4ebecd03a03
size 884348

View File

@ -0,0 +1,2 @@
These reference images have been renderd with:
SVN 55063 on Mac OS X 10.8

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eea66c679a945b5b0931cd61adffd902e910759551d933eef5b63f631ade9afa
size 92102

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6d3eca0b03050a8d687f38180ec81d7281086ebd50f30795c5c12c260e09250f
size 92102

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ad2774262f05ebb65eab3cb60019fe7d7bd3c26c6e356ab4d769224145ce4259
size 359361

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a56383cdb3b0637ffa81105dad57843e857db41df3b6d895358df767e5a48d6e
size 359361

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cec2c78c176c745756b07b2e8da8872f06dd85b8162938e060a8c362bea69c9f
size 317956

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1eba96a7eec0d9a12e33a4ae7af37162bcf6881b97ebac456cb25d5672e817c5
size 317956

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b5e4d13565d6084268ef3c30cec892ce36493ec44f389022d185b282323e66f
size 270598

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca2f3487f99a5357c7171f5655bf18923c6eaf121227c0633fd42e5d9ae41049
size 103401

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:39b052395a78417beca2f8717e00ae54f1e4162719773ff8cf3aa99b582bc60a
size 239131

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3f02747aba2764dfff2a5fb9526ab218c1c673a86caff96b949d18f96d71dc9b
size 239131

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1fb5e1b3c5633dc6ce46979c78a6cb88c44ee590e7e0de5f3104dfd9b66e0d53
size 265734

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f9d955570392a08ac3ba8253ce415f7aeb4a6e9a762bee7f0ee8551de1aca816
size 265734

View File

@ -0,0 +1,188 @@
# SPDX-FileCopyrightText: 2024 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
# Run auto regression files
import os
import select
import shutil
import subprocess
import sys
# Find executables and files
def find_test_directory():
test_directory = ""
if "__file__" in globals():
test_directory = os.path.dirname(__file__)
sys.path.append(test_directory)
return test_directory
def find_idiff(idiff_path):
if not idiff_path:
if shutil.which("idiff"):
idiff_path = "idiff"
return idiff_path
def find_blender(blender_executable):
if not blender_executable:
if os.path.split(sys.executable)[1] == "blender":
blender_executable = sys.executable
print("")
return blender_executable
def find_test_files(directory, search_items, extension):
files = []
for item in search_items:
item_path = os.path.join(directory, item)
if os.path.isdir(item_path):
# find all .blend files in directory
for filename in os.listdir(item_path):
name, ext = os.path.splitext(filename)
if ext == extension:
files += [(name, os.path.join(item, filename))]
else:
# single .blend
name = os.path.splitext(os.path.basename(item))[0]
files += [(name, item)]
return files
def render_variations(blend_file):
if blend_file.find("cycles") == -1:
return ("",)
else:
return ("_svm", "_osl")
# Execute command while printing and logging it
def execute_command(command, logfile):
logdir = os.path.dirname(logfile)
if not os.path.exists(logdir):
os.makedirs(logdir)
log = open(str(logfile), "w")
log.write(command + "\n\n")
p = subprocess.Popen(command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
maxlen = 10
columns = shutil.get_terminal_size().columns
while True:
reads = [p.stdout.fileno(), p.stderr.fileno()]
ret = select.select(reads, [], [])
for fd in ret[0]:
for std in (p.stdout, p.stderr):
if fd == std.fileno():
read = std.readline().decode('utf8').rstrip()
log.write(read + "\n")
# get last part, and no multiline because it breaks \r
read = read.split('|')[-1].strip()
if len(read) > columns:
read = read[:columns]
maxlen = max(len(read), maxlen)
sys.stdout.write("\r" + read + (maxlen - len(read)) * " " + "\r")
if p.poll() is not None:
break
log.close()
sys.stdout.write("\r" + maxlen * " \r")
return p.returncode
def failure_color(message):
return '\033[91m' + message + '\033[0m'
def ok_color(message):
return '\033[92m' + message + '\033[0m'
def bold_color(message):
return '\033[1m' + message + '\033[0m'
# Setup paths
test_directory = find_test_directory()
import test_config
idiff_path = find_idiff(test_config.idiff_path)
blender_executable = find_blender(test_config.blender_executable)
blend_files = find_test_files(test_directory, test_config.files, ".blend")
# Run tests
for blend_name, blend_file in blend_files:
# Remove previous output
def clear_file(blend_name, blend_file):
for variation in render_variations(blend_file):
extension = variation + ".png"
diff_log = os.path.join(test_directory, "test_renders", blend_name + ".diff")
test_image = os.path.join(test_directory, "test_renders", blend_name + extension)
if os.path.exists(diff_log):
os.remove(diff_log)
if os.path.exists(test_image):
os.remove(test_image)
# Render
def render_file(blend_name, blend_file):
test_script = os.path.join(test_directory, "test_run.py")
blend_path = os.path.join(test_directory, blend_file)
blend_log = os.path.join(test_directory, "test_renders", blend_name + ".log")
command = '%s -b %s -P %s' % (blender_executable, blend_path, test_script)
print("Rendering " + bold_color(blend_file))
if execute_command(command, blend_log) != 0:
print(failure_color("Render Failed"))
return False
return True
# Compare
def compare_file(blend_name, blend_file):
for variation in render_variations(blend_file):
extension = variation + ".png"
diff_log = os.path.join(test_directory, "test_renders", blend_name + ".diff")
reference_image = os.path.join(test_directory, "reference_renders", blend_name + extension)
test_image = os.path.join(test_directory, "test_renders", blend_name + extension)
if not os.path.isfile(test_image):
print(failure_color("Output image missing"))
return False
if idiff_path and not os.path.isfile(reference_image):
print(ok_color("Render OK"))
return True
if idiff_path:
command = '%s -fail %f -failpercent %f %s %s' % (idiff_path, 0.02, 2, reference_image, test_image)
if execute_command(command, diff_log) not in (0, 1):
print(failure_color("Image does not match reference"))
return False
else:
print(ok_color("Render OK"))
return True
print(ok_color("Render + Compare OK"))
return True
clear_file(blend_name, blend_file)
if render_file(blend_name, blend_file):
compare_file(blend_name, blend_file)

Some files were not shown because too many files have changed in this diff Show More