Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/addon/engine.py
| Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | if not bpy.app.background: | ||||
| _workaround_buggy_drivers() | _workaround_buggy_drivers() | ||||
| path = os.path.dirname(__file__) | path = os.path.dirname(__file__) | ||||
| user_path = os.path.dirname(os.path.abspath(bpy.utils.user_resource('CONFIG', ''))) | user_path = os.path.dirname(os.path.abspath(bpy.utils.user_resource('CONFIG', ''))) | ||||
| _cycles.init(path, user_path, bpy.app.background) | _cycles.init(path, user_path, bpy.app.background) | ||||
| def deinit(): | |||||
| import _cycles | |||||
| _cycles.deinit() | |||||
| def create(engine, data, scene, region=None, v3d=None, rv3d=None, preview_osl=False): | def create(engine, data, scene, region=None, v3d=None, rv3d=None, preview_osl=False): | ||||
| import bpy | import bpy | ||||
| import _cycles | import _cycles | ||||
| data = data.as_pointer() | data = data.as_pointer() | ||||
| userpref = bpy.context.user_preferences.as_pointer() | userpref = bpy.context.user_preferences.as_pointer() | ||||
| scene = scene.as_pointer() | scene = scene.as_pointer() | ||||
| if region: | if region: | ||||
| ▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines | |||||