How to switch between Arnold GPU and CPU render device in Maxscript

How to switch between Arnold GPU and CPU render device in Maxscript

antHUR8S
Explorer Explorer
378 Views
3 Replies
Message 1 of 4

How to switch between Arnold GPU and CPU render device in Maxscript

antHUR8S
Explorer
Explorer

Hi all, as the title suggests how can I switch between GPU/CPU render device via Maxscript (this is in Render Setup > System > Device).

 

Even with the listener enabled, it doesn't give you the call to make.

 

 

0 Likes
Accepted solutions (1)
379 Views
3 Replies
Replies (3)
Message 2 of 4

MartinBeh
Advisor
Advisor

this should work

 

 

rc = renderers.current
-- one of these...
rc.gpu_rendering = not rc.gpu_rendering
rc.gpu_selection = 1
rc.gpu_auto_selection = true

 

You probably have to close the render dialog before making any changes.

 

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes
Message 3 of 4

MartinBeh
Advisor
Advisor
Accepted solution

Sorry, it is in fact

rc.render_device = 1
Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes
Message 4 of 4

antHUR8S
Explorer
Explorer

Appreciate the assistance!

0 Likes