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
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2020-10-02 01:48:01 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2020-10-02 20:26:35 +0300
commitcfa101c22871c3d115f854e23f8b656b1c58a304 (patch)
tree33051b28379c0e23d0948c61ee63d9a95dd45266 /intern/cycles/blender/blender_session.h
parent90a27d5aa91a1b6a25ea14e11c889d47f77f4cf7 (diff)
Cycles: Add command line option for overriding the compute device
The current way of setting the compute device makes sense for local use, but for headless rendering it it a massive pain to get Cycles to use the correct device, usually involving entire Python scripts. Therefore, this patch adds a simple command-line option to Blender for specifying the type of device that should be used. If the option is present, the settings in the user preferences and the scene are ignored, and instead all devices matching the specified type are used. Differential Revision: https://developer.blender.org/D9086
Diffstat (limited to 'intern/cycles/blender/blender_session.h')
-rw-r--r--intern/cycles/blender/blender_session.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_session.h b/intern/cycles/blender/blender_session.h
index 34e952e312b..68db8a2fb58 100644
--- a/intern/cycles/blender/blender_session.h
+++ b/intern/cycles/blender/blender_session.h
@@ -126,6 +126,7 @@ class BlenderSession {
/* Global state which is common for all render sessions created from Blender.
* Usually denotes command line arguments.
*/
+ static DeviceTypeMask device_override;
/* Blender is running from the command line, no windows are shown and some
* extra render optimization is possible (possible to free draw-only data and