diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-11-19 03:15:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-11-20 17:45:22 +0300 |
commit | f68ef05a56b7b3dca4825513b257441739c373b9 (patch) | |
tree | a89fb2c66a3f5bf779787d13d9ceed97492f5274 /intern/cycles/blender/addon/version_update.py | |
parent | aea4ed00d5a7fe661f12fbe1a16ad6574d9be8ea (diff) |
Cycles: add basic backwards compatibility for device selection, move to System tab.
For the multi-GPU case users still have to reconfigure the devices they want to use.
Based on patch from Lukas Stockner.
Differential Revision: https://developer.blender.org/D2347
Diffstat (limited to 'intern/cycles/blender/addon/version_update.py')
-rw-r--r-- | intern/cycles/blender/addon/version_update.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/version_update.py b/intern/cycles/blender/addon/version_update.py index 951afd37a92..136080efadc 100644 --- a/intern/cycles/blender/addon/version_update.py +++ b/intern/cycles/blender/addon/version_update.py @@ -172,6 +172,18 @@ def custom_bake_remap(scene): @persistent def do_versions(self): + if bpy.context.user_preferences.version <= (2, 78, 1): + prop = bpy.context.user_preferences.addons[__package__].preferences + system = bpy.context.user_preferences.system + if not prop.is_property_set("compute_device_type"): + if system.legacy_compute_device_type == 1: + prop.compute_device_type = 'OPENCL' + elif system.legacy_compute_device_type == 2: + prop.compute_device_type = 'CUDA' + else: + prop.compute_device_type = 'NONE' + prop.get_devices() + # We don't modify startup file because it assumes to # have all the default values only. if not bpy.data.is_saved: |