magneto Posted November 24, 2015 Share Posted November 24, 2015 Hi, I am creating a light and then loading my preset from the network editor but the camera view changes when I run this command/shelf button. Is there a way to prevent this? This is my code: import toolutils import objecttoolutils kwargs['pane'] = toolutils.sceneViewer() node = objecttoolutils.genericCameraLightTool(kwargs, 'hlight', 'spotlight1', False) hou.hscript("oppresetload " + node.path() + " 'Custom Light'") Thanks Quote Link to comment Share on other sites More sharing options...
ayidi Posted November 24, 2015 Share Posted November 24, 2015 replace node = objecttoolutils.genericCameraLightTool(kwargs, 'hlight', 'spotlight1', False) with node = genericTool(scriptargs, nodetypename, nodename, clicktoplace) 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 24, 2015 Author Share Posted November 24, 2015 Thanks Arthur, it complains about the generic tool. Do you know what I should be importing? Quote Link to comment Share on other sites More sharing options...
ayidi Posted November 24, 2015 Share Posted November 24, 2015 node = objecttoolutils.genericTool(scriptargs, nodetypename, nodename, clicktoplace) genericTool is part of the objecttoolutils module 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 25, 2015 Author Share Posted November 25, 2015 Thanks Arthur, it works now. 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.