Logo
Explore Help
Register Sign In
griefith/test2
1
0
Fork 0
You've already forked test2
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
main
test2/tests/python/overlay/modes-gen.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
436 B
Python
Raw Permalink Normal View History

Overlay: Add tests This adds support for Overlay tests. There are some differences with how we handle tests for other engines: - The renders are captured using `bpy.ops.render.opengl()`, but this won't work on our GPU build bots. - A single blend file can run multiple tests by outputting a txt list with the test names. - Each overlay test blend file requires a matching script file with the same name inside `tests/python/overlay/`. - To reproduce a specific test state you can run `blender "(...)/tests/data/overlay/<test>.blend" -P "(...)/tests/python/overlay/<test>.py" -- --test <test-number>`. Note: The current test permutations are WIP, so reference images are not committed to the data repo for now. Pull Request: https://projects.blender.org/blender/blender/pulls/133879
2025-02-20 17:18:59 +01:00
# SPDX-FileCopyrightText: 2025 Blender Authors
#
# SPDX-License-Identifier: Apache-2.0
import os
import sys
import bpy
sys.path.append(os.path.dirname(__file__))
import overlay_common
bpy.context.window.workspace = bpy.data.workspaces['Test']
ob = bpy.context.active_object
space = bpy.data.screens["Default"].areas[0].spaces[0]
permutations = overlay_common.ob_modes_permutations(ob, space)
overlay_common.run_test(permutations)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 194ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API