From cfa101c22871c3d115f854e23f8b656b1c58a304 Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Fri, 2 Oct 2020 00:48:01 +0200 Subject: 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 --- intern/cycles/blender/blender_session.h | 1 + 1 file changed, 1 insertion(+) (limited to 'intern/cycles/blender/blender_session.h') 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 -- cgit v1.2.3