This repository has been archived on 2023-02-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-benchmark-bundle/benchmark/space/global_state.py
Sybren A. Stüvel d252f75acf Separated space/__init__.py into a few modules
- `draw.py` contains all the drawing code
- `global_state.py` contains the `G` class introduced in the previous commit.
2018-08-14 13:38:05 +02:00

32 lines
741 B
Python

import threading
class G:
"""Global state of the Benchmark Client."""
result_platform = None
progress_status = None
result_stats = None
result_dict = None
background_image_path = ""
scene_status = {}
cancel = False
cached_system_info = None
cached_compute_devices = None
results_submitted = False
images = {}
current_progress = 0.0
progress_lock = threading.Lock()
@classmethod
def reset(cls):
"""Reset the global state."""
cls.result_platform = None
cls.progress_status = None
cls.result_stats = None
cls.result_dict = None
cls.background_image_path = ""
cls.scene_status = {}
cls.results_submitted = False