abvfx Posted June 16, 2016 Share Posted June 16, 2016 (edited) Hey guys, So the curvegroom sop has a "scripted select" button for selecting primitives to groom. This is not to be mistaken with the standard reselect command with `. It it a different animal upon inspection of the asset. Because of this, i am unable to define a hotkey for it with the standard hotkey manager. But if i were to make the function a shelf tool then i could set a custom hotkey for it. However my python skills are somewhat lacking and was wondering if anyone knew of the how to create this seemingly simple button. Any help would be greatly appreciated. Edited June 16, 2016 by abvfx Quote Link to comment Share on other sites More sharing options...
MrScienceOfficer Posted June 17, 2016 Share Posted June 17, 2016 (edited) import toolutils import furtoolutils node = hou.selectedNodes()[0] sv = toolutils.sceneViewer() selection = sv.selectGeometry("Select Curves To Groom", 0, True, False, False) kwargs['node'] = node furtoolutils.startGrooming(kwargs, tool="groomsurface") if(len(selection.selectionStrings())) : node.parm("group").set(selection.selectionStrings()[0]) node.parm('stroke_changedsel').set(True) This should handle it. Edited June 18, 2016 by MrScienceOfficer Won't throw error on empty selection anymore Quote Link to comment Share on other sites More sharing options...
abvfx Posted June 17, 2016 Author Share Posted June 17, 2016 Tom. Thank you. It works perfectly. I have bound this function to a key and it now works flawlessly. I changed "groomsurface" to "groomscreen" as that is what i use most often. Thank you so much. 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.