File: make_reference_tutorials.py

package info (click to toggle)
embree 4.3.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 100,656 kB
  • sloc: cpp: 228,918; xml: 40,944; ansic: 2,685; python: 812; sh: 635; makefile: 228; csh: 42
file content (55 lines) | stat: -rw-r--r-- 1,268 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from email.mime import base
import glob
import os
import subprocess
import platform
import time
import sys

script_dir = os.path.dirname(os.path.abspath(__file__))

verbose = False

errs = []

def render(tutorial, args):
    outimage = f"{script_dir}/reference/{tutorial}.exr"
    cmd = f"{script_dir}/../../build/embree_{tutorial} -o {outimage} {args}"
    if verbose:
        print(cmd)
    if os.system(cmd) == 0:
        print(f"Rendered {outimage}")
    else:
        errs.append(t)

tutorials = [
    ("closest_point", ""),
    ("curve_geometry", ""),
    ("displacement_geometry", ""),
    ("dynamic_scene", ""),
    ("grid_geometry", ""),
    ("hair_geometry", ""),
    ("instanced_geometry", ""),
    ("interpolation", ""),
    ("intersection_filter", ""),
    ("lazy_geometry", ""),
    ("motion_blur_geometry", ""),
    ("multi_instanced_geometry", ""),
    ("multiscene_geometry", ""),
    ("point_geometry", ""),
    ("quaternion_motion_blur", ""),
    ("ray_mask", ""),
    ("subdivision_geometry", ""),
    ("triangle_geometry", ""),
    ("user_geometry", ""),
    ("voronoi", ""),
]

for (t, a) in tutorials:
    render(t, a)

if errs:
    print("There have been errors!")
    for e in errs:
        print(f"  - {e}")
    print("Could not be rendered")