willlinks Posted March 26, 2022 Share Posted March 26, 2022 Hello, I'm trying to network type category (like sop, dop, lop ...) on the Network Editor Pane in Python. I could get the parent node of the network on the current Network Editor so far. def get_network_type(): # Find the node of the network showed on a current Network Editor Pane. desktop = hou.ui.curDesktop() pane = desktop.paneTabOfType(hou.paneTabType.NetworkEditor) parent_node = pane.pwd() # I'd like to get the network type category of the inside of the parent_node (like Sop, Lop, Object, CopNet, TopNet etc). network_type = ?????? return network_type I have some case that I'm viewing the Sop network in sop_create Lop node or Vop network in material_library Lop so it is not necessary to be the top or parent network is the same network type I'm viewing on the current Network Editor pane. I could pick one node in the current network to figure out the network type by getting node type but I also have situation that there are no node in the network yet but I need to figure out the network type. It would be really nice to have some help. Thank you in advance! Quote Link to comment Share on other sites More sharing options...
animatrix Posted March 26, 2022 Share Posted March 26, 2022 Hi, You can get it like this: context = parent_node.childTypeCategory().name() 1 Quote Link to comment Share on other sites More sharing options...
willlinks Posted March 26, 2022 Author Share Posted March 26, 2022 Thank you so much for the suggestion!! It worked great 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.