Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-08-11 10:34:34 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-08-11 14:49:50 +0300
commit596ee4b50559eddcc16f01a8fa76e692aac157c1 (patch)
treed928e7740545676141b4044ee9a5d0d716f7cf8e /tests
parentbd069a89aa3a2d166bc7cb4746a2b757497fdddc (diff)
Cycles tests: Draw images on top of checkerboard
This way it's easier to see alpha-channel only images, such as shadow catcher images on transparent film.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/python/cycles_render_tests.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py
index ffd8627dbf2..0b90ab5b55f 100755
--- a/tests/python/cycles_render_tests.py
+++ b/tests/python/cycles_render_tests.py
@@ -163,6 +163,25 @@ class Report:
<title>Cycles Test Report</title>
<style>
img {{ image-rendering: pixelated; width: 256; background-color: #000; }}
+ img.render {{
+ background-color: #fff;
+ background-image:
+ -moz-linear-gradient(45deg, #eee 25%, transparent 25%),
+ -moz-linear-gradient(-45deg, #eee 25%, transparent 25%),
+ -moz-linear-gradient(45deg, transparent 75%, #eee 75%),
+ -moz-linear-gradient(-45deg, transparent 75%, #eee 75%);
+ background-image:
+ -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, #eee), color-stop(.25, transparent)),
+ -webkit-gradient(linear, 0 0, 100% 100%, color-stop(.25, #eee), color-stop(.25, transparent)),
+ -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.75, transparent), color-stop(.75, #eee)),
+ -webkit-gradient(linear, 0 0, 100% 100%, color-stop(.75, transparent), color-stop(.75, #eee));
+
+ -moz-background-size:50px 50px;
+ background-size:50px 50px;
+ -webkit-background-size:50px 51px; /* override value for shitty webkit */
+
+ background-position:0 0, 25px 0, 25px -25px, 0px 25px;
+ }}
table td:first-child {{ width: 100%; }}
</style>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">
@@ -206,8 +225,8 @@ class Report:
test_html = """
<tr{}>
<td><b>{}</b><br/>{}<br/>{}</td>
- <td><img src="{}" onmouseover="this.src='{}';" onmouseout="this.src='{}';"></td>
- <td><img src="{}" onmouseover="this.src='{}';" onmouseout="this.src='{}';"></td>
+ <td><img src="{}" onmouseover="this.src='{}';" onmouseout="this.src='{}';" class="render"></td>
+ <td><img src="{}" onmouseover="this.src='{}';" onmouseout="this.src='{}';" class="render"></td>
<td><img src="{}"></td>
</tr>""" . format(style, name, self.testname, status,
new_url, ref_url, new_url,