Jump to content
JJ FX

[python] get active network editor

Recommended Posts

Hi,

Trying to get current network editor. So I though that using isPosInside() is the way to go. But does not work properly. Using this code:

 

import hou

print "\n"
for p in hou.ui.paneTabs():
	if p.type().name() = "NetworkEditor":
		print "Pane " + str(p) + "is: " + str(p.isPosInside(p.cursorPosition()))

 

I get weird stuff. Sometimes I get double  True (two active) or just printing out the wrong active network...

?

Share this post


Link to post
Share on other sites

Hi JJ,
Varomix did post this, once. It may help you:

    def getNetworkType():
        # get desktop
        curdesk = hou.ui.curDesktop()
        activepane = curdesk.paneTabUnderCursor()
        return activepane.type()

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×