Page Menu
Home
Search
Configure Global Search
Log In
Paste
P1114
optix.py
Active
Public
Actions
Authored by
Brecht Van Lommel (brecht)
on Sep 23 2019, 5:22 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
# Use like this:
# CYCLESTEST_ARGS="-P optix.py" ctest -R cycles
import
bpy
import
sys
prefs
=
bpy
.
context
.
preferences
scene
=
bpy
.
context
.
scene
scene
.
cycles
.
device
=
'GPU'
try
:
cprefs
=
prefs
.
addons
[
'cycles'
]
.
preferences
cprefs
.
compute_device_type
=
'OPTIX'
cuda_devices
,
opencl_devices
,
optix_devices
=
cprefs
.
get_devices
()
for
device
in
cuda_devices
:
device
.
use
=
device
.
type
==
'OPTIX'
except
:
print
(
"Cycles device not available"
)
sys
.
exit
(
1
)
Event Timeline
Brecht Van Lommel (brecht)
created this paste.
Sep 23 2019, 5:22 PM
Brecht Van Lommel (brecht)
changed the title of this paste from untitled to
optix.py
.
Brecht Van Lommel (brecht)
edited the content of this paste.
(Show Details)
Brecht Van Lommel (brecht)
edited the content of this paste.
(Show Details)
Log In to Comment