def init(): import bpy import _cycles import os.path import sys # Workaround possibly buggy legacy drivers which crashes on the OpenCL # device enumeration. # # This checks are not really correct because they might still fail # in the case of multiple GPUs. However, currently buggy drivers # are really old and likely to be used in single GPU systems only # anyway. # # Can't do it in the background mode, so we hope OpenCL is no enabled # in the user preferences. if not bpy.app.background: _workaround_buggy_drivers() path = os.path.dirname(__file__) user_path = os.path.dirname( os.path.abspath(bpy.utils.user_resource('CONFIG', ''))) _cycles.init(path, user_path, bpy.app.background) _parse_command_line()
def init(): import _cycles import os.path path = os.path.dirname(__file__) user_path = os.path.dirname(os.path.abspath(bpy.utils.user_resource('CONFIG', ''))) _cycles.init(path, user_path)
def init(): import bpy import _cycles import os.path path = os.path.dirname(__file__) user_path = os.path.dirname(os.path.abspath(bpy.utils.user_resource('CONFIG', path=''))) _cycles.init(path, user_path, bpy.app.background) _parse_command_line()
def init(): import bpy import _cycles import os.path # Workaround possibly buggy legacy drivers which crashes on the OpenCL # device enumeration. # # This checks are not really correct because they might still fail # in the case of multiple GPUs. However, currently buggy drivers # are really old and likely to be used in single GPU systems only # anyway. # # Can't do it in the background mode, so we hope OpenCL is no enabled # in the user preferences. if not bpy.app.background: _workaround_buggy_drivers() path = os.path.dirname(__file__) user_path = os.path.dirname(os.path.abspath(bpy.utils.user_resource('CONFIG', ''))) _cycles.init(path, user_path, bpy.app.background)