cgartashish Posted January 21, 2017 Share Posted January 21, 2017 Hi, Please let me know if there is a simple setting in preference where we can enable or switch to GPU or OpenCL. I am not sure whether viewport uses GPU, I think it does and I would also like to know if we can directly switch a DOP node to use GPU for its calculations. Can Mantra and Arnold use GPU? Please let me know the specific settings. Thanks again. Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted January 21, 2017 Share Posted January 21, 2017 (edited) def set_opencl(parent_node, parm_value): for node in parent_node.allSubChildren(): for p in node.parms(): if p.name()=='opencl': try: p.set(parm_value) except hou.PermissionError: #this handles the case that the parm is inside of a locked .otl pass hou.session.set_opencl(hou.node('/obj/dopnet1’), 1,) if you put this function into the session module you can enable or disable opencl in a dopnet using the last line of code with either 1 or 0 as the last argument Edited January 21, 2017 by jkunz07 3 Quote Link to comment Share on other sites More sharing options...
cgartashish Posted January 23, 2017 Author Share Posted January 23, 2017 On 1/21/2017 at 11:11 PM, jkunz07 said: def set_opencl(parent_node, parm_value): for node in parent_node.allSubChildren(): for p in node.parms(): if p.name()=='opencl': try: p.set(parm_value) except hou.PermissionError: #this handles the case that the parm is inside of a locked .otl pass hou.session.set_opencl(hou.node('/obj/dopnet1’), 1,) if you put this function into the session module you can enable or disable opencl in a dopnet using the last line of code with either 1 or 0 as the last argument wow, that's awesomee. Thanks alott 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.