bpy.context.scene.render.engine = 'CYCLES' bpy.context.scene.cycles.device = 'GPU' bpy.context.preferences.addons['cycles'].preferences.compute_device_type = 'CUDA' bpy.context.preferences.addons["cycles"].preferences.get_devices() for d in bpy.context.preferences.addons["cycles"].preferences.devices: # only use GPU. if d["name"] == 'Intel Xeon CPU E5-2630 v4 @ 2.20GHz': d["use"] = 0 else: d["use"] = 1 print(d["name"], d["use"])
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)