newbee Posted November 12, 2017 Share Posted November 12, 2017 what is the class i need to use to display the msg at the bottom while prompting the user to do something before the program runs Quote Link to comment Share on other sites More sharing options...
bonsak Posted November 12, 2017 Share Posted November 12, 2017 toolutils.sceneViewer() You'll find a few examples here:http://www.sidefx.com/docs/houdini/hom/tool_script#prompting-the-user-for-a-position-multiple-positions-or-a-path -b Quote Link to comment Share on other sites More sharing options...
newbee Posted November 12, 2017 Author Share Posted November 12, 2017 thanks bonsak, i want to give a msg to the user to select a node. once selected i want to store the resulting node in a variable. how do i do this? import toolutils scene_viewer = toolutils.sceneViewer() positions = scene_viewer.selectPositions(prompt="select a node") x=hou.selectedNodes() Quote Link to comment Share on other sites More sharing options...
bonsak Posted November 12, 2017 Share Posted November 12, 2017 Check out the hou docks for the hou.SceneViewer class: http://www.sidefx.com/docs/houdini/hom/hou/SceneViewer.html You can do like this to ask the user to select an object: scene_viewer = toolutils.sceneViewer() nodes = scene_viewer.selectObjects( prompt='Select objects', sel_index=0, allow_drag=False, quick_select=False, use_existing_selection=True, allow_multisel=True, allowed_types=('*',), icon=None, label=None, prior_selection_paths=[], prior_selection_ids=[], prior_selections=[]) -b Quote Link to comment Share on other sites More sharing options...
newbee Posted November 12, 2017 Author Share Posted November 12, 2017 (edited) perfect thanks bonsak Edited November 12, 2017 by newbee 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.