millag Posted July 13, 2017 Share Posted July 13, 2017 (edited) I haven't been able to find any examples of custom SOP's that include custom handles or manipulators in the 3D viewport, but there are some build in SOPs that use custom manipulators. For example, PolyExtrude has a line that, when clicked and dragged, changes the depth value. Other examples are Edit, Paint, Spay Paint nodes. I'm interested in making a cumulative node that would manipulate/alter the geometry by a custom viewport handle. Can someone point me in the right direction? Is this even possible to do with HDK or python API? Edited July 13, 2017 by millag Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted July 13, 2017 Share Posted July 13, 2017 Haven't looked at it awhile, maybe it became possible to code your own handles nowadays, but I highly doubt about that. Quote Link to comment Share on other sites More sharing options...
millag Posted July 14, 2017 Author Share Posted July 14, 2017 that's disappointing. How about the build in brush handle can I attach to it and handle input by myself? Quote Link to comment Share on other sites More sharing options...
goldleaf Posted July 14, 2017 Share Posted July 14, 2017 I found these on GitHub; the author is using MSS_ReusableSelector: https://github.com/sebastianswann/hou-hdk-sop-straighten https://github.com/sebastianswann/hou-hdk-sop-perfectcircle https://github.com/sebastianswann/hou-hdk-sop-edgelength These aren't quite like the PolyExtrude manipulator, but maybe they'll be helpful in figuring it out. Good luck! Quote Link to comment Share on other sites More sharing options...
millag Posted July 17, 2017 Author Share Posted July 17, 2017 This seems would be of great help to me, thank you so much for the links. Quote Link to comment Share on other sites More sharing options...
MrScienceOfficer Posted September 22, 2017 Share Posted September 22, 2017 A bit late, but there's a few choices for custom handles, though I'm not sure how to create custom manipulators that would work the same as the built in ones (meaning they would show up in the handles section for the HDAs). The MSS_CustomBrushState sample shows how to create a paint node. The ways Houdini implements handles, is with 'states'(BM/BM_State is a good place to look to learn a bit more). States are event handlers, tied to specific nodes, all nodes have them but most only have a generic implementation. If you register a state(MSS_SingleOpState is the best choice for a SOP, though BM_SingleOpState will work for OBJs and SOPs but is a bit more effort to work with) , and specify the name of the node, the state automatically associates with it (just select the node and hit enter in the viewport), you can create states for custom HDA's and even override states for built in nodes. States can also handle rendering, so by creating a state, rendering a custom handle and defining the interactions and plugging the resulting values into parms you can create a completely customized handle for any type of node. This is basically how Houdini handles are implemented but I think there are a few missing pieces preventing the creation of a proper handle though. You could also create a DM_MouseHook and DM_SceneHook to create and render anything you wanted without it being tied to any particular node type. 2 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.