blob: 0ddec327f9fa4c24776d31b86764d2cde86d7a41 (
plain)
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
|
import api
import os
def _run(args):
import bpy
import time
scene = bpy.context.scene
scene.frame_set(scene.frame_start)
start_time = time.time()
for frame in range(scene.frame_start + 1, scene.frame_end + 1):
scene.frame_set(frame)
bpy.context.evaluated_depsgraph_get()
elapsed_time = time.time() - start_time
result = {'time': elapsed_time}
return result
class AnimationTest(api.Test):
def __init__(self, filepath):
self.filepath = filepath
def name(self):
return 'animation_' + self.filepath.stem
def run(self, env):
return env.run_in_blender(_run, {}, blendfile=self.filepath)
def generate(env):
filepaths = env.find_blend_files('animation')
return [AnimationTest(filepath) for filepath in filepaths]
|