Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/addon/version_update.py
| Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | def custom_bake_remap(scene): | ||||
| elif end == 'COLOR': | elif end == 'COLOR': | ||||
| scene.render.bake.use_pass_direct = False | scene.render.bake.use_pass_direct = False | ||||
| scene.render.bake.use_pass_indirect = False | scene.render.bake.use_pass_indirect = False | ||||
| @persistent | @persistent | ||||
| def do_versions(self): | 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 | # We don't modify startup file because it assumes to | ||||
| # have all the default values only. | # have all the default values only. | ||||
| if not bpy.data.is_saved: | if not bpy.data.is_saved: | ||||
| return | return | ||||
| # Clamp Direct/Indirect separation in 270 | # Clamp Direct/Indirect separation in 270 | ||||
| if bpy.data.version <= (2, 70, 0): | if bpy.data.version <= (2, 70, 0): | ||||
| for scene in bpy.data.scenes: | for scene in bpy.data.scenes: | ||||
| ▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines | |||||